change jupiter to python

This commit is contained in:
s440058 2021-06-20 20:12:02 +02:00
parent 1a73dbcdf0
commit 0eb71c75cf
3 changed files with 947 additions and 22641 deletions

22639
ner.ipynb

File diff suppressed because it is too large Load Diff

4
seq.py
View File

@ -192,13 +192,13 @@ def main():
dev_ex[0] = dev_ex[0].map(split) dev_ex[0] = dev_ex[0].map(split)
dev_ex[0] = dev_ex[0].map(replace) dev_ex[0] = dev_ex[0].map(replace)
dev_labels = labels_process(dev_ex[0]) dev_labels = labels_process(dev_ex[0])
dev_tokens_ids = data_process(dev_in[0]) dev_tokens_ids = data_process(dev_in[0], vocab)
result_dev = eval_dev(nn_model, dev_tokens_ids, dev_labels, ner_model) result_dev = eval_dev(nn_model, dev_tokens_ids, dev_labels, ner_model)
#test #test
test_in = get_data(DATA_PATH[3]) test_in = get_data(DATA_PATH[3])
test_in[0] = test_in[0].map(split) test_in[0] = test_in[0].map(split)
test_tokens_ids = data_process(test_in[0]) test_tokens_ids = data_process(test_in[0], vocab)
result_test = eval_test(nn_model, test_tokens_ids, ner_model) result_test = eval_test(nn_model, test_tokens_ids, ner_model)
#results #results

945
train/train.tsv Normal file

File diff suppressed because one or more lines are too long