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

Class Word

pattern/text/search.py:51–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 return []
50
51class Word(object):
52
53 def __init__(self, sentence, string, tag=None, index=0):
54 """ A word with a position in a sentence.
55 """
56 self.sentence, self.string, self.tag, self.index = sentence, string, tag, index
57
58 def __repr__(self):
59 return "Word(%s)" % repr(self.string)
60
61 def _get_type(self):
62 return self.tag
63 def _set_type(self, v):
64 self.tag = v
65
66 type = property(_get_type, _set_type)
67
68 @property
69 def chunk(self):
70 return None
71
72 @property
73 def lemma(self):
74 return None
75
76#--- STRING MATCHING -------------------------------------------------------------------------------
77

Callers 1

__init__Method · 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…