MCPcopy Index your code
hub / github.com/clips/pattern / find_lemmata

Method find_lemmata

pattern/text/__init__.py:553–556  ·  view source on GitHub ↗

Annotates the given list of tokens with word lemmata.

(self, tokens, **kwargs)

Source from the content-addressed store, hash-verified

551 return find_relations(tokens)
552
553 def find_lemmata(self, tokens, **kwargs):
554 """ Annotates the given list of tokens with word lemmata.
555 """
556 return [token + [token[0].lower()] for token in tokens]
557
558 def parse(self, s, tokenize=True, tags=True, chunks=True, relations=False, lemmata=False, encoding="utf-8", **kwargs):
559 """ Takes a string (sentences) and returns a tagged Unicode string (TaggedString).

Callers 7

parseMethod · 0.95
test_find_lemmataMethod · 0.45
test_find_lemmataMethod · 0.45
test_find_lemmataMethod · 0.45
test_find_lemmataMethod · 0.45
test_find_lemmataMethod · 0.45
test_find_lemmataMethod · 0.45

Calls

no outgoing calls

Tested by 6

test_find_lemmataMethod · 0.36
test_find_lemmataMethod · 0.36
test_find_lemmataMethod · 0.36
test_find_lemmataMethod · 0.36
test_find_lemmataMethod · 0.36
test_find_lemmataMethod · 0.36