New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tagging words containing hyphen does not work #977
Comments
@spencermountain - thanks for this fix. I was interested to see the fix is to define the word Does this imply that all words containing hyphen are seen as two-words in Compromise unless they are hard-coded into the What would be the plugin syntax for this update if we wanted to fix via plugin? (for future ref) I tried the following but got the same output as reported above: const nlp = require('compromise')
nlp.verbose('tagger')
nlp.plugin({
words: {
'x-ray': 'Diagnostic',
},
tags: {
'x ray': { isA: 'Singular' }, // <-- Is this the correct fix? Does not seem to work
},
})
nlp(`x-ray`).debug() Outputs:
|
fixed in 14.7.0 |
Thank you! |
Found another issue with hyphens...
The term
x-ray
seems to get tagged as 2 separate terms, and so never gets the#Diagnostic
tag:The text was updated successfully, but these errors were encountered: