|
# Vietnam Tourism Named Entity Recognition |
|
We fine-tuned BERT to train Vietnam tourism dataset for a question answering system. The model was called NER2QUES because it detected tourism NER in a sentence. From that, the system generated questions corresponding to NER types. |
|
# How to use |
|
You can use the model directly with a pipeline |
|
from simpletransformers.ner import NERModel, NERArgs |
|
|
|
line = "King Garden is located in Thanh Thuy, Phu Tho" |
|
model_name = 'truongphan/vntourismNER' |
|
custom_labels = [ |
|
"O", "B-TA", "I-TA", "B-PRO", "I-PRO", "B-TEM", "I-TEM", "B-COM", "I-COM", "B-PAR", "I-PAR", "B-CIT", "I-CIT", |
|
"B-MOU", "I-MOU", "B-HAM", "I-HAM", "B-AWA", "I-AWA", "B-VIS", "I-VIS", "B-FES", "I-FES", "B-ISL", "I-ISL", |
|
"B-TOW", "I-TOW", "B-VIL", "I-VIL", "B-CHU", "I-CHU", "B-PAG", "I-PAG", "B-BEA", "I-BEA", "B-WAR", "I-WAR", |
|
"B-WAT", "I-WAT", "B-SA", "I-SA", "B-SER", "I-SER", "B-STR", "I-STR", "B-NUN", "I-NUN", "B-PAL", "I-PAL", |
|
"B-VOL", "I-VOL", "B-HIL", "I-HIL", "B-MAR", "I-MAR", "B-VAL", "I-VAL", "B-PROD", "I-PROD", "B-DIS", "I-DIS", |
|
"B-FOO", "I-FOO", "B-DISH", "I-DISH", "B-DRI", "I-DRI" |
|
] |
|
|
|
model_args = NERArgs() |
|
model = NERModel("bert", model_name, args=model_args, labels=custom_labels) |
|
l.append(line) |
|
predictions, raw_outputs = model.predict(l) |
|
print(predictions) |
|
|
|
# Authors |
|
|
|
1. Phuc Do, University of Information Technology, Ho Chi Minh national university, Vietnam |
|
2. Truong H. V. Phan, Van Lang university, Ho Chi Minh city, Vietnam |
|
|