This PR can be summarized in the following changelog entry:
Makes it possible to create stems from German participles, e.g. gekauft -> kauf. From these stems, the correct verb and adjectives forms are then created.
Adds functionality to create participle forms with prefixes, e.g. eingekauft.
Relevant technical choices:
The check for whether a word is a participle takes place after checking exceptions (since these also include participle stems) but before creating regular forms.
If a participle is detected, we only create verb forms (assuming that the participle was used verbally, e.g. "er hat sich die Haare gefärbt" - "he dyed his hair") and adjective forms (assuming that the participle was used adjectivally, e.g. "die Haare sind gefärbt" - "the hair is dyed"). The adjective forms are based on the stem that has only the suffixes removed, not the prefixes. This is because we want forms such as "die gefärbten Haare" and not (incorrectly) "*die färbten Haare".
Test instructions
This PR can be tested by following these steps:
To check whether participles get stemmed correctly:
In the example, make sure your locale is set to de_DE and you have enabled morphology.
Add a text with at least 150 words.
Set a keyphrase containing a participle, e.g. gekauft.
In the text, add different forms of the verb kaufen, e.g. kaufe, kaufte etc.
Make sure these forms get recognized as forms of the keyphrase.
To check whether participle forms get created correctly:
In the example, make sure your locale is set to de_DE and you have enabled morphology.
Add a text with at least 150 words.
Set a keyphrase containing a verb, e.g. kaufen.
In the text, add the participle gekauft.
Make sure the participle forms gets recognized as a form of the keyphrase.
Summary
This PR can be summarized in the following changelog entry:
gekauft
->kauf
. From these stems, the correct verb and adjectives forms are then created.eingekauft
.Relevant technical choices:
Test instructions
This PR can be tested by following these steps:
de_DE
and you have enabled morphology.gekauft
.kaufen
, e.g.kaufe
,kaufte
etc.de_DE
and you have enabled morphology.kaufen
.gekauft
.Fixes #2190