Commit 4925c2e6 authored by Bruno Guillaume's avatar Bruno Guillaume

Doc for lexical rules

parent 7a478fb0
...@@ -13,7 +13,7 @@ Categories = ["Development","GoLang"] ...@@ -13,7 +13,7 @@ Categories = ["Development","GoLang"]
**Grew** is a Graph Rewriting tool dedicated to applications in Natural Language Processing (NLP). It can manipulate many kinds of linguistic representation. It has been used on POS-tagged sequence, surface dependency syntax, deep dependency syntax, semantic representation (AMR, DMRS) but it can be used to represent any graph-based structure. **Grew** is a Graph Rewriting tool dedicated to applications in Natural Language Processing (NLP). It can manipulate many kinds of linguistic representation. It has been used on POS-tagged sequence, surface dependency syntax, deep dependency syntax, semantic representation (AMR, DMRS) but it can be used to represent any graph-based structure.
## News ## News
**2018/06/19:** New release of version **0.48**. See [What's new](../whats) for changes **2018/09/10:** New release of version **1.0**. See [What's new](../whats) for changes
**April 2018:** Publication of the book [*Application of Graph Rewriting to Natural Language Processing*](https://www.wiley.com/en-fr/Application+of+Graph+Rewriting+to+Natural+Language+Processing-p-9781119522348). **April 2018:** Publication of the book [*Application of Graph Rewriting to Natural Language Processing*](https://www.wiley.com/en-fr/Application+of+Graph+Rewriting+to+Natural+Language+Processing-p-9781119522348).
The chapter 1 is [available from the editor website](https://media.wiley.com/product_data/excerpt/66/17863009/1786300966-587.pdf). The chapter 1 is [available from the editor website](https://media.wiley.com/product_data/excerpt/66/17863009/1786300966-587.pdf).
......
+++
menu = "main"
Categories = ["Development","GoLang"]
date = "2018-08-08T11:20:37+02:00"
title = "lexicons"
Tags = ["Development","golang"]
Description = ""
+++
...@@ -13,10 +13,13 @@ Categories = ["Development","GoLang"] ...@@ -13,10 +13,13 @@ Categories = ["Development","GoLang"]
**Grew-match** is a one page online web application for searching graph patterns in treebanks. **Grew-match** is a one page online web application for searching graph patterns in treebanks.
In the current version, the treebanks available are: In the current version, the treebanks available are:
* The 102 treebanks of the version 2.1 of [Universal Dependencies](http://universaldependencies.org) * The 122 treebanks of the version 2.2 of [Universal Dependencies](http://universaldependencies.org)
* The 122 treebanks of the version 2.1 of Universal Dependencies
* Some other versions of French Universal Dependencies * Some other versions of French Universal Dependencies
* The French Sequoia corpus (with and without deep syntactic annotations) * The French Sequoia corpus (with and without deep syntactic annotations)
If you want to use it on some other corpora, you can run your own Grew-match following the instructions on [Local installation of Grew-match](../install_match).
## Basic usage ## Basic usage
1. Select the corpus on which you want to search (Click on `Show corpora list` if needed) 1. Select the corpus on which you want to search (Click on `Show corpora list` if needed)
...@@ -36,17 +39,26 @@ A [tutorial](http://match.grew.fr/?tutorial=yes) with a progressive sequence of ...@@ -36,17 +39,26 @@ A [tutorial](http://match.grew.fr/?tutorial=yes) with a progressive sequence of
You may also explore snippets given on the right of the text area to learn with other examples. You may also explore snippets given on the right of the text area to learn with other examples.
## About CoNLL field names ## About CoNLL field names
The fields 2, 3, 4 and 5 of CoNLL structure are named differently in UD and in Sequoia The fields 2, 3, 4 and 5 of CoNLL structure are considered as features with the following feature names.
| CoNLL field | 2 | 3 | 4 | 5 |
|-----------------|:------:|:-------:|:------:|:------:|
| Name | `form` | `lemma` | `upos` | `xpos` |
For instance, if you want to search:
* for the word _is_, you write: `pattern { N [form="is"] }`
* for the lemma _be_, you write: `pattern { N [lemma="be"] }`
**NB** In former version of the Grew code, columns were associated to feature names according to the table below.
| CoNLL field | 2 | 3 | 4 | 5 | | CoNLL field | 2 | 3 | 4 | 5 |
|-----------------|:------:|:-------:|:------:|:------:| |-----------------|:------:|:-------:|:------:|:------:|
| Name in UD | `form` | `lemma` | `upos` | `xpos` | | Name | `phon` | `lemma` | `cat` | `pos` |
| Name in Sequoia | `phon` | `lemma` | `cat` | `pos` |
For instance, if you want to search for the word _maison_, you write: In order to keep backward compatibility, the features names `phon`, `cat` and `pos` are automatically replaced by `form`, `upos` and `xpos` respectively.
As a consequence, it is not recommended to use the 3 names `phon`, `cat` and `pos` in new GRS.
* in UD: `pattern { N [form="maison"] }`
* in Sequoia: `pattern { N [phon="maison"] }`
## Display options ## Display options
Below the textarea, a few checkboxes are available to choose the information to be displayed Below the textarea, a few checkboxes are available to choose the information to be displayed
......
...@@ -8,76 +8,110 @@ Tags = ["Development","golang"] ...@@ -8,76 +8,110 @@ Tags = ["Development","golang"]
+++ +++
# Grew basic rules # Basic Grew rules
A **rewrite rule** in grew is defined by: A **rewrite rule** in **Grew** is defined by:
* One pattern describing the part of graph we want to match (see [pattern page](../pattern)) and on which we will apply rules, introduced by the keyword `pattern` * One pattern describing the part of graph to match (see [pattern page](../pattern)) and on which commands will be applied, introduced by the keyword `pattern`
* A set of negative clauses to filter out unwanted occurrences of the pattern, each clause being introduced by the keyword `without` * A set of negative clauses to filter out unwanted occurrences of the pattern, each clause being introduced by the keyword `without`
* One sequence of commands to apply (see [commands page](../commands)), introduced by the keyword `commands` * One sequence of commands to apply (see [commands page](../commands)), introduced by the keyword `commands`
## example ## Example
~~~grew
rule accuser { {{< grew file="/static/rule/accuser.grs" >}}
pattern {
V [cat=V, lemma="accuser"];
O [];
D [cat=D, lemma="de"];
DO [cat=V, m = inf | part];
V -[obj]-> O;
V -[de_obj]-> D;
D -[obj]-> DO
}
without {
DO -[suj]-> O
}
commands {
add_edge DO -[suj]-> O
}
}
~~~
# Grew lexical rules # Using lexicons in Grew rules
Grew rules can be parametrized by one or several lexicons. :warning: The syntax described below was introduced in version 1.0.
See "[About new lexical rules syntax](../lexicons_change)" for more details. :warning:
**Grew** rules can be parametrized by one or several lexicons.
## Lexicon
A lexicon is defined by: A lexicon is defined by:
* a list in n different identifiers * a list in *n* different fields identifiers
* a list of lexicon items, each item is a n-tuple * a list of lexicon items, each item is a *n*-tuple
For instance, the table below describes a small lexicon for French nouns and with the gender feature associated with it.
| noun | Gender |
|--------|--------|
| garçon | Masc |
| maison | Fem |
A lexicon is written as text where:
* Blank lines and lines starting with `%` symbol are ignored
* Each line is a list of elements separated by tabulations.
* The first line defines the fields identifiers.
* All other lines define the lexicon items that are n-tuples of strings.
* All lines contain the same number of elements.
The lexicon above can be then written in the file [`nouns.lex`](../rule/nouns.lex)
{{< grew file="/static/rule/nouns.lex" >}}
## Lexical rule
A rule can be parametrized by a lexicon.
The rule below add a new feat `Gender` with the relevant value when the noun is found in the lexicon.
Note that the lexicon is named in the rule (`lex` in the example), this will allow us to use several lexicons in the same rule.
A lexicon can be declared in a external file.
The syntax below declares a lexicon called `lex` for the rule `rule_name`.
~~~grew ~~~grew
rule rule_name (lex from "file.lex") {…} rule set_gender (lex from "nouns.lex") {
pattern { N [upos=NOUN, !Gender, lemma=lex.noun] }
commands { N.Gender = lex.Gender }
}
~~~ ~~~
The file `file.lex` follows the syntax: Once the lexicon `lex` is declared, the syntax `lex.ident` can be used to refer to lexical items in every place where a feature value can be used in the rule definition.
~~~
phon new_phon When a lexicon is short and specific to one rule, it may be painful to put it in a new file.
p1 r1 In this case, an alternative syntax is proposed: the lexicon is defined directly at the end of the rule definition.
p2 r2 The rule above can be written:
p3 r3
~~~
where each line is a list of elements separated by tabulations.
The first line defines the parameters identifiers.
All other lines define the lexicon items that are n-tuples of strings.
Hence, all lines are supposed to contain the same number of elements.
The same lexicon `lex` can also be defined directly at the end of the rule definition with the syntax:
~~~grew ~~~grew
rule rule_name {…} rule set_gender {
##BEGIN lex pattern { N [upos=NOUN, !Gender, lemma=lex.noun] }
phon new_phon commands { N.Gender = lex.Gender }
p1 r1 }
p2 r2 #BEGIN lex
p3 r3 noun Gender
##END %-------------
garçon Masc
maison Fem
#END
~~~ ~~~
Once the lexicon `lex` is declared, the syntax `lex#ident` can be used to refer to lexical items in every place where a feature value can be used in the rule definition. ### Try it!
The file [`set_gender.py`](../rule/set_gender.py) below presents a self-contained example of rewriting with the lexical rule above.
{{< python file="/static/rule/set_gender.py" >}}
## Using several lexicons
The file [`obl_loc.grs`](../rule/obl_loc.grs) below defines a rule which change the relation `obl` into `obl:loc` when both the verb and the preposition are controled by lexicons.
{{< grew file="/static/rule/obl_loc.grs" >}}
The file [`max.conll`](../rule/max.conll) contains the following sentence:
![Max](/rule/max.svg)
With the command `grew transform -grs obl_loc.grs -strat "Onf(obl_loc)" -i max.conll -o max_loc.conll`, the rule above is applied twice and produces the next graph:
![Max_loc](/rule/max_loc.svg)
## Using twice the same lexicons
If the file [`transitive_verbs.lex`](/rule/transitive_verbs.lex) contains a list of transitive verbs, the following rule distributes the `obj` relation when two transitive verbs are coordinated.
{{< grew file="/static/rule/transitive_coord.grs" >}}
This rule can be used to turn the left part below into the right part:
| ![pomme](/rule/pomme.svg) | ![pomme_enhanced](/rule/pomme_enhanced.svg) |
|:---:|:---:|
The same lexicon can refer to several files and several final declaration.
In such a case, only identifiers that are declared in all lexicons are taken into account
...@@ -18,7 +18,16 @@ More detailled informations in files `CHANGES.md` for each sub-project: ...@@ -18,7 +18,16 @@ More detailled informations in files `CHANGES.md` for each sub-project:
--- ---
# [**last release**] Version 0.48 on June 19, 2018 # [**last release**] Version 1.0 on September 10, 2018
* :warning: Change lexical rules syntax and lexicon representation (See [About new lexical rules syntax](../lexicons_change))
* Handling of Parseme's column 11
* Large code cleaning
* Fix [#4](https://gitlab.inria.fr/grew/grew/issues/4)
* Fix [#5](https://gitlab.inria.fr/grew/grew/issues/5)
---
# Version 0.48 on June 19, 2018
* remove `conll_fields` mechanism (names of conll fields 2, 4 and 5 are `form`, `upos`, `xpos`). See [here](../features#note-about-backward-compatibility) for more information. * remove `conll_fields` mechanism (names of conll fields 2, 4 and 5 are `form`, `upos`, `xpos`). See [here](../features#note-about-backward-compatibility) for more information.
--- ---
......
talc2: self_doc:
scp ud.dom ${stalc2}/resources @echo "make lchn: install ud.dom on the server"
lchn: lchn:
scp ud.dom ${slchn}/resources scp ud.dom ${slchn}/resources
\ No newline at end of file
...@@ -13,9 +13,6 @@ features { ...@@ -13,9 +13,6 @@ features {
% field 5 of CONLL format is interpreted as the "pos" feature, unused in tiger % field 5 of CONLL format is interpreted as the "pos" feature, unused in tiger
xpos: *; xpos: *;
% In Tiger, sentence identifier are given through a identifer "id_pos", and transfomed to a feature sentid on the first node in this CONLL description.
sentid: *;
% Features grepped from the English Corpus % Features grepped from the English Corpus
Case: Nom, Acc, Abs, Erg, Dat, Gen, Voc, Loc, Ins, Abl, Ine, Ade, All, Par, Ill, Ela, Ess, Abe, Com, Tra, Advb, Con, NomAcc, Lat, Tem, Obl, Add, Cau, Ter, Comp, Sup, Ben, Sub, Equ, Del, Dis, Prl, Mal, Egr, Per, Cns, Apr, Case: Nom, Acc, Abs, Erg, Dat, Gen, Voc, Loc, Ins, Abl, Ine, Ade, All, Par, Ill, Ela, Ess, Abe, Com, Tra, Advb, Con, NomAcc, Lat, Tem, Obl, Add, Cau, Ter, Comp, Sup, Ben, Sub, Equ, Del, Dis, Prl, Mal, Egr, Per, Cns, Apr,
"Acc,Erg", "Acc,Ine", "Acc,Ins", "Acc,Dat", "Acc,Nom", "Dat,Gen", "Acc,Gen", "Gen,Nom", "Erg,Gen"; "Acc,Erg", "Acc,Ine", "Acc,Ins", "Acc,Dat", "Acc,Nom", "Dat,Gen", "Acc,Gen", "Gen,Nom", "Erg,Gen";
...@@ -128,6 +125,9 @@ features { ...@@ -128,6 +125,9 @@ features {
Morph: VFin, VPar, VInf; Morph: VFin, VPar, VInf;
Emphatic: Yes; Emphatic: Yes;
Agglutination: Nagl, Agl; Agglutination: Nagl, Agl;
% handling of MWE/NE nodes
kind:*; label:*; mwepos:*; criterion:*;
} }
% ==================================================================================================== % ====================================================================================================
...@@ -1174,6 +1174,8 @@ E:advcl:dess, ...@@ -1174,6 +1174,8 @@ E:advcl:dess,
"E:obl:över", "E:obl:över",
"E:obl:förrän", "E:obl:förrän",
E:root, E:exroot, % UD_Russian-SynTagRus
MWE, NE, % Parseme
E:root, E:exroot, % UD_Russian-SynTagRus
} }
rule r (lex from "f.lex", "g.lex"; lex2 from "f2.lex", "g2.lex") {
pattern {
N[phon=lex#phon];
M.lemma=lex2#lem;
}
commands {
add_edge M -[new]-> N;
M.phon = "-" + lex3#header_1;
}
}
#BEGIN lex3
header_1 header_2
x1 x2
y1 y2
z1 z2
t1 t2
#END
#BEGIN lex
header_1 header_2
x1 x2
y1 y2
z1 z2
t1 t2
#END
Prism.languages.grew = { Prism.languages.grew = {
'comment': /%.*/, 'comment': /%.*/,
'keyword': /\b(?:module|rule|deterministic|pattern|without|commands|sequences|graph|features|labels|domain|package|rule|strat|import|include)\b/, 'keyword': /\b(?:module|rule|from|pattern|without|commands|sequences|graph|features|labels|domain|package|rule|strat|import|include)\b/,
'command': /\b(?:del_edge|add_edge|shift|shift_in|shift_out|del_node|add_node)\b/, 'command': /\b(?:del_edge|add_edge|shift|shift_in|shift_out|del_node|add_node)\b/,
'strat': /\b(?:Iter|Pick|Alt|Seq|If|Empty|Rules|Try|Onf)\b/, 'strat': /\b(?:Iter|Pick|Alt|Seq|If|Empty|Rules|Try|Onf)\b/,
'constant': /\b(?:STRING|NUMERIC)\b/, 'constant': /\b(?:STRING|NUMERIC)\b/,
......
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.31.0 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="772.02051" height="177.21289">
<rect x="0" y="0" width="772.02051" height="177.21289" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,114.89844) scale(2,2)">
<text id="word__N_1" x="21.8894" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="21.8894" dy="12.8633">Max</tspan>
</text>
<text id="subword__N_1" x="21.8894" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="21.8894" dy="8.33691">Max</tspan>
<tspan x="21.8894" dy="8.33691">PROPN</tspan>
</text>
<text id="word__N_2" x="66.3325" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="66.3325" dy="12.8633">vient</tspan>
</text>
<text id="subword__N_2" x="66.3325" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="66.3325" dy="8.33691">venir</tspan>
<tspan x="66.3325" dy="8.33691">VERB</tspan>
</text>
<text id="word__N_3" x="105.936" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="105.936" dy="12.8633">à</tspan>
</text>
<text id="subword__N_3" x="105.936" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="105.936" dy="8.33691">à</tspan>
<tspan x="105.936" dy="8.33691">ADP</tspan>
</text>
<text id="word__N_4" x="145.961" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="145.961" dy="12.8633">Paris</tspan>
</text>
<text id="subword__N_4" x="145.961" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="145.961" dy="8.33691">Paris</tspan>
<tspan x="145.961" dy="8.33691">PROPN</tspan>
</text>
<text id="word__N_5" x="190.546" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="190.546" dy="12.8633">et</tspan>
</text>
<text id="subword__N_5" x="190.546" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="190.546" dy="8.33691">et</tspan>
<tspan x="190.546" dy="8.33691">CCONJ</tspan>
</text>
<text id="word__N_6" x="231.484" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="231.484" dy="12.8633">va</tspan>
</text>
<text id="subword__N_6" x="231.484" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="231.484" dy="8.33691">aller</tspan>
<tspan x="231.484" dy="8.33691">VERB</tspan>
</text>
<text id="word__N_7" x="273.388" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="273.388" dy="12.8633">dans</tspan>
</text>
<text id="subword__N_7" x="273.388" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="273.388" dy="8.33691">dans</tspan>
<tspan x="273.388" dy="8.33691">ADP</tspan>
</text>
<text id="word__N_8" x="312.622" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="312.622" dy="12.8633">le</tspan>
</text>
<text id="subword__N_8" x="312.622" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="312.622" dy="8.33691">le</tspan>
<tspan x="312.622" dy="8.33691">DET</tspan>
</text>
<text id="word__N_9" x="356.646" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="356.646" dy="12.8633">musée</tspan>
</text>
<text id="subword__N_9" x="356.646" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="356.646" dy="8.33691">musée</tspan>
<tspan x="356.646" dy="8.33691">NOUN</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_1__nsubj" x="41.38940" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >nsubj</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 61.33252,-13.40625 61.33252,-18.40625 A 3 3 0 0 0 58.33252,-21.40625 L 24.88940,-21.40625 A 3 3 0 0 0 21.88940,-18.40625 L 21.88940,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_4__N_3__case" x="124.43579" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >case</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 143.46094,-13.40625 143.46094,-18.40625 A 3 3 0 0 0 140.46094,-21.40625 L 108.93579,-21.40625 A 3 3 0 0 0 105.93579,-18.40625 L 105.93579,-13.40625" ></path>
<marker id="markerendword_3" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_6__N_5__cc" x="208.04565" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >cc</text>
<path style="marker-end:url(#markerendword_3);" stroke="black" fill="none" d="M 226.48413,-13.40625 226.48413,-18.40625 A 3 3 0 0 0 223.48413,-21.40625 L 193.54565,-21.40625 A 3 3 0 0 0 190.54565,-18.40625 L 190.54565,-13.40625" ></path>
<marker id="markerendword_6" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_9__N_8__det" x="332.12183" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >det</text>
<path style="marker-end:url(#markerendword_6);" stroke="black" fill="none" d="M 351.64600,-13.40625 351.64600,-18.40625 A 3 3 0 0 0 348.64600,-21.40625 L 315.62183,-21.40625 A 3 3 0 0 0 312.62183,-18.40625 L 312.62183,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_4__obl" x="109.83252" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >obl</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 71.33252,-13.40625 71.33252,-28.40625 A 3 3 0 0 1 74.33252,-31.40625 L 145.46094,-31.40625 A 3 3 0 0 1 148.46094,-28.40625 L 148.46094,-13.40625" ></path>
<marker id="markerendword_5" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_9__N_7__case" x="314.88770" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >case</text>
<path style="marker-end:url(#markerendword_5);" stroke="black" fill="none" d="M 356.64600,-13.40625 356.64600,-28.40625 A 3 3 0 0 0 353.64600,-31.40625 L 276.38770,-31.40625 A 3 3 0 0 0 273.38770,-28.40625 L 273.38770,-13.40625" ></path>
<marker id="markerendword_7" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_6__N_9__obl" x="298.98413" y="-44.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >obl</text>
<path style="marker-end:url(#markerendword_7);" stroke="black" fill="none" d="M 236.48413,-13.40625 236.48413,-38.40625 A 3 3 0 0 1 239.48413,-41.40625 L 358.64600,-41.40625 A 3 3 0 0 1 361.64600,-38.40625 L 361.64600,-13.40625" ></path>
<marker id="markerendword_4" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_6__conj" x="148.83252" y="-44.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >conj</text>
<path style="marker-end:url(#markerendword_4);" stroke="black" fill="none" d="M 66.33252,-13.40625 66.33252,-38.40625 A 3 3 0 0 1 69.33252,-41.40625 L 228.48413,-41.40625 A 3 3 0 0 1 231.48413,-38.40625 L 231.48413,-13.40625" ></path>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.31.0 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="772.02051" height="177.21289">
<rect x="0" y="0" width="772.02051" height="177.21289" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,114.89844) scale(2,2)">
<text id="word__N_1" x="21.8894" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="21.8894" dy="12.8633">Max</tspan>
</text>
<text id="subword__N_1" x="21.8894" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="21.8894" dy="8.33691">Max</tspan>
<tspan x="21.8894" dy="8.33691">PROPN</tspan>
</text>
<text id="word__N_2" x="66.3325" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="66.3325" dy="12.8633">vient</tspan>
</text>
<text id="subword__N_2" x="66.3325" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="66.3325" dy="8.33691">venir</tspan>
<tspan x="66.3325" dy="8.33691">VERB</tspan>
</text>
<text id="word__N_3" x="105.936" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="105.936" dy="12.8633">à</tspan>
</text>
<text id="subword__N_3" x="105.936" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="105.936" dy="8.33691">à</tspan>
<tspan x="105.936" dy="8.33691">ADP</tspan>
</text>
<text id="word__N_4" x="145.961" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="145.961" dy="12.8633">Paris</tspan>
</text>
<text id="subword__N_4" x="145.961" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="145.961" dy="8.33691">Paris</tspan>
<tspan x="145.961" dy="8.33691">PROPN</tspan>
</text>
<text id="word__N_5" x="190.546" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="190.546" dy="12.8633">et</tspan>
</text>
<text id="subword__N_5" x="190.546" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="190.546" dy="8.33691">et</tspan>
<tspan x="190.546" dy="8.33691">CCONJ</tspan>
</text>
<text id="word__N_6" x="231.484" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="231.484" dy="12.8633">va</tspan>
</text>
<text id="subword__N_6" x="231.484" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="231.484" dy="8.33691">aller</tspan>
<tspan x="231.484" dy="8.33691">VERB</tspan>
</text>
<text id="word__N_7" x="273.388" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="273.388" dy="12.8633">dans</tspan>
</text>
<text id="subword__N_7" x="273.388" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="273.388" dy="8.33691">dans</tspan>
<tspan x="273.388" dy="8.33691">ADP</tspan>
</text>
<text id="word__N_8" x="312.622" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="312.622" dy="12.8633">le</tspan>
</text>
<text id="subword__N_8" x="312.622" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="312.622" dy="8.33691">le</tspan>
<tspan x="312.622" dy="8.33691">DET</tspan>
</text>
<text id="word__N_9" x="356.646" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="356.646" dy="12.8633">musée</tspan>
</text>
<text id="subword__N_9" x="356.646" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="356.646" dy="8.33691">musée</tspan>
<tspan x="356.646" dy="8.33691">NOUN</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_1__nsubj" x="41.38940" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >nsubj</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 61.33252,-13.40625 61.33252,-18.40625 A 3 3 0 0 0 58.33252,-21.40625 L 24.88940,-21.40625 A 3 3 0 0 0 21.88940,-18.40625 L 21.88940,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_4__N_3__case" x="124.43579" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >case</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 143.46094,-13.40625 143.46094,-18.40625 A 3 3 0 0 0 140.46094,-21.40625 L 108.93579,-21.40625 A 3 3 0 0 0 105.93579,-18.40625 L 105.93579,-13.40625" ></path>
<marker id="markerendword_3" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_6__N_5__cc" x="208.04565" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >cc</text>
<path style="marker-end:url(#markerendword_3);" stroke="black" fill="none" d="M 226.48413,-13.40625 226.48413,-18.40625 A 3 3 0 0 0 223.48413,-21.40625 L 193.54565,-21.40625 A 3 3 0 0 0 190.54565,-18.40625 L 190.54565,-13.40625" ></path>
<marker id="markerendword_6" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_9__N_8__det" x="332.12183" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >det</text>
<path style="marker-end:url(#markerendword_6);" stroke="black" fill="none" d="M 351.64600,-13.40625 351.64600,-18.40625 A 3 3 0 0 0 348.64600,-21.40625 L 315.62183,-21.40625 A 3 3 0 0 0 312.62183,-18.40625 L 312.62183,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_4__obl:loc" x="109.83252" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >obl:loc</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 71.33252,-13.40625 71.33252,-28.40625 A 3 3 0 0 1 74.33252,-31.40625 L 145.46094,-31.40625 A 3 3 0 0 1 148.46094,-28.40625 L 148.46094,-13.40625" ></path>
<marker id="markerendword_5" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_9__N_7__case" x="314.88770" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >case</text>
<path style="marker-end:url(#markerendword_5);" stroke="black" fill="none" d="M 356.64600,-13.40625 356.64600,-28.40625 A 3 3 0 0 0 353.64600,-31.40625 L 276.38770,-31.40625 A 3 3 0 0 0 273.38770,-28.40625 L 273.38770,-13.40625" ></path>
<marker id="markerendword_7" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_6__N_9__obl:loc" x="298.98413" y="-44.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >obl:loc</text>
<path style="marker-end:url(#markerendword_7);" stroke="black" fill="none" d="M 236.48413,-13.40625 236.48413,-38.40625 A 3 3 0 0 1 239.48413,-41.40625 L 358.64600,-41.40625 A 3 3 0 0 1 361.64600,-38.40625 L 361.64600,-13.40625" ></path>
<marker id="markerendword_4" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_6__conj" x="148.83252" y="-44.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >conj</text>
<path style="marker-end:url(#markerendword_4);" stroke="black" fill="none" d="M 66.33252,-13.40625 66.33252,-38.40625 A 3 3 0 0 1 69.33252,-41.40625 L 228.48413,-41.40625 A 3 3 0 0 1 231.48413,-38.40625 L 231.48413,-13.40625" ></path>
</g>
</svg>
noun Gender
%-------------
garçon Masc
maison Fem
rule obl_loc {
pattern {
e: VERB -[obl]-> OBL; OBL -[case]-> ADP;
VERB [lemma = loc_verb.lemma];
ADP [lemma = loc_prep.lemma];
}
commands { del_edge e; add_edge VERB -[obl:loc]-> OBL; }
}
#BEGIN loc_verb
lemma
%--------------
aller
venir
#END
#BEGIN loc_prep
lemma
%--------------
à
dans
sur
vers
#END
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.32.0 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="593.95508" height="157.21289">
<rect x="0" y="0" width="593.95508" height="157.21289" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,94.89844) scale(2,2)">
<text id="word__N_1" x="21.8894" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="21.8894" dy="12.8633">Max</tspan>
</text>
<text id="subword__N_1" x="21.8894" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="21.8894" dy="8.33691">Max</tspan>
<tspan x="21.8894" dy="8.33691">PROPN</tspan>
</text>
<text id="word__N_2" x="71.3276" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="71.3276" dy="12.8633">achète</tspan>
</text>
<text id="subword__N_2" x="71.3276" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="71.3276" dy="8.33691">acheter</tspan>
<tspan x="71.3276" dy="8.33691">VERB</tspan>
</text>
<text id="word__N_3" x="120.486" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="120.486" dy="12.8633">et</tspan>
</text>
<text id="subword__N_3" x="120.486" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="120.486" dy="8.33691">et</tspan>
<tspan x="120.486" dy="8.33691">CCONJ</tspan>
</text>
<text id="word__N_4" x="169.796" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="169.796" dy="12.8633">mange</tspan>
</text>
<text id="subword__N_4" x="169.796" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="169.796" dy="8.33691">manger</tspan>
<tspan x="169.796" dy="8.33691">VERB</tspan>
</text>
<text id="word__N_5" x="216.875" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="216.875" dy="12.8633">une</tspan>
</text>
<text id="subword__N_5" x="216.875" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="216.875" dy="8.33691">un</tspan>
<tspan x="216.875" dy="8.33691">DET</tspan>
</text>
<text id="word__N_6" x="265.615" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="265.615" dy="12.8633">pomme</tspan>
</text>
<text id="subword__N_6" x="265.615" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="265.615" dy="8.33691">pomme</tspan>
<tspan x="265.615" dy="8.33691">NOUN</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_1__nsubj" x="44.88940" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >nsubj</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 68.82764,-13.40625 68.82764,-18.40625 A 3 3 0 0 0 65.82764,-21.40625 L 24.88940,-21.40625 A 3 3 0 0 0 21.88940,-18.40625 L 21.88940,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_4__N_3__cc" x="142.48560" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >cc</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 164.79590,-13.40625 164.79590,-18.40625 A 3 3 0 0 0 161.79590,-21.40625 L 123.48560,-21.40625 A 3 3 0 0 0 120.48560,-18.40625 L 120.48560,-13.40625" ></path>
<marker id="markerendword_3" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_6__N_5__det" x="239.87500" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >det</text>
<path style="marker-end:url(#markerendword_3);" stroke="black" fill="none" d="M 263.11523,-13.40625 263.11523,-18.40625 A 3 3 0 0 0 260.11523,-21.40625 L 219.87500,-21.40625 A 3 3 0 0 0 216.87500,-18.40625 L 216.87500,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_4__conj" x="121.32764" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >conj</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 73.82764,-13.40625 73.82764,-28.40625 A 3 3 0 0 1 76.82764,-31.40625 L 166.79590,-31.40625 A 3 3 0 0 1 169.79590,-28.40625 L 169.79590,-13.40625" ></path>
<marker id="markerendword_4" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_4__N_6__obj" x="221.29590" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >obj</text>
<path style="marker-end:url(#markerendword_4);" stroke="black" fill="none" d="M 174.79590,-13.40625 174.79590,-28.40625 A 3 3 0 0 1 177.79590,-31.40625 L 265.11523,-31.40625 A 3 3 0 0 1 268.11523,-28.40625 L 268.11523,-13.40625" ></path>
</g>
</svg>
<?xml version="1.0" stand