Update 'NLU_lab_7-8/main.py'
This commit is contained in:
parent
8b9d005112
commit
41530dae94
@ -38,9 +38,9 @@ def predict(model, sentence):
|
|||||||
return [(token, ftoken.get_tag('slot').value) for token, ftoken in zip(sentence, fsentence)]
|
return [(token, ftoken.get_tag('slot').value) for token, ftoken in zip(sentence, fsentence)]
|
||||||
|
|
||||||
|
|
||||||
with open('train-pl-all.conllu', encoding='utf-8') as trainfile:
|
with open('train-pl-full.conllu', encoding='utf-8') as trainfile:
|
||||||
trainset = list(parse_incr(trainfile, fields=fields, field_parsers={'slot': nolabel2o}))
|
trainset = list(parse_incr(trainfile, fields=fields, field_parsers={'slot': nolabel2o}))
|
||||||
with open('test-pl-all.conllu', encoding='utf-8') as testfile:
|
with open('test-pl-full.conllu', encoding='utf-8') as testfile:
|
||||||
testset = list(parse_incr(testfile, fields=fields, field_parsers={'slot': nolabel2o}))
|
testset = list(parse_incr(testfile, fields=fields, field_parsers={'slot': nolabel2o}))
|
||||||
|
|
||||||
random.seed(42)
|
random.seed(42)
|
||||||
|
Loading…
Reference in New Issue
Block a user