MCPcopy Create free account
hub / github.com/clips/pattern / predicative

Function predicative

pattern/text/it/inflect.py:412–428  ·  view source on GitHub ↗

Returns the predicative adjective.

(adjective)

Source from the content-addressed store, hash-verified

410 raise NotImplementedError
411
412def predicative(adjective):
413 """ Returns the predicative adjective.
414 """
415 w = adjective.lower()
416 if w.endswith("ari"):
417 return w + "o"
418 if w.endswith(("ali", "ili", "esi", "nti", "ori")):
419 return w[:-1] + "e"
420 if w.endswith("isti"):
421 return w[:-1] + "a"
422 if w.endswith(("che", "ghe")):
423 return w[:-2] + "a"
424 if w.endswith(("chi", "ghi")):
425 return w[:-2] + "o"
426 if w.endswith("i"):
427 return w[:-1] + "o"
428 return adjective

Callers 1

find_lemmataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…