tomaarsen HF staff commited on
Commit
e1eba79
1 Parent(s): c2633c9

Add limitation due to RoBERTa

Browse files
Files changed (1) hide show
  1. README.md +14 -0
README.md CHANGED
@@ -76,4 +76,18 @@ model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-roberta-large-ont
76
  entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
77
  ```
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  See the [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) repository for documentation and additional information on this library.
 
76
  entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
77
  ```
78
 
79
+ ### Limitations
80
+
81
+ **Warning**: This model works best when punctuation is separated from the prior words, so
82
+ ```python
83
+ # ✅
84
+ model.predict("He plays J. Robert Oppenheimer , an American theoretical physicist .")
85
+ # ❌
86
+ model.predict("He plays J. Robert Oppenheimer, an American theoretical physicist.")
87
+
88
+ # You can also supply a list of words directly: ✅
89
+ model.predict(["He", "plays", "J.", "Robert", "Oppenheimer", ",", "an", "American", "theoretical", "physicist", "."])
90
+ ```
91
+ The same may be beneficial for some languages, such as splitting `"l'ocean Atlantique"` into `"l' ocean Atlantique"`.
92
+
93
  See the [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) repository for documentation and additional information on this library.