winkjs / wink-nlp-utils

NLP Functions for amplifying negations, managing elisions, creating ngrams, stems, phonetic codes to tokens and more.
http://winkjs.org/wink-nlp-utils/
MIT License
119 stars 12 forks source link

`extractPersonsName` Not working as expected #34

Closed reginsmol closed 1 year ago

reginsmol commented 1 year ago

Code:

const nlp = require('wink-nlp-utils');

nlp.string.extractPersonsName('George Washington was an American military officer, statesman, and Founding Father who served as the first president of the United States from 1789 to 1797.')

Expected behavior: return George Washington

Actual Behavior: returns George Washington was an American military officer statesman and Founding Father who served as the first president of the United States from to

Reproduction: https://runkit.com/embed/glyj5qvv8rgi

sanjayaksaxena commented 1 year ago

Hi @reginsmol

It is not named entity extraction.

It assmues the following name format: [<salutations>] <name part as FN [MN] [LN]> [<degrees>] and extracts the name from such a text string. Entities in square brackets are optional.

Please refer to the documentation for details https://winkjs.org/wink-nlp-utils/string.html#extractPersonsName

Best, Sanjaya