Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grew
grew_match
Commits
d271b094
Commit
d271b094
authored
May 31, 2020
by
Bruno Guillaume
Browse files
Adapt snippets to new 1.4 syntax
parent
3417b719
Changes
7
Hide whitespace changes
Inline
Side-by-side
corpora_for_website/SUD/misc/two_obj.pat
View file @
d271b094
% The requests looks for a node 'G' with two different objects 'O1' and 'O2'
% The requests looks for a node 'G' with two different objects 'O
_
1' and 'O
_
2'
% An additional constraint is needed to avoid duplicate solutions:
% If some occurrence is found, the swaping of 'O1' and 'O2' in the solution is also one,
% The constraint on line 9 imposes to given only one the two solutions
% If some occurrence is found, the swap
p
ing of 'O
_
1' and 'O
_
2' in the solution is also one,
% The constraint on line 9 imposes to given only one the two solutions
.
pattern {
G -[comp:obj]-> O1;
G -[comp:obj]-> O2;
id(O1) < id(O2)
; % <-- Avoid to duplicate solutions
G -[comp:obj]-> O
_
1;
G -[comp:obj]-> O
_
2;
O_1.__id__ < O_2.__id__
; % <-- Avoid to duplicate solutions
}
% NB: '
id
' refers to some internal identifier for node which is not relevant for the user in general
% NB: '
__id__
' refers to some internal identifier for node which is not relevant for the user in general
corpora_for_website/SUD/right_pane.html
View file @
d271b094
...
...
@@ -51,7 +51,7 @@
<li><a
href=
"#"
clustering=
"GOV.upos"
snippet-file=
"../snippets_clusters/upos.pat"
class=
"inter"
>
Cluster results by one node "upos"
</a></li>
<li><a
href=
"#"
clustering=
"N.lemma"
snippet-file=
"../snippets_clusters/lemma.pat"
class=
"inter"
>
Cluster results by one node "lemma"
</a></li>
<li><a
href=
"#"
clustering=
"N.VerbForm"
snippet-file=
"../snippets_clusters/verbform.pat"
class=
"inter"
>
Other clustering on nodes
</a></li>
<li><a
href=
"#"
clustering=
"e"
snippet-file=
"../snippets_clusters/edge.pat"
class=
"inter"
>
Cluster results by edge label
</a></li>
<li><a
href=
"#"
clustering=
"e
.label
"
snippet-file=
"../snippets_clusters/edge.pat"
class=
"inter"
>
Cluster results by edge label
</a></li>
</ul>
</div>
...
...
@@ -63,7 +63,7 @@
<li><a
href=
"#"
snippet-file=
"../snippets_global/other.pat"
class=
"inter"
>
Other global constraints
</a></li>
<li><a
href=
"#"
snippet-file=
"../snippets_global/combined.pat"
class=
"inter"
>
Global constraints can be combined with other clauses
</a></li>
</ul>
<b>
A few other examples of more complex requests:
</b>
<ul>
<li><a
href=
"#"
snippet-file=
"misc/verb_wo_subj.pat"
class=
"inter"
>
Search for verbs without subject
</a></li>
...
...
corpora_for_website/UD/right_pane.html
View file @
d271b094
...
...
@@ -42,7 +42,7 @@
<li><a
href=
"#"
clustering=
"GOV.upos"
snippet-file=
"../snippets_clusters/upos.pat"
class=
"inter"
>
Cluster results by one node "upos"
</a></li>
<li><a
href=
"#"
clustering=
"N.lemma"
snippet-file=
"../snippets_clusters/lemma.pat"
class=
"inter"
>
Cluster results by one node "lemma"
</a></li>
<li><a
href=
"#"
clustering=
"N.VerbForm"
snippet-file=
"../snippets_clusters/verbform.pat"
class=
"inter"
>
Other clustering on nodes
</a></li>
<li><a
href=
"#"
clustering=
"e"
snippet-file=
"../snippets_clusters/edge.pat"
class=
"inter"
>
Cluster results by edge label
</a></li>
<li><a
href=
"#"
clustering=
"e
.label
"
snippet-file=
"../snippets_clusters/edge.pat"
class=
"inter"
>
Cluster results by edge label
</a></li>
</ul>
</div>
...
...
@@ -54,7 +54,7 @@
<li><a
href=
"#"
snippet-file=
"../snippets_global/other.pat"
class=
"inter"
>
Other global constraints
</a></li>
<li><a
href=
"#"
snippet-file=
"../snippets_global/combined.pat"
class=
"inter"
>
Global constraints can be combined with other clauses
</a></li>
</ul>
<b>
A few other examples of more complex requests:
</b>
<ul>
<li><a
href=
"#"
snippet-file=
"misc/verb_wo_subj.pat"
class=
"inter"
>
Search for verbs without subject
</a></li>
...
...
corpora_for_website/parseme/mwe/node_in_2_mwe.pat
View file @
d271b094
% Search a node N which is in two different MWE
% Search a node N which is in two different MWE
s
pattern {
MWE1 -[MWE]-> N;
MWE1 -[MWE]-> N;
MWE2 -[MWE]-> N;
id(
MWE1
) < id(MWE2);
MWE1
.__id__ < MWE2.__id__; % <-- Avoid to duplicate solutions
}
corpora_for_website/snippets_clusters/edge.pat
View file @
d271b094
% What are the dependency relations between a VERB and a NOUN?
% NOTE: it is required to give a name ('e' here) to the edge to make reference to it
as a
cluster key
% NOTE: it is required to give a name ('e' here) to the edge to make reference to it
in the
cluster key
pattern { e: GOV -> DEP; GOV[upos=VERB]; DEP[upos=NOUN] }
tuto/lesson5/edge.pat
View file @
d271b094
% What are the dependency relations between a VERB and a NOUN?
% NOTE: it is required to give a name ('e' here) to the edge to make reference to it
as a
cluster key
% NOTE: it is required to give a name ('e' here) to the edge to make reference to it
in the
cluster key
pattern { e: GOV -> DEP; GOV[upos=VERB]; DEP[upos=NOUN] }
tuto/right_pane.html
View file @
d271b094
...
...
@@ -70,7 +70,7 @@
<li><a
href=
"#"
clustering=
"GOV.upos"
snippet-file=
"lesson5/upos.pat"
class=
"inter"
>
Cluster results by one node "upos"
</a></li>
<li><a
href=
"#"
clustering=
"N.lemma"
snippet-file=
"lesson5/lemma.pat"
class=
"inter"
>
Cluster results by one node "lemma"
</a></li>
<li><a
href=
"#"
clustering=
"N.VerbForm"
snippet-file=
"lesson5/verbform.pat"
class=
"inter"
>
Other clustering on nodes
</a></li>
<li><a
href=
"#"
clustering=
"e"
snippet-file=
"lesson5/edge.pat"
class=
"inter"
>
Cluster results by edge label
</a></li>
<li><a
href=
"#"
clustering=
"e
.label
"
snippet-file=
"lesson5/edge.pat"
class=
"inter"
>
Cluster results by edge label
</a></li>
</ul>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment