from sys import stderr
import lexc_parser as lp
filename = GTPATH + '/langs/rus/src/morphology/lexicon.tmp.lexc'
print('Parsing lexc file...', file=stderr)
with open(filename) as f:
src = f.read()
lexc = lp.Lexc(src)
primary_lexicons = [entry.cc.id for entry in lexc['Root']
if entry.cc is not None and entry.cc.id != 'Numeral']
for lex in primary_lexicons:
lexc[lex].cc_lemmas_dict
...yields the following lists of lemmas that are declared more than once inside the same part of speech's LEXICON:
The following code using this module...
...yields the following lists of lemmas that are declared more than once inside the same part of speech's
LEXICON
: