Comparative/Superlative Tags in German #12789
-
Hey, I'm new to using spacy, so apologies if my question is silly. For my work, I need to update a script that analyzes a text, which can be German or English, for comparative and superlative, among other things. As language models we use en_core_web_md and de_core_news_md. For English, a matcher is implemented that searches for the tags JJS, JJR, etc. that directly mark comparative or superlative words. For German I can't find such tags. Are there other tags or so to find comparative/superlative? If not, can you give me some advice on how to proceed? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Hi @frahen, Thank you for your question! We’re always happy to help, and this isn’t a 100% obvious answer. You can start by checking the https://spacy.io/models/de page under ‘label scheme’ on whether the labels you're looking for are there. You might want to check the morphologizer labels as well. If you have questions on what any of the labels mean, you can use However, that morphologizer list may be truncated, and also maybe hard to find what you’re looking for exactly. If it’s not in the fine-grained tags, you can look at the general UD morphologizer features here: https://universaldependencies.org/u/feat/all.html. You can also look at the data in |
Beta Was this translation helpful? Give feedback.
-
Great! Thanks @victorialslocum, that helped me a lot. In the morphologizer features, I found superlative and comparative in the degree inflection feature. Can I use them in a matcher rule or how can I use them? |
Beta Was this translation helpful? Give feedback.
-
Glad it helped! Yes definitely! You can find more information on available pattern attributes here: https://spacy.io/usage/rule-based-matching#adding-patterns-attributes. The |
Beta Was this translation helpful? Give feedback.
-
A little update. After experimenting a bit with the Matcher rules, I finally found rules that recognize comparative and superlative in German texts. Not every case can be found, but it has a high accuracy for that, which is more important in my case. Thanks again, it really helped me :) |
Beta Was this translation helpful? Give feedback.
Hi @frahen,
Thank you for your question! We’re always happy to help, and this isn’t a 100% obvious answer.
You can start by checking the https://spacy.io/models/de page under ‘label scheme’ on whether the labels you're looking for are there. You might want to check the morphologizer labels as well. If you have questions on what any of the labels mean, you can use
print(spacy.explain("..."))
, though I’m not sure it works for morph labels/feats.However, that morphologizer list may be truncated, and also maybe hard to find what you’re looking for exactly. If it’s not in the fine-grained tags, you can look at the general UD morphologizer features here: https://universaldependencies.org/u/fea…