Commit 464382c1 authored by Bruno Guillaume's avatar Bruno Guillaume
Browse files

add global snippets

parent bb10adf1
......@@ -5,6 +5,7 @@
<li class="active"><a class="grew-label" href="#step1" data-toggle="tab">Snippets</a></li>
<li> <a class="grew-label" href="#step2" data-toggle="tab">Complex edges</a></li>
<li> <a class="grew-label" href="#step3" data-toggle="tab">n-grams</a></li>
<li> <a class="grew-label" href="#step4" data-toggle="tab">Global</a></li>
</ul>
</div>
......@@ -47,5 +48,14 @@
</ul>
</div>
<div class="tab-pane" id="step4">
<ul>
<li><a href="#" snippet-file="../snippets_global/non_projective.pat" class="inter">Search for non projective structures</a></li>
<li><a href="#" snippet-file="../snippets_global/projective.pat" class="inter">Search for projective structures</a></li>
<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>
</div>
</div>
\ No newline at end of file
......@@ -5,6 +5,7 @@
<li class="active"><a class="grew-label" href="#step1" data-toggle="tab">Snippets</a></li>
<li> <a class="grew-label" href="#step2" data-toggle="tab">Examples</a></li>
<li> <a class="grew-label" href="#step3" data-toggle="tab">n-grams</a></li>
<li> <a class="grew-label" href="#step4" data-toggle="tab">Global</a></li>
</ul>
</div>
......@@ -45,5 +46,13 @@
</ul>
</div>
<div class="tab-pane" id="step4">
<ul>
<li><a href="#" snippet-file="../snippets_global/non_projective.pat" class="inter">Search for non projective structures</a></li>
<li><a href="#" snippet-file="../snippets_global/projective.pat" class="inter">Search for projective structures</a></li>
<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>
</div>
</div>
\ No newline at end of file
......@@ -5,6 +5,7 @@
<li class="active"><a class="grew-label" href="#step1" data-toggle="tab">Snippets</a></li>
<li> <a class="grew-label" href="#step2" data-toggle="tab">Examples</a></li>
<li> <a class="grew-label" href="#step3" data-toggle="tab">n-grams</a></li>
<li> <a class="grew-label" href="#step4" data-toggle="tab">Global</a></li>
</ul>
</div>
......@@ -45,5 +46,13 @@
</ul>
</div>
<div class="tab-pane" id="step4">
<ul>
<li><a href="#" snippet-file="../snippets_global/non_projective.pat" class="inter">Search for non projective structures</a></li>
<li><a href="#" snippet-file="../snippets_global/projective.pat" class="inter">Search for projective structures</a></li>
<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>
</div>
</div>
\ No newline at end of file
......@@ -4,6 +4,7 @@
<li class="active"><a class="grew-label" href="#step1" data-toggle="tab">Snippets</a></li>
<li> <a class="grew-label" href="#step3" data-toggle="tab">n-grams</a></li>
<li> <a class="grew-label" href="#step4" data-toggle="tab">Global</a></li>
</ul>
</div>
......@@ -35,5 +36,15 @@
</ul>
</div>
<div class="tab-pane" id="step4">
<ul>
<li><a href="#" snippet-file="../snippets_global/non_projective.pat" class="inter">Search for non projective structures</a></li>
<li><a href="#" snippet-file="../snippets_global/projective.pat" class="inter">Search for projective structures</a></li>
<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>
</div>
</div>
\ No newline at end of file
% global can be used in conjunction with other clauses
% In the example below, we are looking for a non projective sentence with a specific word (in French for the example)
% Warning: the pattern may returns accidental occurences with both non-projectivity and the serached word in two different parts of the sentences.
global { is_not_projective }
pattern { N[lemma="dont"] }
% global filtering which keeps only non projective structures
global { is_not_projective }
% other global constraints are available:
% * is_tree / is_not_tree
% * is_forest / is_not_forest
% * is_cyclic / is_not_cyclic
% See http://grew.fr/pattern/#global-pattern for more details
global { is_cyclic }
% global filtering which keeps only projective structures
global { is_projective }
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