Nesca is a "sound change applier", it takes a set of transformation rules and applies them to words to simulate historical sound changes or under similar conditions. It also offers other word modification utilities including capitalisation and X-SAMPA to IPA. Nesca is an easy to use but powerful tool for conlangers and linguists.
Nesca lives online at neonnaut.neocities.org/nesca
Documentation lives online at neonnaut.neocities.org/nesca_docs
Install with npm install nesca
, or yarn add nesca
and import it with either:
const nesca = require('nesca'); // CommonJS (Node.js)
import nesca from 'nesca'; // ES modules
There are two parts inside this nesca
instance, the main function apply()
and examples
, below is a very minimal use of the program:
import nesca from 'nesca';
const def = nesca.apply({
file: nesca.examples.basic
});
console.log(def.text);
console.log(def.warnings.join(", "));
console.log(def.errors.join(", "));
console.log(def.infos.join(", "));
The input signature for nesca.apply()
is:
type apply_options = {
file: string;
input_words: string;
apply_mode?: Apply_Mode;
word_divider?: string;
};
The properties of the return type of nesca.apply()
are:
type apply_output = {
text: string; // The changed corpus of words.
errors: string[]; // A list of errors that occurred, that terminated the run.
warnings: string[]; // A list of warnings that occurred.
infos: string[]; // Useful information about the run.
diagnostics: string[]; // Useful information about parsing the file on debug mode.
}
There is 1 example to choose from in nesca.examples
: default
.
To build use npm run build
. For live testing use npm run dev
.