Information about Embeddings in the Allen Coreference Model

127 Views Asked by At

I'm an Italian student approaching the NLP world. First of all I'd like to thank you for the amazing work you've done with the paper " Higher-order Coreference Resolution with Coarse-to-fine Inference". I am using the model provided by allennlp library and I have two questions for you.

  1. in https://demo.allennlp.org/coreference-resolution it is written that the embedding used is SpanBERT. Is this a BERT embedding trained regardless of the coreference task? I mean, could I possibly use this embedding just as a pretrained model on the english language to embed sentences? (e.g. like https://huggingface.co/facebook/bart-base )

  2. is it possible to modify the code in order to return, along with the coreference prediction, also the aforementioned embeddings of each sentence?

I really hope you can help me. Meanwhile I thank you in advance for your great availability. Sincerely, Emanuele Gusso

1

There are 1 best solutions below

0
Dirk Groeneveld On

SpanBERT is a version of BERT pre-trained to produce useful embeddings on text spans. SpanBERT itself has nothing to do with coreference resolution. The original paper is https://arxiv.org/abs/1907.10529, and the original source code is https://github.com/facebookresearch/SpanBERT, though you might have an easier time using the huggingface version at https://huggingface.co/SpanBERT.

It is definitely possible to get the embeddings as output, along with the coreference predictions. I recommend cloning https://github.com/allenai/allennlp-models, getting it to run in your environment, and then changing the code until it gives you the output you want.