coref icon indicating copy to clipboard operation
coref copied to clipboard

Code to go from clusters to transformed document

Open griff4692 opened this issue 3 years ago • 2 comments

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?

griff4692 avatar Jul 23 '20 19:07 griff4692

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.

mandarjoshi90 avatar Jul 24 '20 00:07 mandarjoshi90

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

griff4692 avatar Jul 24 '20 17:07 griff4692