-
Notifications
You must be signed in to change notification settings - Fork 78
Home
- What is RiTa?
- How do I install RiTa for ...?
- On what platform/language/environment can I use RiTa?
- Why is it called RiTa?
- [Does RiTa use machine learning techniques?]
- [But wouldn’t machine-learning approaches be better?]
- [What does RiTa's heuristic approach mean for the toolkit?]
- How to build RiTa from source?
- How do I build docs?
- What is the usual workflow for developers?
- How should I setup my development environment?
- How do I test a new release?
RiTa is a software toolkit for computational or generative literature. It provides tools for artists and writers working with natural language in programmable media. It is free/libre and open-source, and is designed to be simple while still enabling powerful features: context-free grammars, n-grams, conjugation, tokenization, pluralization, feature-analysis (part-of-speech, phonemes, stresses), etc.
RiTa is implemented in both Java and JavaScript and runs in a number of popular programming environments including Android, Processing, Node, and p5.js.
The name comes from the old Norse, meaning to mark, scratch, or scribble.
No. RiTa is a set of specific heuristic solutions to a constrained set of natural language concerns. Each algorithm is carefully hand-crafted to handle the complexities of the English language. During the years of writing and improving the library, I have learned a great deal about these complexities and now understand the language (and context-sensitive languages in general) in a way I did not imagine at the start.
The short answer is that the library will remain small, fast, and transparent (it should always be relatively clear to other coders what it is doing and why). On the other hand, it will be difficult to extend to other languages. Also, there are tasks for which no good heuristic solutions have been found (this is both a shortcoming and an opportunity), and as such they are absent here.
Yes, such approaches might well be more successful at some of the specific tasks performed by RiTa. However, as an author I am interested in more than just performance. I want RiTa to be approachable by as large/diverse set of users as possible. I also want it to be small and fast, so that it can run in the browser, and in as wide a range of other environments as possible, and I don’t want to require vast amounts of training data… Perhaps most importantly, as an author, I want to gain an understanding of the domain in which I work, and machine-learning approaches do not, and likely will not, provide this. The most successful ML model tells us very little about the domain we are investigating, even though it may produce highly accurate results. And this is not fully satisfactory to me as a creative practitioner…
- Download and install Eclipse for Java.
- In the Eclipse menu, select 'File' > 'Import...'
- In the 'Import Window' select 'Git' > 'Projects from Git', then press Next.
- Select 'Clone URI' > then Next and copy and paste the 'HTTPS clone URL' https://github.com/dhowe/RiTa.git from RiTa's Github page into the URI field.
- Press Next to proceed with the default master branch or (optionally) configure the project directory.
- Press Next and select 'Import existing projects' to finish.
- Right click on 'pom.xml' from RiTa root directory in Package Explorer panel in Eclipse and select 'Run as' > 'Maven install'.
- (If you are also working on RiTaJS) In terminal, run
ln -s /path/to/ritajs js
from rita folder. An alias of RiTaJS will be created in your rita folder. If you have it right, when you build, it should say:
[echo] Checking for rita.js...
[echo] "RiTaJS found..."
include.js:
[echo] Copying js files ...
-
In the Eclipse menu, select 'Window' > 'Show View' -> 'Ant
-
Click the 'Add buildfile' button to add a buildfile in the newly added Ant panel, and navigate to RiTa/resources/build.xml
-
Click to expand the 'RiTa' menu and reveal the various tasks, then double-click 'build' (or run $ cd RiTa/resources && ant build from the terminal)
-
(Optional) Ignore this step if you are on Mac or step 9a to c if you are on Windows, install ant and use cygwin to run the command
$ cd RiTa/resources && ant build
. -
When the build is complete, project resources can be found in RiTa/dist
You can build the docs either by running $ cd RiTa/resources && ant build
or $ cd RiTa/resources && ant make.docs
.
The most common task is working on a test case in KnownIssues-tests.
(RiTa/java/rita/test/KnownIssuesTest.java
or RiTaJS/test/KnownIssues-tests.js
)
In most of the cases, the same issue is valid for both JAVA and JS. You can start fixing the issue either from JAVA or JS, and make sure to make the same changes later to the other one.
After fixing the issue, please remove the test case from KnownIssues-tests and place it to a proper location in another corresponding test file.
Please always change the dictionary in RiTaJS/src/rita_dict.js
You can update the changes to JAVA by running scripts/update-dict.sh
in RiTa
- Step carefully through all 'quickstart' installation [instructions] (http://rednoise.org/rita/quickstart.php)
- Go through WordNet README file
- Go through Android README file
Before release
- Run each of the RiTa examples on each of the platforms:
JavaScript
- In the browser with dom (Chrome/Firefox)
- In the browser with p5.js
- Test 'Analysis' and 'RandomRhymes' examples with no lexicon, using rita.js, rather than rita-full.js and verify that the correct warning message is shown
Java
-
In Processing
-
In Processing for Android (Ignore the example: ReplaceableWriting for Android tests)
-
As a standalone Java program (jar)
-
As a standalone Android app (jar)
Testing RiTa website
- Check and fix errors in the console tab of developer tools for each page
- Check links (with a link-checker) and fix any errors
Post release Pay attention to any error or warning message during the process:
- Install RiTa via
npm install
and test instructions on npm README page - Test the npm/runkit example here: https://runkit.com/npm/rita
- Test RiTa In the browser via browserify instructions
- Download from the library tool within the Processing IDE
- Check that processing library tool is prompting for update if older rita exists
- Verify the version # on RiTa downloads page
- Verify 3 new versions (6 including minified) exist on RiTa downloads
- Verify the existence and version # of the RiTa lib on cdnjs
- Verify the existence and version # of the rita.txt file on rednoise
- Verify that both download links work: rita.zip and RiTa.zip