Compare DMRS?

There are methods in pydelphin to compare MRS; there is no such method to compare DMRS though? Or am I not looking in the right place.

According to @bond and @arademaker , an dmrs is not lossy with respect to an mrs, and therefore the mrs comparison functions can be used.

Following up here, the MRS functions like is_isomorphic() work but you’ll need to first convert the DMRS to MRS. Otherwise you can use similarity metrics like EDM, assuming you have compatible surface alignments (CFROM / CTO), or Smatch, if you first encode the DMRS in the PENMAN format.

I start with MRS. But exact match is too strict so yes, ultimately I want to use EDM. What do you mean by having compatible alignments? Is there an example of that somewhere? I am not familiar with Smatch. Where does the encoding in the PENMAN format comes in?..

EDM relies on looking at CFROM and CTO values to align EPs for comparison. If your grammar’s tokenization system has changed (such as the recent ERG changes compared to earlier versions), or if you used a processor that didn’t record surface alignments or a grammar that doesn’t use token mapping, then you’ll see <-1:-1> as the alignments for your EPs, and EDM will not work.

Smatch is a similarity metric created for AMR (which is why the PENMAN serialization is required), but aside from the node alignment strategy (which for Smatch is hill-climbing with random restarts to find the ~best alignment), it’s basically the same thing as EDM. If you do not have good surface alignments for both your gold and test profiles, you might try using Smatch. PyDelphin has PENMAN serializations for DMRS (dmrs-penman) and EDS (eds-penman).