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

Class Parser

pattern/text/xx/__init__.py:103–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101# Subclass the base parser with the language-specific functionality:
102
103class Parser(_Parser):
104
105 def find_tokens(self, tokens, **kwargs):
106 kwargs.setdefault("abbreviations", ABBREVIATIONS)
107 kwargs.setdefault("replace", REPLACEMENTS)
108 return _Parser.find_tokens(self, tokens, **kwargs)
109
110 def find_tags(self, tokens, **kwargs):
111 kwargs.setdefault("map", tagset2penntreebank)
112 return _Parser.find_tags(self, tokens, **kwargs)
113
114 def find_chunks(self, tokens, **kwargs):
115 return _Parser.find_chunks(self, tokens, **kwargs)
116
117 def find_lemmata(self, tokens, **kwargs):
118 return find_lemmata(tokens)
119
120# The parser's part-of-speech tagger requires a lexicon of tagged known words,
121# and rules for unknown words. See pattern.text.Morphology and pattern.text.Context

Callers 1

__init__.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…