Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize
FastText.load_fasttext_model
(#2340)
* add docstring for Model namedtuple * add option to skip hidden matrix loading * review response: rename fast -> full_model * speed up hash function based on ideas from @horpto and @menshikh-iv * remove obsolete ft_hash function * review response: update docstring * attempt to hack around appveyor Py2.7 build missing stdint.h * fixup: add missing int8_t typedef * review response: avoid split and join * review response: add comment to explain hack * review response: improve logging message * review response: fix hash_main function * fixup: fix test_utils.py * add tests for ngram generation * fixup in tests * add emoji test case * minor fixup in logging message * add byte tests * remove FIXME, absense of ord does not influence correctness * review response: introduce list slicing * avoid using fstrings for Py2 compatibility * flake8 * more Py2 compatibility * flake8 * review response: get rid of set() * review response: remove excess bytes() call * fix tests (wide unicode issue) * add test against actual FB implementation * adding temporary benchmarking code * replacing non-optimized code with optimized code * removing temporary benchmarking code * remove wide characters from fb test code
- Loading branch information