readme: minor example fix
Browse files
README.md
CHANGED
@@ -80,16 +80,16 @@ ner = pipeline(task="ner",
|
|
80 |
tokenizer=tokenizer,
|
81 |
trust_remote_code=True)
|
82 |
|
83 |
-
print(ner("George Washington
|
84 |
```
|
85 |
|
86 |
This outputs:
|
87 |
|
88 |
```json
|
89 |
[
|
90 |
-
{'entity': 'B-PER', 'score': 0.
|
91 |
-
{'entity': 'I-PER', 'score': 0.
|
92 |
-
{'entity': 'B-LOC', 'score': 0.
|
93 |
-
{'entity': 'B-LOC', 'score': 0.
|
94 |
]
|
95 |
```
|
|
|
80 |
tokenizer=tokenizer,
|
81 |
trust_remote_code=True)
|
82 |
|
83 |
+
print(ner("George Washington went to Washington in the US."))
|
84 |
```
|
85 |
|
86 |
This outputs:
|
87 |
|
88 |
```json
|
89 |
[
|
90 |
+
{'entity': 'B-PER', 'score': 0.99981505, 'index': 1, 'word': 'george', 'start': 0, 'end': 6},
|
91 |
+
{'entity': 'I-PER', 'score': 0.9997435, 'index': 2, 'word': 'washington', 'start': 7, 'end': 17},
|
92 |
+
{'entity': 'B-LOC', 'score': 0.99955124, 'index': 5, 'word': 'washington', 'start': 26, 'end': 36},
|
93 |
+
{'entity': 'B-LOC', 'score': 0.99958867, 'index': 8, 'word': 'us', 'start': 44, 'end': 46}
|
94 |
]
|
95 |
```
|