118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
-
+
-
-
+
+
+
+
+
+
+
|
for sElem in self.lexicographer.split(sWord):
if sElem:
lMorph = self.getMorph(sElem)
sLex = self.lexicographer.analyze(sElem)
if sLex:
aRes = [ (" | ".join(lMorph), sLex) ]
else:
aRes = [ (sMorph, self.lexicographer.formatTags(sMorph)) for sMorph in lMorph ]
aRes = [ (sMorph, self.lexicographer.readableMorph(sMorph)) for sMorph in lMorph ]
if aRes:
lWordAndMorph.append((sElem, aRes))
return lWordAndMorph
def readableMorph (self, sMorph):
if not self.lexicographer:
return []
return self.lexicographer.formatTags(sMorph)
return ""
return self.lexicographer.readableMorph(sMorph)
def setLabelsOnToken (dToken):
if not self.lexicographer:
return
self.lexicographer.setLabelsOnToken(dToken)
# Storage
def activateStorage (self):
"store all lemmas and morphologies retrieved from the word graph"
self.bStorage = True
|