axa-group / nlp.js

An NLP library for building bots, with entity extraction, sentiment analysis, automatic language identify, and so more
MIT License
6.28k stars 621 forks source link

Use mongodb for model.nlp #1237

Closed sbotalla88 closed 1 year ago

sbotalla88 commented 1 year ago

I really like this lib for nlp in node.js. But I'd like to know if mongodb can be used for model.nlp. If not, can we please implement it? Thanks!

Apollon77 commented 1 year ago

You can define an own "filesystem" implememtation ... see https://github.com/axa-group/nlp.js/blob/master/docs/v4/core/file-system.md

So you just need to define the needed methods and then register this own instance as "fs" container

ericzon commented 1 year ago

MongoDB can be used, in fact, we have an @nlpjs/mongodb-adapter since 2 years ago. In the conf can be used with:

use: ['Basic', 'LangEn', 'Database', 'MongodbAdapter'...]

I hope it helps.

Apollon77 commented 1 year ago

@ericzon But is the adapte rnot only a "database" topic, so for session and such ... but not for files likle the corpus file and such.