155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
+
+
-
-
+
+
|
#### Analyse tokens for graph rules
def g_info (dToken):
"for debugging: retrieve info of word"
if not dToken:
echo("> no token")
return True
for sKey, val in dToken.items():
echo(sKey + ":" + str(val))
lMorph = dToken["lMorph"] if "lMorph" in dToken else _oSpellChecker.getMorph(dToken["sValue"])
if not lMorph:
echo("> not in dictionary: " + dToken["sValue"])
return True
for sKey, val in dToken.items():
echo(sKey + ":" + str(val))
for sMorph in lMorph:
echo(sMorph)
return True
def g_value (dToken, sValues, nLeft=None, nRight=None):
"test if <dToken['sValue']> is in sValues (each value should be separated with |)"
sValue = "|"+dToken["sValue"]+"|" if nLeft is None else "|"+dToken["sValue"][slice(nLeft, nRight)]+"|"
if sValue in sValues:
|