Returns the comparative or superlative form of the given (inflected) adjective.
(adjective, suffix=COMPARATIVE)
| 547 | SUPERLATIVE = "st" |
| 548 | |
| 549 | def grade(adjective, suffix=COMPARATIVE): |
| 550 | """ Returns the comparative or superlative form of the given (inflected) adjective. |
| 551 | """ |
| 552 | b = predicative(adjective) |
| 553 | # groß => großt, schön => schönst |
| 554 | if suffix == SUPERLATIVE and b.endswith(("s", u"ß")): |
| 555 | suffix = suffix[1:] |
| 556 | # große => großere, schönes => schöneres |
| 557 | return adjective[:len(b)] + suffix + adjective[len(b):] |
| 558 | |
| 559 | def comparative(adjective): |
| 560 | return grade(adjective, COMPARATIVE) |
no test coverage detected
searching dependent graphs…