Indexer transforms list of strings to list of integers according to the string2int mapping function(e.q. a look-up table).
- Please create a virtual environment with python 3.6
- Type the following command in terminal:
make install
make test
from text_indexer.io import save_indexer
custom_indexer_instance = XXIndexer()
save_indexer(indexer=custom_indexer_instance, output_dir='directory-to-export-indexer')
If output_dir is /home/user/example/
, you will get a tar file /home/user/example-all.tar.gz
after calling
save_indexer
.
from text_indexer.io import load_indexer
your_indexer = load_indexer(path='indexer-tar-filepath')