Designed to support the creation of new works of computational writing, the free and open-source RiTa† library provides tools for artists and writers working with natural language in programmable media. The library is designed to be simple while still enabling a range of powerful features, from the included RiScript scripting language, to grammar and Markov-based text generation, to inflection, conjugation, stemming, tokenization and feature-analysis (for pos, phonemes, syllables, stresses, etc). RiTa is implemented in both Java and JavaScript and runs in a number of popular programming environments including p5.js, Processing, Node and Android.
† from old Norse, meaning to mark, scratch, or scribble
Text-generation via Markov-chains and context-free grammars (with built-in support for RiScript)
Smart lexicon search to match pos, stress, syllable and letter count, stress, soundex, and rhyme (regex) patterns
Modules for tokenization, inflection,
stemming, verb conjugation, and
concordance/KWIC model creation
Customizable lexicon with a powerful letter-to-sound algorithm for analysis of unknown words
Taggers for a range of granular features, including phonemes, stress, part-of-speech, syllables, etc.
Runs in Node or the browser
with or without p5/js & Processing
(also in Android)