Commit
•
0f55d8a
1
Parent(s):
522e605
Update README.md
Browse files
README.md
CHANGED
@@ -110,53 +110,11 @@ This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model trained
|
|
110 |
from span_marker import SpanMarkerModel
|
111 |
|
112 |
# Download from the 🤗 Hub
|
113 |
-
model = SpanMarkerModel.from_pretrained("
|
114 |
# Run inference
|
115 |
entities = model.predict("גרוסבורד נהג לבדו ב ה מכונית, ב דרכו מ ה עיר מיניאפוליס ב אינדיאנה ל נמל ה תעופה של היא.")
|
116 |
```
|
117 |
|
118 |
-
### Downstream Use
|
119 |
-
You can finetune this model on your own dataset.
|
120 |
-
|
121 |
-
<details><summary>Click to expand</summary>
|
122 |
-
|
123 |
-
```python
|
124 |
-
from span_marker import SpanMarkerModel, Trainer
|
125 |
-
|
126 |
-
# Download from the 🤗 Hub
|
127 |
-
model = SpanMarkerModel.from_pretrained("span_marker_model_id")
|
128 |
-
|
129 |
-
# Specify a Dataset with "tokens" and "ner_tag" columns
|
130 |
-
dataset = load_dataset("conll2003") # For example CoNLL2003
|
131 |
-
|
132 |
-
# Initialize a Trainer using the pretrained model & dataset
|
133 |
-
trainer = Trainer(
|
134 |
-
model=model,
|
135 |
-
train_dataset=dataset["train"],
|
136 |
-
eval_dataset=dataset["validation"],
|
137 |
-
)
|
138 |
-
trainer.train()
|
139 |
-
trainer.save_model("span_marker_model_id-finetuned")
|
140 |
-
```
|
141 |
-
</details>
|
142 |
-
|
143 |
-
<!--
|
144 |
-
### Out-of-Scope Use
|
145 |
-
|
146 |
-
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
147 |
-
-->
|
148 |
-
|
149 |
-
<!--
|
150 |
-
## Bias, Risks and Limitations
|
151 |
-
|
152 |
-
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
153 |
-
-->
|
154 |
-
|
155 |
-
<!--
|
156 |
-
### Recommendations
|
157 |
-
|
158 |
-
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
159 |
-
-->
|
160 |
|
161 |
## Training Details
|
162 |
|
|
|
110 |
from span_marker import SpanMarkerModel
|
111 |
|
112 |
# Download from the 🤗 Hub
|
113 |
+
model = SpanMarkerModel.from_pretrained("iahlt/span-marker-xlm-roberta-base-nemo-mt-he")
|
114 |
# Run inference
|
115 |
entities = model.predict("גרוסבורד נהג לבדו ב ה מכונית, ב דרכו מ ה עיר מיניאפוליס ב אינדיאנה ל נמל ה תעופה של היא.")
|
116 |
```
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
## Training Details
|
120 |
|