Browse Source

Documentation: Issue #155 — how to use letter group with 'empty string' in letter group

master
Valdis Vitolins 8 years ago
parent
commit
8e93334d1a
1 changed files with 29 additions and 2 deletions
  1. 29
    2
      docs/dictionary.md

+ 29
- 2
docs/dictionary.md View File

@@ -100,20 +100,47 @@ The rules are organized in groups, each starting with a `.group` line:
* `.group`
A group for other characters which don't have their own group.

* `.replace`
See section [Character Substitution](#character-substitution).

* `.L<nn>`
Defines a group of letter sequences, any of which can match with `Lnn` in a
pre or post rule (see below). nn is a 2 digit decimal number in the range 01
to 94. e.g.:
`.L01 b bl br pl pr`

* `.replace`
See section [Character Substitution](#character-substitution).
**notes about letter groups**

There can be up to 200 items in one letter group.

When matching a word, firstly the 2-letter group for the two letters at
the current position in the word (if such a group exists) is searched,
and then the single-letter group. The highest scoring rule in either of
those two groups is used.

`~` Letter in letter group means, that there can be no letter in this group
at the beginning or end of the word.

_For example:_

```
.L01 ~ b c

.group a
L01) a i // A
a (L01 u // B
```
following rules will match for words:

|Word |Match|Spelling|
|-----|-----|--------|
|base |A |bise |
|case |A |cise |
|ace |A |ice |
|tab |B |tub |
|mac |B |tuc |
|tea |B |teu |

### Rules

Each rule is on separate line, and has the syntax:

Loading…
Cancel
Save