Conversation
| # 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') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
adaamko
left a comment
There was a problem hiding this comment.
Hey thanks for the code, I left a comment about loading the models here.
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.