Update README.md
Browse files
README.md
CHANGED
@@ -54,15 +54,32 @@ It achieves the following results on the evaluation set:
|
|
54 |
|
55 |
More information needed
|
56 |
|
57 |
-
##
|
58 |
|
59 |
-
|
|
|
60 |
|
61 |
-
|
|
|
62 |
|
63 |
-
More information needed
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
### Training hyperparameters
|
68 |
|
|
|
54 |
|
55 |
More information needed
|
56 |
|
57 |
+
## How to Use
|
58 |
|
59 |
+
```python
|
60 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
|
61 |
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained("JoshuaAAX/bert-finetuned-ner")
|
63 |
+
model = AutoModelForTokenClassification.from_pretrained("JoshuaAAX/bert-finetuned-ner")
|
64 |
|
|
|
65 |
|
66 |
+
text = "La Federación nacional de cafeteros de Colombia es una entidad del estado. El primer presidente el Dr Augusto Guerra contó con el aval de la Asociación Colombiana de Aviación."
|
67 |
+
|
68 |
+
|
69 |
+
ner_pipeline= pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="max")
|
70 |
+
ner_pipeline(text)
|
71 |
+
```
|
72 |
+
|
73 |
+
## Training data
|
74 |
+
|
75 |
+
| Abbreviation | Description |
|
76 |
+
|:-------------:|:-------------:|
|
77 |
+
| O | Outside of NE |
|
78 |
+
| PER | Person’s name |
|
79 |
+
| ORG | Organization |
|
80 |
+
| LOC | Location |
|
81 |
+
| MISC | Miscellaneous |
|
82 |
+
|
83 |
|
84 |
### Training hyperparameters
|
85 |
|