Views
No views yet
span_marker library:pip install span_marker1from span_marker import SpanMarkerModel
2
3# Download from the 🤗 Hub
4model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-xlm-roberta-large-verbs")
5# Run inference
6entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")| Training Loss | Epoch | Step | Validation Loss | Overall Precision | Overall Recall | Overall F1 | Overall Accuracy |
|---|---|---|---|---|---|---|---|
| 0.036 | 0.61 | 1000 | 0.0151 | 0.9911 | 0.9733 | 0.9821 | 0.9956 |
| 0.0126 | 1.22 | 2000 | 0.0131 | 0.9856 | 0.9864 | 0.9860 | 0.9965 |
| 0.0175 | 1.83 | 3000 | 0.0154 | 0.9735 | 0.9894 | 0.9814 | 0.9953 |
| 0.0115 | 2.45 | 4000 | 0.0172 | 0.9821 | 0.9871 | 0.9845 | 0.9962 |
1# ✅
2model.predict("He plays J. Robert Oppenheimer , an American theoretical physicist .")
3# ❌
4model.predict("He plays J. Robert Oppenheimer, an American theoretical physicist.")
5
6# You can also supply a list of words directly: ✅
7model.predict(["He", "plays", "J.", "Robert", "Oppenheimer", ",", "an", "American", "theoretical", "physicist", "."])"l'ocean Atlantique" into "l' ocean Atlantique".