New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NerManager is not a constructor #1178
Comments
Yes, the nre manager is currently not exported on the main module. What you want to do? |
I'd like to setup some NER enums like the documentation page supplied here with the spiderman example |
Yes ... this is the v3 documentation :-)) I started providing v4 docs in one of my PRs ... maybe try like https://github.com/axa-group/nlp.js/pull/1171/files#diff-6e3a555ca9a8cfee3e84d492bc5db05702d7d2a6508afc7098a6ce9c60cf46da ... not reviewed so far, but working for me |
@Apollon77 the documentations is weak compared to v3. No full examples. No idea how to |
@trsh Yes you are right ... In my PRs there is some more (doid you had a look?) but also this is hanging around now for months. In fact experiment and if you understood it then send in a PR to add documetation :-) To your exact question: What exactly you want to do? |
Set rules and get entities, just like in v3 |
So far const { dockStart } = require('@nlpjs/basic');
(async () => {
const dock = await dockStart({ use: ['Basic'] });
const manager = dock.get('nlp');
manager.addNerRegexRule('en', 'ownEmail', '/\\b(\\w[-._\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,3})\\b/gi');
manager.findEntities(
'I saw spiderman eating speghetti in the city and his mail is spiderman@gmial.com',
'en',
).then(entities => console.log(entities)); but |
it shoudl be |
Looks like renamed to |
On one hand: "that this repo maintainers" is a bit "too short tought" ... you know ... open source projects ... community ... working together ;-) But you are right that there should be still time to check community contributions. I already send them an email On other hand: If you find a maintained one in the JavaScript/Node.js language with a comparable featureset please tell me ... I was not able to find any |
@Apollon77 one more question. If I provide the rules in json, like {
...,
"entities": {
"ownEmail": "/\\b(\\w[-._\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,3})\\b/gi"
},
...
} how do I feed it to the manager? |
For complete usage use corpus jsons like https://github.com/axa-group/nlp.js/pull/1171/files#diff-eba11f3b2ea9073c83d911e970dd4c2d15d211fad3de2afee47d05e02a3c7f60R15 To just bring in entities then it could work using |
Hello, I'm currently using the code in the NER documentation page
const { NerManager } = require('node-nlp');
const manager = new NerManager({ threshold: 0.8 });
I get an error from node that NerManager is not a constructor. I can't even find the named import of NerManager in the node-nlp package. Can I please get some help?
The text was updated successfully, but these errors were encountered: