WordEvolve

This is a Javascript-based psuedo-realistic vocabulary modifier for conlangs based on Mark Rosenfelder's SCA². Click on the small question marks ? for help.

Categories:?This is where you define categories of sounds. The format is X=abcde where X is the category (any single character) and abcde is a run of characters that are a part of that category.
Sound Changes:?This is where you define sound-change rules. They are in the format x/y/z where x is the sound (characters) to be changed, y is the sound it changes to, and z is the context where this change happens. x or y may be blank, but not both.

The context is in the format a_b where a is what comes before the sound, b is what comes after the sound, and _ indicates where the sound itself is. You can use # within a or b to indicate the beginning or the end of a word, and you can use a category name to match any member of that category's run. If both a and b have a category, the nth character in the run of one category will be replaced with the nth character in the run of the other category. If you leave the context blank, it is treated as if it were _.

Optionally, you can add a fourth parameter: x/y/z/j. j is an exception, which is a context like z, but if the exception matches, the sound is not changed.

All parameters can include Javascript regular expressions.

Input Lexicon:?This is the list of words you are changing through use of the sound-change rules, one per line.
Result Lexicon:?After the sound changes are applied, the changed words are printed here.
Output format:
?Changed words are printed by themselves.
?Changed words are printed in the format a → b where a is the original word and b is the changed word.
?Changed words are printed in the format b [a] where a is the original word and b is the changed word.
?If a word is different from the last time it was printed, it will print in bold text. (Note: "differences" may be a change in output format, or if input words were changed.)
?The output below will include a report showing how each sound-change rule changed each word in the input lexicon.
?Clicking Apply Changes starts the engine, printing changed words into the Result Lexicon and other output into the Output section below.
?Clicking Clear Inputs erases everything in the category, sound changes and rewrite rules boxes.
?Clicking Clear Output button erases everything in the Result Lexicon and the Output below.
?Clicking Show Extra Characters button puts a bunch of IPA, Latin, Cyrillic, Armenian, Greek and Coptic characters into the Output section below. (You can then cut and paste them into any of the boxes above!) Note: some characters may not print, especially if on a mobile device.
Rewrite rules:?These are used to perform global replacements on original words in the input lexicon as well as the final, changed words in the result lexicon. For instance, you might use th||T to change the original word them into Tem so that the sound-change rules have something easier to work with. After the word is transformed, the rules are applied in reserve to change Tim into thim.

You can also make rules that only work in one direction. th>>T would only change them into Tem, and th<<T would only change Tim into thim.

One-way rules, on the source side only, can use Javascript regular expressions, as well as %X and !%X expressions where X is the label of a category: %X is replaced with [a-z] and !%X is replaced with [^a-z], where a-z is the run of characters in that category.

Output:
?Clicking Save to Browser will store the current Categories, Sound Changes, Rewrite Rules and the advanced options below to your browser's localStorage, if your browser supports it. If you already have info stored, this will overwrite it!

NOTE: This should not be considered a long-term storage solution, as your browser might delete it if you run out of cache or localStorage space. Use Export Settings to keep an offline backup.
?Clicking Load from Browser will replace the Categories, Sound Changes and Rewrite Rules with the information you previously stored on your browser with the Save button.
?Clicking Clear from Browser will delete any information stored on your browser by the Save button.
?Clicking Import Settings will open a box where you can paste information formatted by Export Settings. Clicking Import below the box will load your settings. Clicking Cancel will close the box.
?Clicking Export Settings will open a box and fill it with formatted information based on the current Categories, Sound Changes and Rewrite Rules, as well as the advanced options below. Copy and save it for your own records, and use Import Settings to reload it at a later date.
Sound-change separator: ?Sound changes, by default, can be written as from/to/environment. The first slash can be replaced by an arrow or > greater-than sign, to better match linguistic convention. If you change this option, the engine will split the input using the string given here instead of a slash. (The initial arrow or > will still work, however.)
Word-boundary character: ?The standard linguistic notation for a word boundary is # the pound sign or hash tag. You can change this using this text box. (You can also use the standard RegExp expression \b.)
Sound-position character: ?The standard linguistic notation for a sound's place in an environment is _ the underscore. You can change this using this text box.
Rewrite separators:
Two way: ?Rewrite rules are in the format from||to. You can change the default double-vertical line splitter by using this text box.
Input only: ?The double greater-than sign indicates a rewrite rule that should only be used before applying sound changes. You can change that using this text box.
Output only: ?The double less-than sign indicates a rewrite rule that should only be used after applying sound changes (replacing 'to' in the final word with 'from'). You can change that marker using this text box.