Skip to content

Conversation

@Entenzahn
Copy link

Includes the POTATO side of changes made to enable relationship entity tagging for graphs and using those tags for matching.
Especially with the graph creation methods I'm sure there is some potential to better integrate it into the existing ecosystem but this is what worked for me in the moment.

# For my conversions I have been using the amrlib 0.8.0 xfm bart large model
amr_stog = amrlib.load_stog_model()
# Load the same spacy model that TUW NLP uses to build the graphs to get a comparable mapping
spacy_nlp = spacy.load('en_core_web_sm')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like we are loading/doing the parsing redundantly. I think if this information is not available from the AMR graph the TUW library provides, we should modify that code instead and just call it here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, then we would need to adapt the AMRGraph class itself. Currently, it does not provide a link from token to character position in the source text, and that is generally how entities are marked. That's why the spacy method is called again, so we can reproduce the source text to token mapping that is usually done within the AMR Graph conversion process.

Copy link
Owner

@adaamko adaamko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the code, I left a comment about loading the models here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants