grew issueshttps://gitlab.inria.fr/grew/grew/-/issues2017-12-22T14:23:22+01:00https://gitlab.inria.fr/grew/grew/-/issues/1Trait qui empêche l'application d'une règle2017-12-22T14:23:22+01:00GUILLAUME BrunoTrait qui empêche l'application d'une règle[Ouvert par Guy sur GForge]
Dans le grs pour passer de UD à EnhancedUD, dans la règle "main_subj_to_xcomp-inf", la présence du trait "VerbForm=Inf" empêche l'application de la règle à phrase de la miniref "annodis-90".
* [grs.zip](/...[Ouvert par Guy sur GForge]
Dans le grs pour passer de UD à EnhancedUD, dans la règle "main_subj_to_xcomp-inf", la présence du trait "VerbForm=Inf" empêche l'application de la règle à phrase de la miniref "annodis-90".
* [grs.zip](/uploads/71502a48ad66416253d5ea322a13c262/grs.zip)
* [annodis.er_00090.conll](/uploads/634d04f8ae748d8901ab3cec3dc58938/annodis.er_00090.conll)GUILLAUME BrunoGUILLAUME Brunohttps://gitlab.inria.fr/grew/grew/-/issues/2Add a new syntax for add_edge command2017-12-22T14:23:22+01:00GUILLAUME BrunoAdd a new syntax for add_edge commandAdd the possibility to "copy" a edge label.
The command `add_edge e: X -> Y` means "add an edge from node `X` to node `Y`with the same label than the edge matched with name `e` in the pattern".Add the possibility to "copy" a edge label.
The command `add_edge e: X -> Y` means "add an edge from node `X` to node `Y`with the same label than the edge matched with name `e` in the pattern".GUILLAUME BrunoGUILLAUME Brunohttps://gitlab.inria.fr/grew/grew/-/issues/3Bug in GUI with graphviz 2.402017-12-07T10:14:37+01:00GUILLAUME BrunoBug in GUI with graphviz 2.40The output svg format changes with graphviz 2.40 and the GUI (left part with rewriting history) is broken.
Attached the output of the two versions on the same input:
```
digraph G {
node [fontname=Arial];
ranksep=0.01;
nodese...The output svg format changes with graphviz 2.40 and the GUI (left part with rewriting history) is broken.
Attached the output of the two versions on the same input:
```
digraph G {
node [fontname=Arial];
ranksep=0.01;
nodesep=0.04
node_mod_0_0 [label="", fontcolor=transparent, color=transparent]
node_mod_0 [label="init"]
{rank=same; G0; node_mod_0_0}
node_mod_0_0 -> G0 [color=transparent]
node_mod_0_0 -> node_mod_0 [color=transparent]
G0 [shape=box, label="G0", style=filled, fillcolor="#35FF5C"]
node_mod_1_0 [label="", fontcolor=transparent, color=transparent]
node_mod_1 [label="##end##", fontcolor=transparent, color=transparent]
{rank=same; G1; node_mod_1_0}
node_mod_1_0 -> G1 [color=transparent]
node_mod_1_0 -> node_mod_1 [color=transparent]
node_mod_0 -> node_mod_1_0 [color=transparent]
G1 [shape=box, label="G1", style=filled, fillcolor="#FF3E47", peripheries=2]
G0 -> G1
{rank=same; G1; node_mod_1_0}
}
```
![graphviz-2.38.svg](/uploads/f857a1d90bb78fc89feab7cd25287fe4/graphviz-2.38.svg)
![graphviz-2.40.svg](/uploads/5dda4b434a53854818842e6cb8970f35/graphviz-2.40.svg)GUILLAUME BrunoGUILLAUME Brunohttps://gitlab.inria.fr/grew/grew/-/issues/4Allow utf8 in edge names2018-09-10T16:12:09+02:00POGODALLA SylvainAllow utf8 in edge namesThat would be nice if it was possible to have utf8 names for edge names (and possibly any char when the name is enclosed in double quotes) in graph declaration (grew format). For instance:
N1 -["c'est un exemple compiqué de nom de relat...That would be nice if it was possible to have utf8 names for edge names (and possibly any char when the name is enclosed in double quotes) in graph declaration (grew format). For instance:
N1 -["c'est un exemple compiqué de nom de relation entre deux nœuds"] -> N2https://gitlab.inria.fr/grew/grew/-/issues/5keep node names/node identifiers in grew grep2018-09-10T16:12:19+02:00POGODALLA Sylvainkeep node names/node identifiers in grew grepThe 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="t...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" } } ]
```https://gitlab.inria.fr/grew/grew/-/issues/7Do not create the outfile in case of early error2019-06-24T22:17:39+02:00GUILLAUME BrunoDo not create the outfile in case of early errorWith the command: `grew transform -grs x.grs -i in.conll -o out.conll` and when Grew fails to load `x.grs`, the file `out.conll` is created and empty.
It should not be created.With the command: `grew transform -grs x.grs -i in.conll -o out.conll` and when Grew fails to load `x.grs`, the file `out.conll` is created and empty.
It should not be created.GUILLAUME BrunoGUILLAUME Brunohttps://gitlab.inria.fr/grew/grew/-/issues/8add a command to make a node unordered2022-03-13T19:39:04+01:00GUILLAUME Brunoadd a command to make a node unorderedNeeded for conversion from syntax to semantics.Needed for conversion from syntax to semantics.GUILLAUME BrunoGUILLAUME Brunohttps://gitlab.inria.fr/grew/grew/-/issues/9Avoid duplicate solutions when several nodes are equivalent in patterns2019-08-09T15:06:53+02:00GUILLAUME BrunoAvoid duplicate solutions when several nodes are equivalent in patternsWhen searching for a pattern like `pattern { S -> N1; S -> N2; }` each "occurrence" is given twice with N1/N2 exchanged.
A trick to avoid this is to add `N1 << N2` but this can be used only for ordered nodes.
A more general mechanism is...When searching for a pattern like `pattern { S -> N1; S -> N2; }` each "occurrence" is given twice with N1/N2 exchanged.
A trick to avoid this is to add `N1 << N2` but this can be used only for ordered nodes.
A more general mechanism is needed in general:
* option 1: add a syntax `N1 <<< N2` to order node wrt their `gid` (:-1: implementation dependant)
* option 2: add a syntax like `groups {N1; N2}` (idem from previous but a little more abstract)
* option 3: detect the subgroups of nodes that are equivalent (:-1: difficult to implement)GUILLAUME BrunoGUILLAUME Brunohttps://gitlab.inria.fr/grew/grew/-/issues/11Way to modify nodes2019-12-17T17:17:20+01:00Ghost UserWay to modify nodesWe are currently working on a conversion of a treebank to UD.
**Input:**
```
# sent_id = DW-s41
# text = Tiqsimuyu -pi medio -pi willa -y apa -y -manta waynakuna -paq yachaysi -y .
1 Tiqsimuyu _ Root Root NRoot 2 s.arg _ Gloss=globo,ti...We are currently working on a conversion of a treebank to UD.
**Input:**
```
# sent_id = DW-s41
# text = Tiqsimuyu -pi medio -pi willa -y apa -y -manta waynakuna -paq yachaysi -y .
1 Tiqsimuyu _ Root Root NRoot 2 s.arg _ Gloss=globo,tierra,mundo
2 -pi _ Cas Cas +Loc 4 co _ _
3 medio _ Root Root NRootES 4 s.arg _ _
4 -pi _ Cas Cas +Loc 12 mod _ _
5 willa _ Root Root VRoot 7 obj _ Gloss=contar
6 -y _ NS NS +Inf 5 ns _ _
7 apa _ Root Root VRoot 9 s.arg.claus _ Gloss=llevar
8 -y _ NS NS +Inf 7 ns _ _
9 -manta _ Cas Cas +Abl 12 mod _ _
10 waynakuna _ Root_Num Root_Num NRoot|+Pl 11 s.arg _ Gloss=joven
11 -paq _ Cas Cas +Ben 12 ben _ _
12 yachaysi _ Root_VDeriv Root_VDeriv VRoot|+Ass 0 sntc _ Gloss=saber,habitar
13 -y _ NS NS +Inf 12 ns _ _
14 . _ $. $. _ 0 punc _ _
```
**Rule file:**
```
rule main {
pattern {
V [cat=Root];
NS [cat=NS];
ns: V -[ns]-> NS;
}
commands {
del_edge ns ;
}
}
```
**Output:**
```
$ cat test.conllu | grew transform -grs merge.grs
100.00%
# sent_id = DW-s41_0
# text = Tiqsimuyu -pi medio -pi willa -y apa -y -manta waynakuna -paq yachaysi -y .
1 Tiqsimuyu _ Root Root NRoot=true 2 s.arg _ Gloss=globo,tierra,mundo
2 -pi _ Cas Cas +Loc=true 4 co _ _
3 medio _ Root Root NRootES=true 4 s.arg _ _
4 -pi _ Cas Cas +Loc=true 12 mod _ _
5 willa _ Root Root VRoot=true 7 obj _ Gloss=contar
6 -y _ NS NS +Inf=true _ _ _ _
7 apa _ Root Root VRoot=true 9 s.arg.claus _ Gloss=llevar
8 -y _ NS NS +Inf=true 7 ns _ _
9 -manta _ Cas Cas +Abl=true 12 mod _ _
10 waynakuna _ Root_Num Root_Num +Pl=true|NRoot=true 11 s.arg _ Gloss=joven
11 -paq _ Cas Cas +Ben=true 12 ben _ _
12 yachaysi _ Root_VDeriv Root_VDeriv +Ass=true|VRoot=true 0 sntc _ Gloss=saber,habitar
13 -y _ NS NS +Inf=true 12 ns _ _
14 . _ $. $. _ 0 punc _ _
# sent_id = DW-s41_1
# text = Tiqsimuyu -pi medio -pi willa -y apa -y -manta waynakuna -paq yachaysi -y .
1 Tiqsimuyu _ Root Root NRoot=true 2 s.arg _ Gloss=globo,tierra,mundo
2 -pi _ Cas Cas +Loc=true 4 co _ _
3 medio _ Root Root NRootES=true 4 s.arg _ _
4 -pi _ Cas Cas +Loc=true 12 mod _ _
5 willa _ Root Root VRoot=true 7 obj _ Gloss=contar
6 -y _ NS NS +Inf=true 5 ns _ _
7 apa _ Root Root VRoot=true 9 s.arg.claus _ Gloss=llevar
8 -y _ NS NS +Inf=true _ _ _ _
9 -manta _ Cas Cas +Abl=true 12 mod _ _
10 waynakuna _ Root_Num Root_Num +Pl=true|NRoot=true 11 s.arg _ Gloss=joven
11 -paq _ Cas Cas +Ben=true 12 ben _ _
12 yachaysi _ Root_VDeriv Root_VDeriv +Ass=true|VRoot=true 0 sntc _ Gloss=saber,habitar
13 -y _ NS NS +Inf=true 12 ns _ _
14 . _ $. $. _ 0 punc _ _
```
This removes the edge, but we would like to have a way to delete the `8 -y` node and merge the surface form with node 7. E.g. update the "surface" column of line 7 to be the concatenation of the surface columns in lines 7 and 8.
Is this possible? We could not find it in the documentation.https://gitlab.inria.fr/grew/grew/-/issues/12Refer to features column2022-03-13T19:21:22+01:00Ghost UserRefer to features columnIn the documentation about graphs/conllu: http://grew.fr/graph/
There appears to be no way to refer to the features column?
We'd like to do something like:
```
rule r {
pattern {
V [upos=Root];
NS [upos=NS];
V -[ns]-> NS...In the documentation about graphs/conllu: http://grew.fr/graph/
There appears to be no way to refer to the features column?
We'd like to do something like:
```
rule r {
pattern {
V [upos=Root];
NS [upos=NS];
V -[ns]-> NS;
}
commands {
V.form = V.form + NS.form;
V.feats = V.feats + NS.feats ;
del_node NS;
}
}
strat main { Onf (r) }
```
But this results in an error:
```
$ grew transform -grs merge.grs -i test.conllu
0.00% (DW-s41) MESSAGE : [file: merge.grs, line: 10] Cannot update_feat, some feature (named "feats") is not defined
```https://gitlab.inria.fr/grew/grew/-/issues/13Dropping relation information2020-01-18T10:39:11+01:00Ghost UserDropping relation informationWe are trying to convert a treebank.
Input:
```
# sent_id = DW-s2
# text[seg] = Wiñarqu -y -manta -wan miryukuna -manta -wan
1 Wiñarqu _ VERB Root _ 3 s.arg _ Gloss=desarollar,crecer
2 -y _ NS NS VerbForm=Inf 1 ns _ _
3 -manta _ Cas...We are trying to convert a treebank.
Input:
```
# sent_id = DW-s2
# text[seg] = Wiñarqu -y -manta -wan miryukuna -manta -wan
1 Wiñarqu _ VERB Root _ 3 s.arg _ Gloss=desarollar,crecer
2 -y _ NS NS VerbForm=Inf 1 ns _ _
3 -manta _ Cas Cas Case=Abl 6 @conj _ _
4 -wan _ Cas Cas Case=Ins 3 s.co _ _
5 miryukuna _ NUM Root Number=Plur 6 s.arg _ _
6 -manta _ Cas Cas Case=Abl 0 sntc _ _
7 -wan _ Cas Cas Case=Ins 6 s.co _ _
```
grs:
```
rule mergens {
pattern {
V [xpos=Root];
NS [upos=NS];
V -[ns]-> NS;
}
commands {
V.form = V.form + NS.form;
V.VerbForm = NS.VerbForm;
del_node NS;
}
}
rule cas {
pattern {
R [xpos=Root];
C [upos=Cas];
C -[s.arg]-> R;
}
commands{
R.form = R.form + C.form;
R.Case = C.Case;
del_node C
}
}
strat main { Seq (Onf(mergens), Onf(cas)) }
```
Output:
```
# sent_id = DW-s2
# text[seg] = Wiñarqu -y -manta -wan miryukuna -manta -wan
1 Wiñarqu-y-manta _ VERB Root Case=Abl|VerbForm=Inf _ _ _ Gloss=desarollar,crecer
2 -wan _ Cas Cas Case=Ins _ _ _ _
3 miryukuna-manta _ NUM Root Case=Abl|Number=Plur _ _ _ _
4 -wan _ Cas Cas Case=Ins _ _ _ _
```
As you can see, the head and relation information is lost. Is there a way to preserve or update this information in my commands?https://gitlab.inria.fr/grew/grew/-/issues/14Refer to node 02019-11-20T21:19:30+01:00Ghost UserRefer to node 0I am struggling to handle dependencies where the head is 0.
my input file:
```
# sent_id = DW-s120
# text = Kay plazo pasa -pti -lla -n -mi qullqi -qa mana interés -niyuq hurqu -sqa ka -nman .
1 Kay _ DET Root PronType=Det 2 det _ Feats...I am struggling to handle dependencies where the head is 0.
my input file:
```
# sent_id = DW-s120
# text = Kay plazo pasa -pti -lla -n -mi qullqi -qa mana interés -niyuq hurqu -sqa ka -nman .
1 Kay _ DET Root PronType=Det 2 det _ Feats=PrnDem
2 plazo _ NOUN Root _ 3 subj _ Feats=NRootES
3 pasa _ VERB Root _ 15 sub _ Feats=VRootES
4 -pti _ NS NS 3 ns _ Feats=+DS
5 -lla _ Amb Amb _ 3 nmod _ _
6 -n _ NPers SUFFIX Person=3|Number=Sing|Poss=Yes 4 s.poss.subj _ Feats=+3.Sg.Poss
7 -mi _ Amb Amb Evident=DirE 15 ev _ Feats=+DirE
8 qullqi _ NOUN Root _ 15 subj _ Gloss=plata|Feats=NRoot
9 -qa _ Amb Amb Topic=Yes 8 topic _ Feats=+Top
10 mana _ Root Root _ 11 neg _ _
11 interés _ NOUN Root _ 12 s.arg _ Feats=NRootES
12 -niyuq _ NDeriv NDeriv Poss=Yes 13 nmod _ Feats=+Poss
13 hurqu _ VERB Root _ 15 pred _ Gloss=sacar|Feats=VRoot
14 -sqa _ NS NS Aspect=Perf 13 ns _ Feats=+Perf
15 ka _ VERB Root _ 0 ser _ Gloss=ser|Feats=VRoot
16 -nman _ VPers_Mod SUFFIX Person=3|Number=Sing 15 s.subj _ Feats=+3.Sg.Subj|+Pot
17 . _ PUNCT $. _ 0 punct _ _
```
I would like to change the relations on IDs 15 and 17. Their heads are 0. The documentation mentions that a node at position 0 was created for this purpose, and that identifying IDs can be done using `position`.
I made a tiny test file to test using this on node 0:
```
rule zero{
pattern{
Zero [position=0];
P [upos=PUNCT];
Zero -[punct]-> P;
}commands{
del_edge Zero -[punct]-> P;
add_edge Zero -[ZERO]-> P;
}
}
strat main {Onf(zero)}
```
I would expect this to change the deprel of ID 17 to ZERO, but there is no change in the file (and no error).
Is there another method I should be using to refer to the 0 node?https://gitlab.inria.fr/grew/grew/-/issues/15Refer to MISC2020-01-18T10:37:27+01:00Ghost UserRefer to MISCI am looking for a way to refer to the MISC column. The documentation (http://grew.fr/graph/) says that it can be referred to with _MISC_.
using a rule such as:
```
rule test_misc{
pattern {
V [upos=VERB|NOUN];
NS [upos=...I am looking for a way to refer to the MISC column. The documentation (http://grew.fr/graph/) says that it can be referred to with _MISC_.
using a rule such as:
```
rule test_misc{
pattern {
V [upos=VERB|NOUN];
NS [upos=NS];
V -[ns]-> NS;
}
commands {
V.form = V.form + NS.form;
V._MISC_ = V._MISC_ + NS._MISC_;
shift NS ==> V;
del_node NS;
}
}
```
I would like to append the MISC column of NS to the MISC column of V.
Is there a way to do this in grew?https://gitlab.inria.fr/grew/grew/-/issues/16Regexp in node declaration2022-03-13T19:20:26+01:00GUILLAUME BrunoRegexp in node declarationWhy the following syntax is not accepted?
```
pattern { N [lemma=re".*ing"] }
```Why the following syntax is not accepted?
```
pattern { N [lemma=re".*ing"] }
```