Closed NeuronButter closed 1 year ago
Hello: NerManager is a thing, but know in version 4.x it's a thing by itself. More on that, there is a big work in the version 4 to make the NER able to extract from millions of rules in milliseconds, while in the version 3 it was minutes to make the same: https://github.com/axa-group/nlp.js/issues/337
Version 3.x was monolthic: it was 1 package with all, and not modular so "you use it at it is". Version 4.x is no longer monolithic: is a lot of packages each one with one function, so you can use the packages separately without installing "the whole bunch". This is a big improvement not only because allows you to replace different pieces from the equation (example, you can replace the NLU only for a language and use LUIS instead, or in another language use Watson,....), but also if you use it in web or mobile the size of the package has been reduced from 3MB down to 200KB, because you only includes what you need instead of all (if you are building a bot in english you don't need all the other 33 languages...).
You can see here all the packages that exists: https://github.com/axa-group/nlp.js/tree/master/packages
One of the packages is called "ner", it contains a class Ner that represents the previous NerManager. Other concept in the version 4 is the container: you have a container to register instances and classes, so if you want to use a different Ner you only have to register your own as a plugin.
The problem with version 4 is that is still release candidate, and we need a hard work to document it all, as it is huge compared with version 3.
So you have 3 options:
const { NlpManager } = require('node-nlp');
async function main() {
const manager = new NlpManager({ languages: ['en'] });
const nerManager = manager.container.get('ner');
console.log(nerManager);
}
main();
Alright, thanks for that. Before closing off this issue though, for each respective branch (3 for 3, 4 for master), could we get updated docs? Thanks!
Any updates on the docs?
I did a part in #1171
Closing due to inactivity. Please, re-open if you think the topic is still alive.
Well, not only that, but a clean installation of node-nlp doesn't have this:
Steps to reproduce the behavior:
Expected behavior I expect NerManager at the very least to exist.
Screenshots: And as you can see in this screenshot, a lot of other features are missing from a fresh install.
So umm yeah, NerManager isn't a thing apparently?
EDIT: This seems to only be an issue with the latest version that NPM is serving (could be the latest latest, or v4.0.0-rc.*), but 3.10.2 (latest 3 build) works.