Skip to content

Triggers aren't converted to Bio- or Coref-Mentions and don't survive serialization #785

@kwalcock

Description

@kwalcock

It looks very much like any BioEventMention or CorefEventMention that is deserialized is forced to have a BioTextBoundMention or CorefTextBoundMention as a trigger:

toBioMention(mjson \ "trigger", docMap).toBioMention.asInstanceOf[BioTextBoundMention],

toCorefMention(mjson \ "trigger", docMap).toCorefMention.asInstanceOf[CorefTextBoundMention],

However, when the BioEventMention or CorefEventMention is created, the TextBoundMention in the trigger is not converted similarly:

This might cause many problems, but one is that a serialized and then deserialized Bio- or CorefEventMention will have its trigger change type from a simple TextBoundMention to a more specific one so that the round trip is essentially invalid. A newly enabled but old test confirms this.

Those lines should probably be changed to

          m.trigger.toBioMention.asInstanceOf[BioTextBoundMention],

and

          m.trigger.toCorefMention.asInstanceOf[CorefTextBoundMention],

It would be good for others who know more about this project to confirm the intention of the original design and consider whether the change would cause problems. Thanks.

FYI @enoriega, @MihaiSurdeanu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions