Returns the predicative adjective (lowercase). In German, the attributive form preceding a noun is always used: "ein kleiner Junge" => strong, masculine, nominative, "eine schöne Frau" => mixed, feminine, nominative, "der kleine Prinz" => weak, masculine, nominative,
(adjective)
| 522 | return w + adjectives_strong.get((g, c), "") |
| 523 | |
| 524 | def predicative(adjective): |
| 525 | """ Returns the predicative adjective (lowercase). |
| 526 | In German, the attributive form preceding a noun is always used: |
| 527 | "ein kleiner Junge" => strong, masculine, nominative, |
| 528 | "eine schöne Frau" => mixed, feminine, nominative, |
| 529 | "der kleine Prinz" => weak, masculine, nominative, etc. |
| 530 | The predicative is useful for lemmatization. |
| 531 | """ |
| 532 | w = adjective.lower() |
| 533 | if len(w) > 3: |
| 534 | for suffix in ("em", "en", "er", "es", "e"): |
| 535 | if w.endswith(suffix): |
| 536 | b = w[:max(-len(suffix), -(len(w)-3))] |
| 537 | if b.endswith("bl"): # plausibles => plausibel |
| 538 | b = b[:-1] + "el" |
| 539 | if b.endswith("pr"): # propres => proper |
| 540 | b = b[:-1] + "er" |
| 541 | return b |
| 542 | return w |
| 543 | |
| 544 | #### COMPARATIVE & SUPERLATIVE ##################################################################### |
| 545 |
no test coverage detected
searching dependent graphs…