• Stars
    star
    354
  • Rank 120,042 (Top 3 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 12 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RiTa: the generative language toolkit

*** This repository is deprecated. See the current version of RiTa HERE. ***


RiTa: the generative language toolkit

The RiTa website

RiTa is designed to be an easy-to-use toolkit for experiments in natural language and generative literature. It is implemented in Java and JavaScript (with a unified API for both) and optionally integrates with Processing, Android, Node, p5.js, Browserify, Bower, etc. It is free/libre and open-source via the GPL license (http://www.gnu.org/licenses/gpl.txt).

Please see https://github.com/dhowe/RiTaJS for the JavaScript implementation of RiTa.

About the project

Support us with a monthly donation and become a backer!


A Simple Example (Java)

    For JavaScript examples, go here

  1. Create a new Java project in Eclipse (or your IDE of choice)
  2. Download rita.jar and add it to the build path for the project. In eclipse: 'Project' > 'Properties' > 'Java Build Path' > 'Libraries' > 'Add External JARs...'
  3. Create and run a new class, SimpleExample.java, with the following code:
import rita.*;

public class SimpleExample {

  public static void main(String[] args) {

    RiString rs = new RiString("The elephant took a bite!");
    System.out.println(rs.features());
  }
}

In Processing

To install:

  1. Open Processing and select 'Sketch' menu > 'Import Library...' > 'Add Library...'
  2. Search for 'RiTa' and then install it

Create an example sketch as follows (and/or see the included examples):

import rita.*;
import java.util.*;

void setup() {

  size(600, 200);
  background(50);
  textSize(20);
  noStroke();

  RiString rs = new RiString("The elephant took a bite!");
  Map data = rs.features();

  float y = 15;
  for (Iterator it = data.keySet().iterator(); it.hasNext();) {
    String key = (String) it.next();
    text(key + ": " + data.get(key), 25, y += 26);
  }
}

In Processing (Android-mode)

  1. If RiTa library is not installed, open Processing and select 'Sketch' menu > 'Import Library...' > 'Add Library...'
  2. Search for 'RiTa' and then install it
  3. Follow these instructions to setup your environment, OR follow steps 4-6 below
  4. Switch to Android mode in Processing 3.x on PC or Mac by clicking the 'Java' button on the upper-right of the UI, then select 'Add Mode...'
  5. Select 'Android Mode' from 'Contribution Manager' window and then install it and the required Android SDK when prompted
  6. Restart Processing and input the example sketch below
  7. Switch to 'Android' mode by clicking the 'Java' button
  8. Connect your Android device to your PC via a USB cable
  9. On your Android device, go to ‘Settings’ - ‘About phone’ and tap on ‘Build number’ for five times to become a developer 10.Go back to ‘Settings’, go to ‘Developer options’ and switch on ‘USB debugging'
  10. Run the example sketch

An example sketch:

import rita.*;
import java.util.*;

void setup() {

  size(600, 200);
  background(50);
  textSize(20);
  noStroke();

  RiString rs = new RiString("The elephant took a bite!");
  Map data = rs.features();

  float y = 15;
  for (Iterator it = data.keySet().iterator(); it.hasNext();) {
    String key = (String) it.next();
    text(key + ": " + data.get(key), 25, y += 26);
  }
}

Can I contribute?

Please! We are looking for more coders to help out... Just press Fork at the top of this page and get started, or follow the instructions below...

If you don't feel like coding but still want to contribute, please send a twitter message to @RiTaSoftware.


Development Setup (in Eclipse)

  1. Download and install Eclipse for Java.

  2. In the Eclipse menu, select 'File' > 'Import...'

  3. In the 'Import Window' select 'Git' > 'Projects from Git', then press Next.

  4. 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.

  5. Press Next to proceed with the default master branch or (optionally) configure the project directory.

  6. Press Next and select 'Import existing projects' to finish.

  7. Right click on 'pom.xml' from RiTa root directory in Package Explorer panel in Eclipse and select 'Run as' > 'Maven install'.

  8. To run the tests:

    a. Navigate to the RiTa/resources directory and right-click on 'build.xml'

    b. Select 'Run as' > 'Ant Build' to compile and run the tests in JUnit.

  9. To build the project:

    a. In the Eclipse menu, select 'Window' > 'Show View' -> 'Ant

    b. Click the 'Add buildfile' button to add a buildfile in the newly added Ant panel, and navigate to RiTa/resources/build.xml

    c. 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)

    d. (Optional) if you are on Windows, you can use cygwin, by installing ant and using it to run the command $ cd RiTa/resources && ant build.

    e. When the build is complete, project resources can be found in RiTa/dist

  10. Work on an existing issue, then submit a pull request...

  11. (Optional) If you encounter error java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version, follow these instructions to install Maven manually.


Contributors

Code Contributors

This project exists only because of the people who contribute. Thank you! [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

More Repositories

1

AdNauseamV1

*** This is not the current AdNauseam repository: please find the current repo here:
JavaScript
385
star
2

RiTaJSv1

RiTa: the generative language toolkit (in JS)
JavaScript
268
star
3

ritajs-v2

RiTa: generative language tools
JavaScript
103
star
4

rita

Website, documentation and examples for RiTa
JavaScript
71
star
5

RiTaJSHistory

RiTaJS: A generative language toolkit for JavaScript
JavaScript
44
star
6

dialogic

Dialogic: generative interactive dialog
JavaScript
27
star
7

ritajs

RiTa for JavaScript
JavaScript
23
star
8

AdNauseam-chrome

A Chrome extension to help defend against surveillance and tracking by ad-networks
JavaScript
19
star
9

ChinaEye

Experience the web as if you were living in China...
JavaScript
9
star
10

rita4j

RiTa for Java
Java
8
star
11

annograms

JavaScript
3
star
12

AdLiPo

Replacing ads with generative language
JavaScript
2
star
13

spectre

SPECTRE
JavaScript
2
star
14

TrackMeNot

Development for TrackMeNot v2 (2022)
2
star
15

RiTranslate

A translation API for RiTa
Java
2
star
16

PerceptualReader

Java
2
star
17

Website

Website
JavaScript
2
star
18

riscript

RiScript: a minor language
JavaScript
2
star
19

GetGen

A Workshop for Processing Community Day @ HK 2019
JavaScript
2
star
20

rws

A micro-workshop on randomness
Processing
2
star
21

AoAServer

Architecture of Association server
Java
1
star
22

GML

Vogel's Generative Movement Language (GML)
Java
1
star
23

AdCollector

JavaScript
1
star
24

ReadersJS

JavaScript
1
star
25

spectre-server

JavaScript
1
star
26

TrackMeNotWeb

Website for TrackMeNot Project
HTML
1
star
27

spectre-mail

spectre-mail
JavaScript
1
star
28

ReadersWeb

Website for The Readers Project
HTML
1
star
29

GlyphFlock

Demo of path-based flocking in p5.js
JavaScript
1
star
30

LongestCommonPhrase

LongestCommonPhrase implementation
Java
1
star
31

Assign7

Assign7
JavaScript
1
star
32

SomeThingWeAre

JavaScript
1
star
33

AdLiPoV2

Updated AdLiPo Dev
JavaScript
1
star
34

ritwit

The RiTwit library for js
JavaScript
1
star
35

RiTaBox2d

JavaScript
1
star
36

AdWatch

AdNauseam automated with Nightwatch
JavaScript
1
star