Closed armmmo closed 1 year ago
Would be great to see an example on this. +1
Well, this is because the builtin entity extaction is done automatically without configuration and even without training a model.
const { NlpManager } = require('node-nlp');
async function main() {
const manager = new NlpManager({ languages: ['en'] });
const result = await manager.process('Today I will walk 5 miles');
console.log(result.entities);
}
main();
Try this, it should show two entities in console: the date and the dimension
How about the following code?
const { NerManager } = require('node-nlp');
const manager = new NerManager({ threshold: 0.8 });
const result = await manager.findEntities('My email is something@somehost.com please write me');
console.log(JSON.stringify(result));
[{
"start": 12,
"end": 33,
"len": 22,
"accuracy": 0.95,
"sourceText": "something@somehost.com",
"utteranceText": "something@somehost.com",
"entity": "email",
"resolution": {
"value": "something@somehost.com"
}
}]
const { NerManager } = require('node-nlp');
const manager = new NerManager({ threshold: 0.8 });
const result = await manager.findEntities('My ip is 8.8.8.8');
console.log(JSON.stringify(result));
[{
"start": 9,
"end": 15,
"len": 7,
"accuracy": 0.95,
"sourceText": "8.8.8.8",
"utteranceText": "8.8.8.8",
"entity": "ip",
"resolution": {
"value": "8.8.8.8",
"type": "ipv4"
}
}]
How do I can contribute writing some code for italian builtin entity extraction?
@tassoman Hi I'm also interested in the native Italian entity extraction. Did you do something?
there's no tutorial example for Builtin Entity Extraction, only show the results of the extraction, but not how to use it.