Issue adding to Lexicon
MarketingPip opened this issue · comments
Jared Van Valkengoed commented
There is an issue when adding lexicon that contain values such as (Prepositions, Noun, Verb) etc..
Example:
This works fine!
let lexicon = {
"the":["hello", "how", "weird"]
}
nlp(`the`, lexicon)
// Outputs
"tags": [
"hello",
"how",
"weird"
]
but this does not.
let lexicon = {
"the":["Adverb","Preposition","Noun","Pronoun","Adjective","Verb","Determiner","Conjunction"]
}
nlp(`the`, lexicon)
// Outputs
"tags": [
"Conjunction"
]
spencer kelly commented
hey Jared, there are some rules in the internal tags that forbid a word from being two inconsistent tags, such as a Noun and an Adjective.
This is done quietly, so it is sometimes confusing.
You can read a bit about this here
cheers