cfmrp / mtool

Software to Manipulate Different Flavors of Semantic Graphs
http://mrp.nlpl.eu
GNU Lesser General Public License v3.0
51 stars 24 forks source link

error in the evaluation mrp with EDS format #78

Closed arademaker closed 4 years ago

arademaker commented 4 years ago

The two files are identical, 1.eds contains:

#12
{e2:
 x3:pron<0:2>{x PERS 3, NUM sg, GEND n, PT std}[]
 _1:pronoun_q<0:2>[BV x3]
 e2:_rainning/vbg_u_unknown<6:14>{e SF prop, TENSE pres, MOOD indicative, PROG +, PERF -}[ARG1 x3]
 e9:loc_nonsp<15:21>{e SF prop, TENSE untensed, MOOD indicative, PROG -, PERF -}[ARG1 e2, ARG2 x10]
 x10:time_n<15:20>{x PERS 3, NUM sg}[]
 _2:def_implicit_q<15:20>[BV x10]
 e15:_today_a_1<15:20>{e SF prop, TENSE untensed, MOOD indicative, PROG -, PERF -}[ARG1 x10]
}

The error

% ./main.py --read eds --score mrp --gold 1.eds 2.eds
Traceback (most recent call last):
  File "./main.py", line 472, in <module>
    main();
  File "./main.py", line 385, in main
    result = score.mces.evaluate(gold, graphs,
  File "/Users/ar/hpsg/mtool/score/mces.py", line 493, in evaluate
    for id, g, s, tops, labels, properties, anchors, \
  File "/Users/ar/hpsg/mtool/score/mces.py", line 490, in <genexpr>
    results = (schedule(g, s, rrhc_limit, mces_limit, trace, errors)
  File "/Users/ar/hpsg/mtool/score/mces.py", line 441, in schedule
    raise e;
  File "/Users/ar/hpsg/mtool/score/mces.py", line 389, in schedule
    = g.score(s, mapping);
  File "/Users/ar/hpsg/mtool/graph.py", line 856, in score
    = tuples(self, identities1);
  File "/Users/ar/hpsg/mtool/graph.py", line 771, in tuples
    anchors.add((identity, anchor));
TypeError: unhashable type: 'list'
arademaker commented 4 years ago

Oh, the problem was solved in one of the recent commits, I didn't get error with:

 for f in `mrp edm sdp smatch ucca`; do ./main.py --read eds --score $f --gold 1.eds 2.eds; done
oepen commented 4 years ago

yes, sometimes we take a proactive approach to supporting mtool users :-)!

nb: the echo in your command line seems unnecessary.

arademaker commented 4 years ago

Indeed, I forgot to remove the echo and ended up failing to impress you with my bash scripting abilities! đŸ¤£