compnet-renard/bert-base-cased-literary-coref
This model should be used with Tibert, a BERT-based end-to-end coreference solver.
Example code:
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.
Performance
The following table presents the results we obtained on Litbank by training this model. We evaluate on 10% of Litbank documents, each of which consists of ~2000 tokens. The split column indicate whether documents were split in blocks of 512 tokens. The HM coumns indicates whether we use hierarchical merging. Time is measured on cpu inference.
compnet-renard/bert-base-cased-literary-coref
| Dataset | Base model | split | HM | MUC | B3 | CEAF | BLANC | LEA | time (m:s) |
|---|---|---|---|---|---|---|---|---|---|
| Litbank | bert-base-cased |
no | no | 75.03 | 60.66 | 48.71 | 62.96 | 32.84 | 01:40 |
| Litbank | bert-base-cased |
yes | no | 73.84 | 49.14 | 47.88 | 48.41 | 27.63 | 00:57 |
| Litbank | bert-base-cased |
yes | yes | 74.54 | 59.30 | 46.98 | 62.69 | 42.46 | 01:36 |