It was only recently that I discovered wink nlp and I could not help but succumb to getting awestruck. I have also realized that the entire ecosystem uses no external dependencies, which has made it all the more interesting.
I am extremely interested in contributing and have been studying the code. I was curious to know to know how the NER works, for a start. I have been reading the code for the gazetter based NER but would appreciate a walkthrough for clarity, as it would greatly aid to my comprehension of the code.
const winkNLP = require( 'wink-nlp' ); const its = require( 'wink-nlp/src/its.js' ); const model = require( 'wink-eng-lite-web-model' ); const nlp = winkNLP( model ); const text = 'My mother had a beautiful singing voice.'; const doc = nlp.readDoc( text ); // Print tokens. console.log( doc.tokens().out() ); // Print each token's stem. console.log( doc.tokens().out( its.stem ) );
The above code will print:
["My", "mother", "had", "a", "beautiful", "singing", "voice", "."] ["my", "mother", "had", "a", "beauti", "sing", "voic", "."]