|
|
|
@ -52,14 +52,14 @@ word_index = 0
|
|
|
|
|
|
|
|
|
|
# done_lexical_entries = 33522
|
|
|
|
|
data = Data('s', shuffle_all_inputs=False)
|
|
|
|
|
accentuated_content = data._read_content('data/new_sloleks/new_sloleks.tab')
|
|
|
|
|
accentuated_content = data._read_content('data/new_sloleks/final_sloleks2.tab')
|
|
|
|
|
|
|
|
|
|
start_timer = time.time()
|
|
|
|
|
|
|
|
|
|
print('Copy initialization complete')
|
|
|
|
|
with open("data/new_sloleks/final_sloleks.xml", "ab") as myfile:
|
|
|
|
|
with open("data/new_sloleks/final_sloleks2.xml", "ab") as myfile:
|
|
|
|
|
# myfile2 = open('data/new_sloleks/p' + str(iter_index) + '.xml', 'ab')
|
|
|
|
|
for event, element in etree.iterparse('data/new_sloleks/final_sloleks_read.xml', tag="LexicalEntry", encoding="UTF-8", remove_blank_text=True):
|
|
|
|
|
for event, element in etree.iterparse('data/Sloleks_v1.2.xml', tag="LexicalEntry", encoding="UTF-8", remove_blank_text=True):
|
|
|
|
|
# for event, element in etree.iterparse('data/Sloleks_v1.2.xml', tag="LexicalEntry", encoding="UTF-8", remove_blank_text=True):
|
|
|
|
|
# if word_glob_num >= word_limit:
|
|
|
|
|
# myfile2.close()
|
|
|
|
@ -135,6 +135,7 @@ with open("data/new_sloleks/final_sloleks.xml", "ab") as myfile:
|
|
|
|
|
|
|
|
|
|
new_element = etree.Element('feat')
|
|
|
|
|
new_element.attrib['att'] = 'SAMPA'
|
|
|
|
|
print(accentuated_word)
|
|
|
|
|
new_element.attrib['val'] = convert_to_SAMPA(accentuated_word)
|
|
|
|
|
wf.append(new_element)
|
|
|
|
|
|
|
|
|
|