File size: 795 Bytes
9d7111e 38a53f9 9d7111e 38a53f9 5d70bde 38a53f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
---
license: mit
language:
- en
---
# compnet-renard/bert-base-cased-literary-coref
This model should be used with [Tibert](https://github.com/CompNet/Tibert), a BERT-based end-to-end coreference solver.
Example code:
```python
from tibert import BertForCoreferenceResolution, predict_coref_simple
from tibert.utils import pprint_coreference_document
from transformers import BertTokenizerFast
model = BertForCoreferenceResolution.from_pretrained(
"compnet-renard/bert-base-cased-literary-coref"
)
tokenizer = BertTokenizerFast.from_pretrained("bert-base-cased")
coref_out = predict_coref_simple(
"Sli did not want the earpods. He didn't like them.", model, tokenizer
)
pprint_coreference_document(coref_out)
```
`>>> (0 Sli ) did not want the earpods. (0 He ) didn't like them.` |