is_plural/is_singular are really missing #4755
Replies: 7 comments
-
Hi, there is support for morphological features under development that will include features like |
Beta Was this translation helpful? Give feedback.
-
Great, I'm eager to use it! Because I'm not at all satisfied with my current way to check if a tag is plural or not! split_on_number = spacy_token.tag_.split("Number=")
if len(split_on_number) > 1 and split_on_number[1].startswith("Plur"):
return true Do you propose any other way? @adrianeboyd |
Beta Was this translation helpful? Give feedback.
-
Right now there are long combined tag+morph tags as
And just as a preview (but UNSTABLE and UNDOCUMENTED): The morphological feature implementation is still under development, so please don't rely on this right now, but the idea is that you will have a
Some languages have the morphological features from the combined tags incorporated into their tag maps so you can experiment with |
Beta Was this translation helpful? Give feedback.
-
Hey @hzitoun
(I've tried "DT__Number=Plur", "DT|Number=Plur" without more success) |
Beta Was this translation helpful? Give feedback.
-
@2ny: Some languages supported by spacy come with combined tag+morph tags, typically ones converted from UD corpora. You can use I hope to make extending the tag map easier with CLI options in the next version of spacy, but for now you need to edit Here's the preview of how it might work in the future, where you can see how to update the tag map in |
Beta Was this translation helpful? Give feedback.
-
thanks @adrianeboyd for your answer. |
Beta Was this translation helpful? Give feedback.
-
Hi, to come back to the original question, I just wanted to point out that the current
will print
|
Beta Was this translation helpful? Give feedback.
-
Feature description
That would be nice to have an attribute
is_plural
associated toToken
class.Beta Was this translation helpful? Give feedback.
All reactions