Replies: 1 comment
-
hey Jurijs, it's great that you found a use for those methods - i didn't know anyone was using them. you can replicate nlp.extend({
api: (View) => {
View.prototype.hasPlural = function () {
return this.nouns().filter(m => m.has('#Plural') || !m.has('#Uncountable'))
}
}
})
doc = nlp('peace, a flower, and doves').debug()
doc.nouns().hasPlural().debug()
// a flower, doves out of curiosity, what is your use-case for these methods? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've update the version of compromise to v14 something then checked the change log which says:
[breaking] - remove .nouns().toPossessive() & .nouns().hasPlural()
with out offering any replacement for the methods.
I wonder if there is a replacement for whose methods via plugins or other means?
Beta Was this translation helpful? Give feedback.
All reactions