The delphin.edm plugin has been bundled into PyDelphin as of version 1.7.0. This repository will now be archived and further development should happen in PyDelphin.
Elementary Dependency Matching (EDM; Dridan and Oepen, 2011) is a metric for comparing two semantic dependency graphs that annotate the same sentence. It requires that each node is aligned to a character span in the original sentence.
The newer smatch metric is essentially the same except that instead of relying on surface-aligned nodes it finds a mapping of nodes that optimizes the number of matching triples. The search uses stochastic hill-climbing, whereas EDM gives deterministic results.
This module works with Python 3.6 and higher, and it is a namespace package of PyDelphin.
This module can be installed via
pip:$ git clone https://github.com/delph-in/delphin.edm.git $ pip install delphin.edm/Once installed,
edmis a subcommand of PyDelphin'sdelphincommand. The basic usage is:$ delphin edm GOLD TEST
GOLDandTESTmay be files containing serialized semantic representations or [incr tsdb()] test suites containing parsed analyses.For example:
$ delphin edm test/kim.gold.eds test/kim.test.eds Precision: 0.9344262295081968 Recall: 0.9193548387096774 F-score: 0.9268292682926829Per-item information can be printed by increasing the logging verbosity to the
INFOlevel (-vv). Weights for the different classes of triples can be adjusted with-Afor argument structure,-Nfor node names,-Pfor node properties,-Cfor constants, and-Tfor graph tops. Trydelphin edm --helpfor more information.Following the mtool implementation,
delphin.edmtreats constant arguments (CARG) as independent triples, however unlike mtool they get their own category and weight.delphin.edmalso follows mtool in checking if the graph tops are the same, also with their own category and weight. One can therefore get the same results as Dridan and Oepen, 2011 by setting the weights for top-triples and constant-triples to 0:$ delphin edm -C0 -T0 GOLD TEST
delphin.edmcan optionally ignore missing items on the gold side, the test side, or both. Missing items can occur whenGOLDorTESTare files with different numbers of representations, or when they are [incr tsdb()] test suites with different numbers of analyses per item. For example, to ignore pairs where the gold representation is missing, do the following:$ delphin edm --ignore-missing=gold GOLD TESTWhile EDM was designed for the semantic dependencies extracted from Elementary Dependency Structures (EDS), it can be used for other representations as long as they have surface alignments for the nodes. This implementation can natively work with a variety of DELPH-IN representations and formats via the
--formatoption, including those for Minimal Recursion Semantics (MRS) and Dependency Minimal Recursion Semantics (DMRS). Non-DELPH-IN representations are also possible as long as they can be serialized into one of these formats.
Rebecca Dridan's original Perl version (see http://moin.delph-in.net/ElementaryDependencyMatch):
$ svn co http://svn.delph-in.net/mu/evaluation/EDM/trunkmtool: created for the 2019 CoNLL shared task on Meaning Representation Parsing
As part of [incr tsdb()]
As part of DeepDeepParser