Updated README

This commit is contained in:
Lucien Cartier-Tilet 2020-04-04 18:11:26 +02:00
parent 83eb861680
commit cfab840bb0
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 113 additions and 45 deletions

View File

@ -48,38 +48,42 @@
}
#+END_SRC
As you can see, backreferences have their syntax modified from ~\1~ to ~$1~
for instance, and look-ahead and look-behind expressions must be incorporated
into the expression.
And here is the JSON generated by this project (beautified, the original is on
one line only without unnecessary whitespace):
#+BEGIN_SRC json
{
"version": "1",
"categories": {
"B": "ou",
"C": "ptcqbdgmnlrhs",
"F": "ie",
"Z": "bgd",
"L": "āēīōū",
"S": "ptc",
"V": "aeiou"
"L": "āēīōū",
"V": "aeiou",
"Z": "bgd",
"F": "ie",
"C": "ptcqbdgmnlrhs",
"B": "ou"
},
"rules": {
"(?P<b>%B)ct": "$but",
"(?P<b>%V)t(?P<a>%V)": "$bd$a",
"u$": "o",
"(?P<b>%V)c(?P<a>%V)": "$bg$a",
"(?P<b>%V)v(?P<a>%V)": "$b$a",
"gn": "nh",
"ii": "i",
"(?P<f>%F)ct": "$fit",
"i(?P<v>%V)": "j$v",
"(?P<b>%V)p(?P<a>%V)": "$vb$a",
"(?P<v>%Vr)e$": "$v",
"lj": "lh",
"[sm]$": "",
"%L": "%V",
"(?P<v>%V)pt": "$vt",
"(?P<c>%C)er(?P<v>%V)": "$cr$v"
}
"rules": [
["[sm]$", ""],
["i(%V)", "j$1"],
["%L", "%V"],
["(%Vr)e$", "$1"],
["(%V)v(%V)", "${1}$2"],
["u$", "o"],
["gn", "nh"],
["(%V)p(%V)", "${1}b$2"],
["(%V)t(%V)", "${1}d$2"],
["(%V)c(%V)", "${1}g$2"],
["(%F)ct", "${1}it"],
["(%B)ct", "${1}ut"],
["(%V)pt", "${1}t"],
["ii", "i"],
["(%C)er(%V)", "${1}r$2"],
["lj", "lh"]
]
}
#+END_SRC
@ -88,30 +92,94 @@
---
version: "1"
categories:
Z: bgd
S: ptc
V: aeiou
F: ie
L: āēīōū
B: ou
S: ptc
L: āēīōū
Z: bgd
C: ptcqbdgmnlrhs
F: ie
V: aeiou
rules:
"%L": "%V"
(?P<b>%V)v(?P<a>%V): $b$a
u$: o
"[sm]$": ""
gn: nh
(?P<f>%F)ct: $fit
(?P<b>%V)p(?P<a>%V): $vb$a
ii: i
(?P<c>%C)er(?P<v>%V): $cr$v
lj: lh
(?P<v>%Vr)e$: $v
(?P<b>%V)c(?P<a>%V): $bg$a
(?P<b>%B)ct: $but
i(?P<v>%V): j$v
(?P<b>%V)t(?P<a>%V): $bd$a
(?P<v>%V)pt: $vt
- - "[sm]$"
- ""
- - i(%V)
- j$1
- - "%L"
- "%V"
- - (%Vr)e$
- $1
- - (%V)v(%V)
- "${1}$2"
- - u$
- o
- - gn
- nh
- - (%V)p(%V)
- "${1}b$2"
- - (%V)t(%V)
- "${1}d$2"
- - (%V)c(%V)
- "${1}g$2"
- - (%F)ct
- "${1}it"
- - (%B)ct
- "${1}ut"
- - (%V)pt
- "${1}t"
- - ii
- i
- - (%C)er(%V)
- "${1}r$2"
- - lj
- lh
#+END_SRC
Although most of the rules are not between double quotes, it is preferable to
write them as follows in order to avoid any issues with LangEvolveRs:
#+BEGIN_SRC yaml
---
version: "1"
categories:
B: ou
S: ptc
L: āēīōū
Z: bgd
C: ptcqbdgmnlrhs
F: ie
V: aeiou
rules:
- - "[sm]$"
- ""
- - "i(%V)"
- "j$1"
- - "%L"
- "%V"
- - "(%Vr)e$"
- "$1"
- - "(%V)v(%V)"
- "${1}$2"
- - "u$"
- "o"
- - "gn"
- "nh"
- - "(%V)p(%V)"
- "${1}b$2"
- - "(%V)t(%V)"
- "${1}d$2"
- - "(%V)c(%V)"
- "${1}g$2"
- - "(%F)ct"
- "${1}it"
- - "(%B)ct"
- "${1}ut"
- - "(%V)pt"
- "${1}t"
- - "ii"
- "i"
- - "(%C)er(%V)"
- "${1}r$2"
- - "lj"
- "lh"
#+END_SRC
You can find more information on how to use regular expressions with this