Skip to content
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

Documentation for v4? #411

Open
taf2 opened this issue Mar 6, 2020 · 3 comments
Open

Documentation for v4? #411

taf2 opened this issue Mar 6, 2020 · 3 comments

Comments

@taf2
Copy link

taf2 commented Mar 6, 2020

Reading through issues was able to figure out to get to NerManager we have to do the following:

const manager = new NlpManager({ languages: JSON.parse(languages), threshold: 0.8 });
const nerManager = manager.container.get('ner');

Instead of

const manager = new NerManager({ threshold: 0.8 });

But now the interface is still different so things like:

nerManager.addNamedEntityText(entity.name, entity.word, [entity.lang], entity.versions);

Are broken but scanning through ner.js it's unclear how this migrates forward in v4 from v3?

Sorry if I'm missing something obvious...

@taf2
Copy link
Author

taf2 commented Mar 6, 2020

Okay seems like the solution is to use the NlpManager object directly? Now the question is how do we access the equivalent NerManager#findEntities function?

trying to see if maybe we use:

  //let entities = nerManager.findEntities(params.text, params.lang);
     let entities = nerManager.getEntitiesFromUtterance(params.lang, params.text);

getEntitiesFromUtterance instead of findEntities? but I'm getting 0 results where we used to get at least 1 result... maybe another initialization step missing/required or a different method required...

@SaltedBlowfish
Copy link

@taf2 I'm having the same issue extracting entities. Did you ever solve this?

@taf2
Copy link
Author

taf2 commented Jun 1, 2020

@SaltedBlowfish sort of i am using spacy.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants