S
S
Sergey Grigorov2018-05-18 12:50:29
Python
Sergey Grigorov, 2018-05-18 12:50:29

How to get an adjective from a noun in pymorphy2?

Hello.
During the training of the system, "pitfalls" flared up.
For example, the query "gazelle with an awning up to five tons" is parsed correctly - the topic is "gazelle" and the parameters "with an awning up to five tons".
But the "tarpaulin gazelle up to five tons" already throws out an IndexError, because the part of speech is defined as an adjective, and the output is a noun.
And the system does not know what to do - to take into account the next word or not.
The query "gazelle with awning" returns two query topics - "gazelle" and "tent" (this is not necessary), but "gazelle with awning" - the topic "gazelle" and the parameters "with awning" (as it should be).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question