Commit d8fe00a8 authored by Bruno Guillaume's avatar Bruno Guillaume
Browse files

update parseme snippets for new syntax

parent 1175e580
......@@ -3,6 +3,6 @@
pattern {
MWE [label];
} without {
MWE -[MWE]-> V;
MWE -[parseme=MWE]-> V;
V[upos=VERB|AUX]
}
......@@ -3,4 +3,4 @@
pattern { GOV -[obj]-> DEP; DEP[upos=NOUN] }
without { DEP -[det|nummod|nmod:poss]-> DET }
without { MWE -[MWE]-> GOV; MWE -[MWE]-> DEP; }
without { MWE -[parseme=MWE]-> GOV; MWE -[parseme=MWE]-> DEP; }
......@@ -2,6 +2,6 @@
pattern {
MWE [label];
MWE -[MWE]-> N;
MWE -[parseme=MWE]-> N;
}
without { MWE -[MWE]-> X }
without { MWE -[parseme=MWE]-> X }
......@@ -2,7 +2,7 @@
% The node MWE indentifies the MWE and the node V the verb in it
pattern {
MWE [label="LVC.full"]; % each MWE is encoded as a new node with a "label" feature
MWE -[MWE]-> V; % the MWE node is linked to each token it contains with a special relation "MWE"
MWE [label="LVC.full"]; % each MWE is encoded as a new node with a "label" feature
MWE -[parseme=MWE]-> V; % the MWE node is linked to each token it contains with a special relation "parseme=MWE"
V[upos=VERB]
}
......@@ -2,7 +2,7 @@
pattern {
MWE [label];
MWE -[MWE]-> N1; MWE -[MWE]-> N2; % <--- two nodes N1 and N2 linked to the MWE node
N1 << N2; % <--- do not display permutation of another result
MWE -[parseme=MWE]-> N1; MWE -[parseme=MWE]-> N2; % <--- two nodes N1 and N2 linked to the MWE node
N1 << N2; % <--- do not display permutation of another result
}
without { MWE -[MWE]-> X } % <--- avoid a third node linked to the MWE node
without { MWE -[parseme=MWE]-> X } % <--- avoid a third node linked to the MWE node
......@@ -2,7 +2,7 @@
pattern {
MWE [label];
MWE -[MWE]-> N1; MWE -[MWE]-> N2; MWE -[MWE]-> N3;
MWE -[parseme=MWE]-> N1; MWE -[parseme=MWE]-> N2; MWE -[parseme=MWE]-> N3;
N1 << N2; N2 << N3;
}
without { MWE -[MWE]-> X }
without { MWE -[parseme=MWE]-> X }
......@@ -2,7 +2,7 @@
pattern {
MWE [label];
MWE -[MWE]-> N1; MWE -[MWE]-> N2; MWE -[MWE]-> N3; MWE -[MWE]-> N4;
MWE -[parseme=MWE]-> N1; MWE -[parseme=MWE]-> N2; MWE -[parseme=MWE]-> N3; MWE -[parseme=MWE]-> N4;
N1 << N2; N2 << N3; N3 << N4;
}
without { MWE -[MWE]-> X }
without { MWE -[parseme=MWE]-> X }
% Search for a MWE with a given 2 given phonological forms
pattern {
MWE [label]; % Search for a MWE node…
MWE -[MWE]-> N1; N1 [form="Word_1"]; % …which contains a token with phonological form "Word_1"…
MWE -[MWE]-> N2; N2 [form="Word_2"]; % …and a token with phonological form "Word_2"
MWE [label]; % Search for a MWE node…
MWE -[parseme=MWE]-> N1; N1 [form="Word_1"]; % …which contains a token with phonological form "Word_1"…
MWE -[parseme=MWE]-> N2; N2 [form="Word_2"]; % …and a token with phonological form "Word_2"
}
% Note that this will also return MWE with other tokens than the two givens.
......
% Search for a MWE with a given 2 given lemmas
pattern {
MWE [label]; % Search for a MWE node…
MWE -[MWE]-> N1; N1 [lemma="Lemma_1"]; % …which contains a token with "Lemma_1"…
MWE -[MWE]-> N2; N2 [lemma="Lemma_2"]; % …and a token with "Lemma_2"
MWE [label]; % Search for a MWE node…
MWE -[parseme=MWE]-> N1; N1 [lemma="Lemma_1"]; % …which contains a token with "Lemma_1"…
MWE -[parseme=MWE]-> N2; N2 [lemma="Lemma_2"]; % …and a token with "Lemma_2"
}
% Note that this will also return MWE with other tokens than the two givens.
......
% Search for a MWE with some morphological restrictions
pattern {
MWE [label]; % Search for a MWE node…
MWE -[MWE]-> N1; N1 [upos=VERB]; % …which contains a verbal token …
MWE -[MWE]-> N2; N2 [upos=NOUN, Number=Plur]; % …and a plural noun token."
MWE [label]; % Search for a MWE node…
MWE -[parseme=MWE]-> N1; N1 [upos=VERB]; % …which contains a verbal token …
MWE -[parseme=MWE]-> N2; N2 [upos=NOUN, Number=Plur]; % …and a plural noun token."
}
......@@ -3,6 +3,6 @@
pattern {
MWE [label]; % Search for a MWE node…
MWE -[MWE]-> V; % …which contains a token V…
MWE -[parseme=MWE]-> V; % …which contains a token V…
V[upos=VERB, lemma="Lemma_to_search"] % …with a given lemma
}
% Search a node N which is in two different MWEs
pattern {
MWE1 -[MWE]-> N;
MWE2 -[MWE]-> N;
MWE1 -[parseme=MWE]-> N;
MWE2 -[parseme=MWE]-> N;
MWE1.__id__ < MWE2.__id__; % <-- Avoid to duplicate solutions
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment