Index: incubator/apertium-bel-rus/dev/make_bidix.py =================================================================== --- incubator/apertium-bel-rus/dev/make_bidix.py (nonexistent) +++ incubator/apertium-bel-rus/dev/make_bidix.py (revision 66881) @@ -0,0 +1,54 @@ +# usage: python3 make_bidix.py success.txt apertium-rus.rus.dix pwords.txt 1> entries.dix +# input: +# success.txt – speling file +# apertium-rus.rus.dix – russian monodix +# pwords.txt – file produced by parse_korpus.py +# output: +# stdin – entries +# stderr – entries count + +import sys + +s_wrap = lambda x: '' +p_wrap = lambda x: ''.join([s_wrap(n) for n in x]) +nums = ['¹', '²', '³', '⁴', '⁵', '⁶'] + +speling_file = open(sys.argv[1], 'r') +parsed_korpus_file = open(sys.argv[3], 'r') +rus_monodix = open(sys.argv[2], 'r') + +properties = {} +for x in rus_monodix.readlines(): + #

сынсын

+ if x.find("', x.find('', x.find('

{}{}{}{}

+ print("

{}{}{}{}

".format(lemma[0], p_wrap(properties_bel), translation, p_wrap(properties_rus))) + # to be continued... +print(translated, file=sys.stderr)