abbasmahmudiai
commited on
Commit
•
33aec36
1
Parent(s):
0bd1a97
Update README.md
Browse files
README.md
CHANGED
@@ -6,8 +6,11 @@ language:
|
|
6 |
pipeline_tag: token-classification
|
7 |
---
|
8 |
Named entity recognition On Persian dataset
|
|
|
9 |
traindataset=20484 persian sentense
|
|
|
10 |
valdataset=2561
|
|
|
11 |
AutoTokenizer=HooshvareLab/bert-fa-base-uncased
|
12 |
|
13 |
ner_tags=
|
@@ -26,10 +29,15 @@ ner_tags=
|
|
26 |
|
27 |
training_args=
|
28 |
learning_rate=2e-5,
|
|
|
29 |
per_device_train_batch_size=16,
|
|
|
30 |
per_device_eval_batch_size=16,
|
|
|
31 |
num_train_epochs=4,
|
|
|
32 |
weight_decay=0.01
|
|
|
33 |
|
34 |
Training Loss=0.001000
|
35 |
|
@@ -43,4 +51,19 @@ sample2:
|
|
43 |
'entity': 'B-pers',
|
44 |
'score': 0.99988234,
|
45 |
'index': 2,
|
46 |
-
'word': 'عباس',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
pipeline_tag: token-classification
|
7 |
---
|
8 |
Named entity recognition On Persian dataset
|
9 |
+
|
10 |
traindataset=20484 persian sentense
|
11 |
+
|
12 |
valdataset=2561
|
13 |
+
|
14 |
AutoTokenizer=HooshvareLab/bert-fa-base-uncased
|
15 |
|
16 |
ner_tags=
|
|
|
29 |
|
30 |
training_args=
|
31 |
learning_rate=2e-5,
|
32 |
+
|
33 |
per_device_train_batch_size=16,
|
34 |
+
|
35 |
per_device_eval_batch_size=16,
|
36 |
+
|
37 |
num_train_epochs=4,
|
38 |
+
|
39 |
weight_decay=0.01
|
40 |
+
|
41 |
|
42 |
Training Loss=0.001000
|
43 |
|
|
|
51 |
'entity': 'B-pers',
|
52 |
'score': 0.99988234,
|
53 |
'index': 2,
|
54 |
+
'word': 'عباس',
|
55 |
+
|
56 |
+
|
57 |
+
for use this model:
|
58 |
+
|
59 |
+
from transformers import pipeline
|
60 |
+
|
61 |
+
pipe = pipeline("token-classification", model="NLPclass/Named_entity_recognition_persian")
|
62 |
+
|
63 |
+
sentence = ""
|
64 |
+
|
65 |
+
predicted_ner = pipe(sentence)
|
66 |
+
|
67 |
+
for entity in predicted_ner:
|
68 |
+
|
69 |
+
print(f"Entity: {entity['word']}, Label: {entity['entity']}")
|