Index: languages/apertium-pol/apertium-pol.pol.dix =================================================================== --- languages/apertium-pol/apertium-pol.pol.dix (revision 70436) +++ languages/apertium-pol/apertium-pol.pol.dix (revision 70438) @@ -4153,18 +4153,26 @@

niwszynić

+ +

+

+

i

+

+

+

i

+

ie

+

i

+

iono

+

iwszy

+
+ -

-

-

i

-

-

-

i

-

ie

-

i

-

ino

-

iwszy

+

+ + +

+

@@ -5677,6 +5685,10 @@

+ + +

+

@@ -7644,10 +7656,21 @@

r

+ +

iarze

+

ierze

+

ieier

+

iar

+
+

ra

- + + +

iara

+
+

cie

cie

@@ -15813,8 +15836,11 @@ wątp pełn nakarm + nakarm zapewn wystąp + pojaw + pojaw wierz bi ży @@ -17372,7 +17398,8 @@ intryganctw inwestyc isk - isk + por + of istot iterac itr @@ -70375,6 +70402,18 @@ Marcin Stanisław Andrzej + Tomasz + Mordechaj + Nikołaj + Wenancjusz + Gajusz + Konstancjusz + Gaudencjusz + Tryfiliusz + Sylweriusz + Jaczewoj + Gniewosz + Ozjasz Mar Jar Dar @@ -70579,6 +70618,7 @@ Hes Słowac Tunez + Az Turc Franc Grec @@ -70617,6 +70657,9 @@ SanFrancisco Schengen UE + ONZ + NASA + NATO ZSRR USA U.S. Index: incubator/apertium-pol-rus/apertium-pol-rus.pol-rus.dix =================================================================== --- incubator/apertium-pol-rus/apertium-pol-rus.pol-rus.dix (revision 70436) +++ incubator/apertium-pol-rus/apertium-pol-rus.pol-rus.dix (revision 70438) @@ -59,6 +59,7 @@ + @@ -7891,6 +7892,8 @@

TurcjaТурция

SzkocjaШотландия

SłoweniaСловения

+

TunezjaТунезия

+

Azjaазалия

DaniaДания

GrecjaГреция

GruzjaГрузия

@@ -7917,8 +7920,12 @@

ZSRRСССР

UEЕС

-

USAСША

+

ONZООН

+

NASAНАСА

+

NATOНАТО

+

USAСША

+

RenataРената

IrenaИрина

JózefИосиф

@@ -7946,6 +7953,9 @@

AdamАдам

AndrzejАндрей

+

TomaszТомаш

+

NikołajНиколай

+

GajuszГай

StanisławСтанислав

JamesДжеймс

AgniАгни

@@ -7965,6 +7975,8 @@

DiannaДиана

WładysławaВладислава

+

MordechajMordechaj

+

WenancjuszWenancjusz

HankaHanka

CelinkaCelinka

UlkaUlka

@@ -23565,6 +23577,8 @@

graигра

poraпора

poraвремя

+

ofiaraжертва

+

ofiaraжертва

aktorkaактриса

aktorkaартистка

aktorkaактёр

@@ -44587,7 +44601,8 @@

wystąpićотчислиться

wystąpićвыступить

wystąpićпроявиться

-

wystąpićпоявиться

+

wystąpićпоявиться

+

pojawićпоявиться

pełnićвыполнять

staćстоять

Index: incubator/apertium-pol-rus/dev/from_morpheus.py =================================================================== --- incubator/apertium-pol-rus/dev/from_morpheus.py (revision 70436) +++ incubator/apertium-pol-rus/dev/from_morpheus.py (revision 70438) @@ -17,7 +17,7 @@ return morph_d def info_collector(fname): - '''opens a with smthn from morpheus, reads it and makes a dictionary of lemmas and wordforms''' + '''opens a file with smthn from morpheus, reads it and makes a dictionary of lemmas and wordforms''' with codecs.open(fname, 'r', 'utf-8') as f: forms = [line.split('\t') for line in f.readlines()] @@ -73,7 +73,7 @@ def check_presence(lemmas): with codecs.open('../../apertium-pol/apertium-pol.pol.dix', 'r', 'utf-8') as f: - hyp = [re.findall('\w+', line) for line in f] + hyp = [re.findall('\w+', line) for line in f] already_there = set([h[0] for h in hyp if len(h) > 0]) # print(already_there) intersection = set(lemmas).intersection(set(already_there)) @@ -83,7 +83,7 @@ def to_morph(to_add, info): with codecs.open('add_to_monodix.xml', 'w', 'utf-8') as f: for word in to_add: - f.write(' ' + word[:-4] + '\n') + f.write(' ' + word + '\n') # if info[word] == 'f': # f.write(' ' + word + '\n') # else: @@ -93,13 +93,13 @@ def to_bidix(to_add, info): with codecs.open('add_to_bidix.xml', 'w', 'utf-8') as f: for word in to_add: - if info[word] == 'f': - f.write('

' + word + '' + word + '

\n') - else: + # if info[word] == 'f': + # f.write('

' + word + '' + word + '

\n') + # else: f.write('

' + word + '' + word + '

\n') -morph_d = forms_collector('imiona.txt') -# info = info_collector('adjectives_from_morpheus.txt') +morph_d = forms_collector('../../rzeczowniki.txt') +info = info_collector('../../rzeczowniki.txt') paradigms = paradigm_collector(morph_d) similar = find_similar(paradigms) inventories = [similar[inventory] for inventory in similar] @@ -107,7 +107,7 @@ for inventory in inventories: # print(inventory) - if 'Andrzej' in inventory: + if 'Tunezja' in inventory: wordclass = inventory print(wordclass) @@ -121,8 +121,8 @@ print(key) to_add = check_presence(wordclass) -# to_morph(to_add, info) -# to_bidix(to_add, info) +to_morph(to_add, info) +to_bidix(to_add, info) # done = [wordclass] # inventories = [similar[inventory] for inventory in similar if similar[inventory] not in done]