Skip to content
Snippets Groups Projects
Commit beb70290 authored by Neeme Kahusk's avatar Neeme Kahusk
Browse files

1950 ok

parent c662d456
Branches niitkorpus
No related tags found
No related merge requests found
......@@ -235,7 +235,8 @@ def make_disamb(lines: list, year: int, minyear: int, delta: int, unknown: bool
vahe = vahe + ['teadmata']
#print ('VAHE={}'.format(vahe))
line = [i for i in lines if i['year'] in vahe]
print ('YHESTATUD={}'.format(line[0]))
if line:
print ('YHESTATUD={}'.format(line[0]))
if len(line) == 1:
return line
else:
......@@ -635,7 +636,8 @@ def sl2wl(sentences: list, filename: str, metadata: list):
elif len(head_read) > 1:
h_r = disamb_code(filename, head_read)
if h_r:
attribdict = {key: value for (key, value) in head_read[0].items() if
print('H_R',h_r)
attribdict = {key: value for (key, value) in h_r[0].items() if
key not in stopvalues and value}
handler.startElement('text', attribdict)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment