Top Qs
Timeline
Chat
Perspective
RiTa
Software toolkit for processing English language From Wikipedia, the free encyclopedia
Remove ads
RiTa is an open-source software toolkit for generative writing and English natural language, originally developed using the Java language by Daniel C. Howe and collaborators, and later implemented in JavaScript as rita.js. Current versions of RiTa (Version 3.0 was released in 2023) are implemented in both Java and JavaScript and integrate with p5.js, Processing, Node and Android.
Remove ads
Features
- Heuristic algorithms for inflection, conjugation, stemming, tokenization, etc.
- Regex lexicon search to match phonemes, POS, meter, soundex and rhyme patterns
- Powerful options for text generation via context-free grammars and Markov chains
- Close integration with the writer-oriented RiScript scripting language (interpreted via Antlr)
- Feature extraction of phonemes, part-of-speech, syllables and stresses
- Letter-to-sound engine for analysis of arbitrary words (with or without a lexicon)
Remove ads
Usage examples
// In JavaScript/Node
let { RiTa } = require('rita');
console.log(RiTa.rhymes('sweet'));
/*[
'beat', 'beet',
'cheat', 'cleat',
'compete', 'complete',
'conceit', 'concrete',
'deceit', 'defeat', ...
]*/
let features = RiTa.analyze('The elephant took a bite!');
console.log(features);
/*{
phones: 'dh-ah eh-l-ah-f-ah-n-t t-uh-k ey b-ay-t !',
stresses: '0 1/0/0 1 1 1 !',
syllables: 'dh-ah eh/l-ah/f-ah-n-t t-uh-k ey b-ay-t !',
pos: 'dt nn vbd dt nn !',
tokens: 'The elephant took a bite !'
}*/
// In Java/Processing
import rita.*;
void setup()
{
size(100, 200);
textSize(16);
fill(0);
String[] words = RiTa.rhymes("sweet");
for (int i = 0; i < words.length; i++) {
text(words[i], 20, 20 + i * 18);
}
println(RiTa.analyze("The elephant took a bite!"));
}
Remove ads
Related projects
- Tracery/Bracery by Kate Compton
- Nlp-Compromise by Spencer Kelly
- Processing (programming language) by Casey Reas and Ben Fry
- p5.js by Lauren McCarthy
- Twine by Chris Klimas
Projects using RiTa
- Zuckifier, 2015. Sam Lavigne
- @SortingBot, 2015. Darius Kazemi
- The Whole Brilliant Enterprise, 2014. Jer Thorp and the Office for Creative Research
- Game Definitions, 2013. Molleindustria
- Mirroring Tears: Visages, 2011. John Cayley and Penny Florence
- The Readers Project, 2009. John Cayley and Daniel C. Howe
License
RiTa is free, libre and open-source according to the GNU General Public License.
Notes
The name RiTa is derived from the old Norse, meaning to mark, scratch, or scribble.
See also
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads