White reset at paragraphs not sentences + progress bar updates on paragraphs not sentences.
This commit is contained in:
parent
552f2e4bd0
commit
f1366548b6
|
@ -197,12 +197,14 @@ def file_sentence_generator(et, args):
|
|||
previous_pc = False
|
||||
|
||||
words = {}
|
||||
sentences = list(et.iter('s'))
|
||||
for sentence in progress(sentences, "load-text"):
|
||||
paragraphs = list(et.iter('p'))
|
||||
for paragraph in progress(paragraphs, "load-text"):
|
||||
previous_glue = ''
|
||||
sentences = list(paragraph.iter('s'))
|
||||
for sentence in sentences:
|
||||
# create fake root word
|
||||
words[sentence.get('id')] = Word.fake_root_word(sentence.get('id'))
|
||||
last_word_id = None
|
||||
previous_glue = ''
|
||||
|
||||
if args.new_tei:
|
||||
for w in sentence.iter():
|
||||
|
@ -235,11 +237,6 @@ def file_sentence_generator(et, args):
|
|||
if last_word_id:
|
||||
words[last_word_id].glue += w.text
|
||||
|
||||
# for w in sentence.iter("w"):
|
||||
# words[w.get('id')] = Word.from_xml(w, do_msd_translate)
|
||||
# for pc in sentence.iter(pc_tag):
|
||||
# words[pc.get('id')] = Word.pc_word(pc, do_msd_translate)
|
||||
|
||||
for l in sentence.iter("link"):
|
||||
if 'dep' in l.keys():
|
||||
ana = l.get('afun')
|
||||
|
|
Loading…
Reference in New Issue
Block a user