diff --git a/README.org b/README.org index 9692cc2..d22c234 100644 --- a/README.org +++ b/README.org @@ -6,6 +6,140 @@ [[https://github.com/ceronyon/LangEvolve/][Ceronyon]]. This tool is a conlanging tool used to apply sound change rules on words or text. +* Differences with the original project + The main difference with the main project resides in its settings format: + while the original project only supports the JSON format, this project + supports both the JSON and the Yaml formats. The settings are also represented + differently in JSON between the original project and this one. Lastly, the + regex crate used in this project does not allow certain expressions, such as + look-ahead and look-behind searches, and backreferences. To get a better idea + of what I am talking about, here is the example json given by the original + project for Latin to Portugese: + #+BEGIN_SRC json + { + "version" : "1", + "categories" : { + "V" : "aeiou", + "L" : "āēīōū", + "C" : "ptcqbdgmnlrhs", + "F" : "ie", + "B" : "ou", + "S" : "ptc", + "Z" : "bdg" + }, + "rules" : [ + { "[sm]$" : "" }, + { "i(%V)" : "j\\1" }, + { "%L" : "%V" }, + { "(%Vr)e$" : "\\1" }, + { "(%V)v(%V)" : "\\1\\2" }, + { "u$" : "o" }, + { "gn" : "nh" }, + { "(%V)p(?=%V)" : "\\1b" }, + { "(%V)t(?=%V)" : "\\1d" }, + { "(%V)c(?=%V)" : "\\1g" }, + { "(%F)ct" : "\\1it" }, + { "(%B)ct" : "\\1ut" }, + { "(%V)pt" : "\\1t" }, + { "ii" : "i" }, + { "(%C)er(%V)" : "\\1r\\2" }, + { "lj" : "lh" } + ] + } + #+END_SRC + + 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": [ + ["V", "aeiou"], + ["L", "āēīōū"], + ["C", "ptcqbdgmnlrhs"], + ["F", "ie"], + ["B", "ou"], + ["S", "ptc"], + ["Z", "bgd"] + ], + "rules": [ + ["[sm]$", ""], + ["i(?P%V)", "j$v"], + ["%L", "%V"], + ["(?P%Vr)e$", "$v"], + ["(?P%V)v(?P%V)", "$b$a"], + ["u$", "o"], + ["gn", "nh"], + ["(?P%V)p(?P%V)", "$vb$a"], + ["(?P%V)t(?P%V)", "$bd$a"], + ["(?P%V)c(?P%V)", "$bg$a"], + ["(?P%F)ct", "$fit"], + ["(?P%B)ct", "$but"], + ["(?P%V)pt", "$vt"], + ["ii", "i"], + ["(?P%C)er(?P%V)", "$cr$v"], + ["lj", "lh"] + ] + } + #+END_SRC + + By the way, here is the Yaml equivalent generated by this project: + #+BEGIN_SRC yaml + --- + version: "1" + categories: + - - V + - aeiou + - - L + - āēīōū + - - C + - ptcqbdgmnlrhs + - - F + - ie + - - B + - ou + - - S + - ptc + - - Z + - bgd + rules: + - - "[sm]$" + - "" + - - i(?P%V) + - j$v + - - "%L" + - "%V" + - - (?P%Vr)e$ + - $v + - - (?P%V)v(?P%V) + - $b$a + - - u$ + - o + - - gn + - nh + - - (?P%V)p(?P%V) + - $vb$a + - - (?P%V)t(?P%V) + - $bd$a + - - (?P%V)c(?P%V) + - $bg$a + - - (?P%F)ct + - $fit + - - (?P%B)ct + - $but + - - (?P%V)pt + - $vt + - - ii + - i + - - (?P%C)er(?P%V) + - $cr$v + - - lj + - lh + #+END_SRC + + You can find more information on how to use regular expressions with this + project in the documentation of the regex crate [[https://docs.rs/regex/1.3.6/regex/][here]]. + * License LangEvolveRs is licensed under the AGPLv3 license. The full license can be found [[file:agpl-3.0.txt][here]].