npm install
https://github.com/NaturalNode/natural/
ts-node natural.ts
https://github.com/axa-group/nlp.js
ts-node nlp.ts
It requires that you have a functional ES instance: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
Add your config data in config/default.json
node elastic.js
node elastic-chunks.js
Using the data/text-small.txt with a loop of 5000 iterations
ES limitations: Text size depends on the value maxClauseCount ES setting see: https://medium.com/traackr-devs/setting-the-booleanquery-maxclausecount-in-elasticsearch-f9d829516838
elastic: ~7.8 seconds
The script uses approximately 25.92754364013672 MB
elastic-chunks: ~3.524 seconds The script uses approximately 26.654769897460938 MB
natural: 3.5 seconds
The script uses approximately 124.1512680053711 MB
nlp: 381.159ms The script uses approximately 162.9041519165039 MB