| RiTa | |
|---|---|
| Original author | Daniel C. Howe |
| Developer | RiTa Contributors |
| Stable release | v3.0.2
/ January 1, 2022 |
| Written in | JavaScript, Java |
| Platform | Cross-platform |
| Type | Natural Language |
| License | GPL |
| Website | rednoise |
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.
// 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!"));
}
RiTa is free, libre and open-source according to the GNU General Public License.
The name RiTa is derived from the old Norse, meaning to mark, scratch, or scribble.