You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v13, Any #TextValue such as five or twelve is correctly tagged, regardless of the casing of the string.
In v14, the tagger fails to add #TextValue for any word-number with a first uppercase letter - instead the word gets tagged as #ProperNoun
e.g. The Twelve Days of Christmas
Got: Twelve => #ProperNoun
Want: Twelve => #TextValue #Value
constnlp=require('compromise')constnlpDates=require('compromise-dates')constnlpNumbers=require('compromise-numbers')nlp.plugin(nlpDates)nlp.plugin(nlpNumbers)consttext=[// uppercase #TextValue fails to tag as #TextValue'I watched the Twelve Days of Christmas','I put him on the Two-Week Wait cohort','I saw him Five years ago',// lowercase #TextValue correctly tagged as #TextValue'I watched the twelve days of christmas','I put him on the two-week wait cohort','I saw him five years ago',]text.forEach((t)=>{constdoc=nlp(t)constresult=doc.has('#Value') ? 'MATCH SUCCESS' : 'MATCH FAIL'console.log(result)console.log(doc.debug())})
I’m not sure I understand why they have to be mutually exclusive? Can’t it be a #Value, #TextValue and #ProperNoun all at the same time? That would appear semantically correct to me.
@spencermountain the strings were correctly labelled both #TextValue, #Value and #ProperNoun in v13. Can’t we just follow the same logic in v14? Why can’t a #ProperNoun also be a #Value?
In v13, Any
#TextValue
such asfive
ortwelve
is correctly tagged, regardless of the casing of the string.In v14, the tagger fails to add
#TextValue
for any word-number with a first uppercase letter - instead the word gets tagged as#ProperNoun
e.g.
The Twelve Days of Christmas
Got:
Twelve => #ProperNoun
Want:
Twelve => #TextValue #Value
Possibly related #992 ?
Example
v14 output
v13 output
The text was updated successfully, but these errors were encountered: