Grammalecte  Check-in [ea6194b8b7]

Overview
Comment:[doc] small documentation update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | doc
Files: files | file ages | folders
SHA3-256: ea6194b8b7dd164f2d7cdd707098f8a07301ad2c019477e09d98f21245890349
User & Date: olr on 2019-02-27 14:48:04
Other Links: manifest | tags
Context
2019-03-01
10:33
[fr] faux positifs check-in: bd904b6202 user: olr tags: trunk, fr
2019-02-27
14:48
[doc] small documentation update check-in: ea6194b8b7 user: olr tags: trunk, doc
13:59
[doc] small documentation update check-in: 6fb05b3dd9 user: olr tags: trunk, doc
Changes

Modified doc/syntax.txt from [fe117296de] to [ae208bbf9d].

528
529
530
531
532
533
534
535
536
537

538






























Token rules must be defined within a graph.

## Tokens

Tokens can be defined in several ways:

* Value (meaning the text of the token). Examples: `word`, `<start>`, `<end>`, `,`.
* Lemma: `>lemma`
* Rege: `~pattern`
* Regex on morphologies: `@pattern`, `@pattern¬antipattern`.

* Metatags: *NAME. Examples: `*WORD`, `*SIGN`, etc.





































|
|

>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
Token rules must be defined within a graph.

## Tokens

Tokens can be defined in several ways:

* Value (meaning the text of the token). Examples: `word`, `<start>`, `<end>`, `,`.
* Lemma: `>lemma`.
* Regex: `~pattern`, `~pattern¬antipattern`.
* Regex on morphologies: `@pattern`, `@pattern¬antipattern`.
* Tags: `/tag`.
* Metatags: *NAME. Examples: `*WORD`, `*NUM`, `*SIGN`, etc.

Selection of tokens: `[token1|token2|>lemma1|>lemma2|~pattern1|@pattern1|…]`

Conditional token: `?token¿`

Conditional selection of token: `?[token1|token2|…]¿`

## Token references

Positive references are defined by a positive integer `>= 1`. Examples: \1, \2, \3, etc.
If there is at least one token set between parenthesis, these numbers refer to tokens between parenthesis, ignoring all others.
If there is no token between parenthesis, these numbers refer to tokens found in order defined by the rule triggered.

Negative references are defined by a negative integer `<= -1`. Examples: \-1, \-2, \-3, etc.
These numbers refer to the tokens beginning by the last one found by the rule triggered.

Examples:

        tokens:             alpha       beta        gamma       delta       epsilon
        positive refs:      1           2           3           4           5
        negative refs:      -5          -4          -3          -2          -1

        tokens:             alpha       (beta)      gamma       (delta)     epsilon
        positive refs:                  1                       2
        negative refs:      -5          -4          -3          -2          -1

        tokens:             alpha       (beta)      ?gamma¿     (delta)     epsilon
        positive refs:                  1                       2
        negative refs:      (-4/-5)     (-3/-4)     (-3/none)   -2          -1