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

Anchoring normalization results in empty character range (from==to) #84

Open danielhers opened 3 years ago

danielhers commented 3 years ago

When normalizing graph 20010012 for EDS, node 5 is originally anchored to character 19 (from=19, to=20), but after normalization, the anchor sequence is empty (from=to=20). This seems to be a bug in the anchoring normalization code: https://github.com/cfmrp/mtool/blob/eda24cf5932527caccda220066630fd8d72fdcf1/graph.py#L85-L112

The print in line 110 shows when running it, printing: [{'from': 20, 'to': 20}] ==> [] [Then, in the guests' honor, the speedway hauled out four drivers, crews and even the official Indianapolis 500 announcer for a 10-lap exhibition race.]

I think it might be because the apostrophe character, which comprises the whole anchor, is considered a space character.