truongphan
commited on
Commit
•
d270279
1
Parent(s):
e1f9165
Update README.md
Browse files
README.md
CHANGED
@@ -1,30 +1,19 @@
|
|
1 |
# Vietnam Tourism Named Entity Recognition
|
2 |
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.
|
3 |
# How to use
|
4 |
-
## You can use
|
5 |
-
|
6 |
-
|
7 |
-
from simpletransformers.ner import NERModel, NERArgs
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
"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",
|
13 |
-
"B-MOU", "I-MOU", "B-HAM", "I-HAM", "B-AWA", "I-AWA", "B-VIS", "I-VIS", "B-FES", "I-FES", "B-ISL", "I-ISL",
|
14 |
-
"B-TOW", "I-TOW", "B-VIL", "I-VIL", "B-CHU", "I-CHU", "B-PAG", "I-PAG", "B-BEA", "I-BEA", "B-WAR", "I-WAR",
|
15 |
-
"B-WAT", "I-WAT", "B-SA", "I-SA", "B-SER", "I-SER", "B-STR", "I-STR", "B-NUN", "I-NUN", "B-PAL", "I-PAL",
|
16 |
-
"B-VOL", "I-VOL", "B-HIL", "I-HIL", "B-MAR", "I-MAR", "B-VAL", "I-VAL", "B-PROD", "I-PROD", "B-DIS", "I-DIS",
|
17 |
-
"B-FOO", "I-FOO", "B-DISH", "I-DISH", "B-DRI", "I-DRI"
|
18 |
-
]
|
19 |
|
20 |
-
|
21 |
-
|
|
|
22 |
l.append(line)
|
|
|
23 |
predictions, raw_outputs = model.predict(l)
|
24 |
print(predictions)
|
25 |
-
|
26 |
-
## You can use in Transformers
|
27 |
-
|
28 |
|
29 |
|
30 |
# Authors
|
|
|
1 |
# Vietnam Tourism Named Entity Recognition
|
2 |
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.
|
3 |
# How to use
|
4 |
+
## You can use in Transformers
|
|
|
|
|
|
|
5 |
|
6 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
7 |
+
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained("truongphan/vntourismNER")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
model = AutoModelForTokenClassification.from_pretrained("truongphan/vntourismNER")
|
11 |
+
|
12 |
+
line = "King Garden is located in Thanh Thuy, Phu Tho"
|
13 |
l.append(line)
|
14 |
+
|
15 |
predictions, raw_outputs = model.predict(l)
|
16 |
print(predictions)
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
# Authors
|