keep node names/node identifiers in grew grep
The output of grew grep
(at least for graphs declared using the grew format) refers to node with internal identifiers, not with the ones that are given in the grew file.
Example:
with example.gr
being:
graph {
Noeud1 [vocable="toto"];
Noeud2 [vocable="titi"];
Noeud1 -[forme]-> Noeud2;
}
and pattern-example
being:
pattern {N -[forme]-> M}
then
grew grep -pattern pattern-example -i example.gr
returns:
[ { "sent_id": "example.gr", "matching": { "N": "0", "M": "1" } } ]
It would be more useful to have something like:
[ { "sent_id": "example.gr", "matching": { "N": "Noeud1", "M": "Noeud2" } } ]