Redmine #1487: error message fix
This commit is contained in:
parent
c9553b3c29
commit
7bf4903154
|
@ -87,7 +87,7 @@ class Runner:
|
||||||
tagged_columns = tagged_line.split('\t')
|
tagged_columns = tagged_line.split('\t')
|
||||||
assert len(classla_columns) == 10, 'Missing token in classla-generated conllu ({}).'.format(len(tagged_line))
|
assert len(classla_columns) == 10, 'Missing token in classla-generated conllu ({}).'.format(len(tagged_line))
|
||||||
assert len(tagged_columns) == 10, 'Missing token in pre-tagged conllu ({}).'.format(len(classla_line))
|
assert len(tagged_columns) == 10, 'Missing token in pre-tagged conllu ({}).'.format(len(classla_line))
|
||||||
assert classla_columns[1] == tagged_columns[1], 'Pre-tagged token form ({}) does not match classla-generated token form ({}).'.format(classla_tokens[0], tagged_columns[0])
|
assert classla_columns[1] == tagged_columns[1], 'Pre-tagged token form ({}) does not match classla-generated token form ({}).'.format(classla_columns[1], tagged_columns[1])
|
||||||
merged_columns = [classla_columns[i] if i in (3,5,9) else tagged_columns[i] for i in range(10)]
|
merged_columns = [classla_columns[i] if i in (3,5,9) else tagged_columns[i] for i in range(10)]
|
||||||
merged_line = '\t'.join(merged_columns)
|
merged_line = '\t'.join(merged_columns)
|
||||||
merged_conllu_file.write(merged_line + '\n')
|
merged_conllu_file.write(merged_line + '\n')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user