mandarjoshi90 / coref

BERT for Coreference Resolution
Apache License 2.0
445 stars 93 forks source link

Code to go from clusters to transformed document #61

Open griff4692 opened 4 years ago

griff4692 commented 4 years ago

Is there code to go from "The dog wagged its tail" --> "The dog wagged the dog's tail"?

Basically, go from clusters to head prediction and then replacement of mentions with heads?

mandarjoshi90 commented 4 years ago

Not in this repo, no. But if you look at the output prediction files (*.jsonlines), you should be able to do this easily since it contains coreferent span clusters.

griff4692 commented 4 years ago

Thanks for replying! I'm cross referencing this post on allennllp https://github.com/allenai/allennlp/issues/4503

Please see my solution resolve_coref_clusters.py