Grammalecte  Check-in [080bcb8fa0]

Overview
Comment:[doc] syntax update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | doc
Files: files | file ages | folders
SHA3-256: 080bcb8fa081cebfbd2662bc982e5cf1c81acbe08ae542b940723a0853784dbe
User & Date: olr on 2020-04-13 17:52:01
Other Links: manifest | tags
Context
2020-04-13
20:46
[fr] ajustements check-in: aa2e3acd2e user: olr tags: trunk, fr
17:52
[doc] syntax update check-in: 080bcb8fa0 user: olr tags: trunk, doc
17:48
[doc] syntax update check-in: b26524e478 user: olr tags: trunk, doc
Changes

Modified doc/syntax.txt from [f8fea95d48] to [a5a5d747b8].

61
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77

* Error warning, with a message, and optionally suggestions, and optionally a URL
* Text transformation, modifying internally the checked text
* Disambiguation action
* [second pass only] Tagging token
* [second pass only] Immunity rules


On the first pass, you can only write regex rules.
On the second pass, you can write regex rules and token rules. All tokens rules must be written within a graph.


## REGEX RULE SYNTAX ##

    __LCR/option(rulename)!priority__
        pattern
            <<- condition ->> error_suggestions             # message_error|URL
            <<- condition ~>> text_rewriting







<


>







61
62
63
64
65
66
67

68
69
70
71
72
73
74
75
76
77

* Error warning, with a message, and optionally suggestions, and optionally a URL
* Text transformation, modifying internally the checked text
* Disambiguation action
* [second pass only] Tagging token
* [second pass only] Immunity rules


On the first pass, you can only write regex rules.
On the second pass, you can write regex rules and token rules. All tokens rules must be written within a graph.


## REGEX RULE SYNTAX ##

    __LCR/option(rulename)!priority__
        pattern
            <<- condition ->> error_suggestions             # message_error|URL
            <<- condition ~>> text_rewriting
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
    (Mrs?)[.] <<- ~>> \1


### Disambiguation

When the grammar checker analyses a token with `morph()`, before requesting the POS tags to the dictionary, it checks if there is a stored marker for the position of the token. If a marker is found, it uses the stored data and don’t make request to the dictionary.

Command for disambiguation is: `=>>`. No positioning allowed.

There are 4 commands for disambiguation.

`select(n, pattern)`

>   At reference n, select morphologies that match the pattern.








|







586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
    (Mrs?)[.] <<- ~>> \1


### Disambiguation

When the grammar checker analyses a token with `morph()`, before requesting the POS tags to the dictionary, it checks if there is a stored marker for the position of the token. If a marker is found, it uses the stored data and don’t make request to the dictionary.

The command for disambiguation is: `=>>`. No positioning allowed.

There are 4 commands for disambiguation.

`select(n, pattern)`

>   At reference n, select morphologies that match the pattern.