Changed output document to reflect most frequent word order
This commit is contained in:
13
src/wani.py
13
src/wani.py
@@ -38,6 +38,19 @@ def match_file(words, structures, postprocessor):
|
||||
colocation_id = tuple(colocation_id)
|
||||
|
||||
matches[s].append((match, colocation_id))
|
||||
# for key, val in matches.items():
|
||||
# if key.id == '15':
|
||||
# for el in val:
|
||||
# if el[0]['1'].lemma == 'biti' and el[0]['2'].lemma == 'po' and el[0]['3'].lemma == 'mnenje':
|
||||
# word_id = '.'.join(words[0].id.split('.')[:-1])
|
||||
# print(f"ID: {'.'.join(words[0].id.split('.')[:-1])}")
|
||||
# print(' '.join([w.text for w in words if '.'.join(w.id.split('.')[:-1]) == word_id]))
|
||||
|
||||
# if s.id == '15':
|
||||
# if match['1'].lemma == 'biti' and match['2'].lemma == 'po' and match['3'].lemma == 'mnenje':
|
||||
# word_id = '.'.join(match['1'].id.split('.')[:-1])
|
||||
# print(f"ID: {word_id}")
|
||||
# print(' '.join([w.text for w in words if '.'.join(w.id.split('.')[:-1]) == word_id]))
|
||||
|
||||
return matches
|
||||
|
||||
|
||||
Reference in New Issue
Block a user