I have to use Fasttext model to return word embeddings. In test I was calling it through API. Since there are too many words to compute embeddings, API call seems to be expensive. I would like to use fasttext without API. For that I need to load the model once and keep it in memory for further calls. How can this be done without using API. Any help is highly appreciated.
Surely, I will good idea to write embedding on some database like SQLite,Postgres or RocksDB. I highly appreciate using RocksDB as it is store data in the form of a key-value pair which is the best suit for your use case. Maybe it will take little more time but your main issue will get resolve through it. If u directly deal with python than there is support of SQLite and Postgres. If u work with java or .NET than RocksDB or LevelDB is supercool. I hope this explanation will help you. Please have review my answer for better reach.
-
$\begingroup$ Can you point to some resources which use embeddings with RocksDB. Also I need it in Python. If some wrapper is available then it would be good $\endgroup$ – prms Jul 16 '20 at 11:08
-
$\begingroup$ U can refer it from here. python-rocksdb.readthedocs.io/en/latest $\endgroup$ – Gaurav Koradiya Jul 16 '20 at 11:10