Skip to content

Conversation

@michnov
Copy link
Contributor

@michnov michnov commented Feb 27, 2021

doc.nodes iterates only over overt nodes, which results in no coreference information loaded for empty nodes.
This fixes it, as iteration over doc.nodes is replaced with an iteration over doc.trees and a nested iteration over tree.descendants_and_empty. Another way to fix it is to introduce a method of the Document class that would do the same.

I have replaced it in two places to ensure that the following actions are performed even for the empty nodes:

  1. load_coref_from_misc: ensures that coreference is loaded from MISC
  2. store_coref_to_misc: ensures that previous coreference-related MISC features are deleted before writing the new ones
@michnov michnov mentioned this pull request Feb 27, 2021
martinpopel added a commit that referenced this pull request Feb 28, 2021
@martinpopel
Copy link
Contributor

Thanks a lot for this, @michnov.
In the end, I've decided to introduce doc.nodes_and_empty. I am not sure about the name, but it seems such a method/property may be useful.

martinpopel added a commit that referenced this pull request Feb 28, 2021
@michnov michnov deleted the bug_zero_mentions_not_in_clusters branch February 28, 2021 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants