RiTa
index
Name RiTa
Description A range of constants and (static) utility functions for the rita package
Constructors
RiTa();
Fields
RiTa.VERSION   The current version number for the RiTa package.

This is the # output to the console when the first RiTa class is loaded.

Methods
RiTa.allCaps()   Verifies all chars are are capital letters

RiTa.allLetters()   Verifies all characters in all words are lowercase letters

RiTa.allLowerCase()   Verifies all characters in all (non-null) words are lowercase letters

RiTa.chomp()   Removes white-space and line breaks from start and end of String

RiTa.contains()   Returns true if array contains the item, else false

RiTa.count()   counts the # of times 'toMatch' appears in input

RiTa.cwd()   Returns a String holding the current working directory

RiTa.disableServer()   Disables server processing for RiTa. Note: This does not kill the server process itself if one is running.

RiTa.dynamicCast()   Returns the passed in Object after dynamically casting it to the specified interfaces.
Note: 'toCast' must be a an instance of a public class.

RiTa.elapsed()   Returns time since start as float (in seconds)

RiTa.endsWithPunctuation()   Returns true if 'input' ends with a punctuation character

RiTa.equals()   Returns true if all elements of the 2 lists are equal, and have the same ordering, testing the elements in each with {@link Object#equals(Object)}

RiTa.exceptionToString()   Returns a String representation of Exception and stacktrace (only elements with line numbers)

RiTa.getOpenClassWords()   Returns an array without the closed-class words

RiTa.getOS()   Returns a String representing the current OS ["mac", "windows", "linux" ]

RiTa.hideCursor()   Hides the cursor for the duration of the program (requires an application or signed applet).

RiTa.is3D()  

RiTa.isAbbreviation()   Returns true if 'input' is an abbreviation

RiTa.isAllCaps()   Verifies only the absence of lowercase letters

RiTa.isClosedClass()   Returns true if word is a close-class word.

RiTa.isLowerCase()   Verifies that every character in word is lowerCase

RiTa.isQuestion()   Returns true if sentence starts with a question sword.

RiTa.isSentenceEnd()   Returns true if 'currentWord' is the final word of a sentence.

This is a simplified version of the OAK/JET sentence splitter method.

RiTa.isServerEnabled()   Returns whether RiTa will attempt to use the server for processing. Note: this does say mean that a server process is actually running (or not).

RiTa.isStopWord()   Returns true if the word is a so-called 'stop-word'

RiTa.isTitleCase()   Verifies the first char is upperCase and the rest are lowerCase

RiTa.isUpperCase()   Returns true if all characters are uppercase letters

RiTa.isVowel()   Returns true if c is a vowel

RiTa.isW_Question()   Returns true if sentence starts with a w-question word, eg (who,what,why,where,when,etc.)

RiTa.join()   Concatenates the array 'input' into a single String, spearated by 'delim'

RiTa.loadPropertyFile()   Loads a properties-format (key=value) File from the 'data' directory (if the path is relative) and parses it into a Map

RiTa.loadSample()   Convenience method that loads a RiSample object and (if 'setLooping' is true) starts it looping.

RiTa.loadString()   Loads a File by name and reads the contents into a single String

RiTa.loadStrings()   Opens a URL (line-by-line) and reads the contents into a String[], one line per array element

RiTa.loopSample()   Convenience method that loads a RiSample object and starts it looping.

RiTa.mainc()  

RiTa.noCaps()   Verifies the absence of uppercase letters

RiTa.openStream()   Opens an InputStream for the specified file

RiTa.playSample()   Convenience method that loads a RiSample object and starts it playing.

RiTa.posTag()   Uses the default PosTagger to tag the input with the PENN tag set

RiTa.random()   Returns a random element from a List

RiTa.randomOrdering()   Returns a randomly ordered array of unique integers from 0 to numElements -1. The size of the array will be numElements.

RiTa.refreshServer()   Clears all objects from the RiTaServer so that they can be reloaded

RiTa.removeRandom()   Removes a random element from a Collection, maintaining the ordering

RiTa.replaceEntities()   Returns input String with XML/HTML entities replaced

RiTa.resetCallbackTimer()   Resets the callback timer with the specified name

RiTa.setCallbackTimer()   Creates and returns a new callback timer which will generate callbacks to pApplet.onRiTaEvent(RiTaEvent) according to the parameters specified.

RiTa.shuffleKeys()   Returns a shuffled view of the key list for a map

RiTa.split()   An alternative to {@link String#split(String)} that optionally returns the delimiters.

RiTa.splitSentences()   Delegates to the default sentencer parser to split text into sentences

RiTa.stopCallbackTimer()   Stops the callback timer with the specified name

RiTa.stopCallbackTimers()   Stops all callback timers currently running

RiTa.strArr()   Converts the List to a String array

RiTa.stripMarkup()   Returns input String stripped of HTML markup

RiTa.stripPunctuation()   Strips any punctuation characters from the String

RiTa.tokenize()   Uses the default WordTokenizer to split the line into words and places, then the results in result

RiTa.toString()   Returns a formatted String from a float[]

RiTa.trim()   Trims null entries off the end of an array. Returns a new array consisting of the elements from 0 to the last non-null element.

RiTa.trimEnds()   Trims whitespace from both ends of token

RiTa.trimPunctuation()   Trims punctuation from each side of the token (does not trim whitespace or internal punctuation).

RiTa.trimRegex()   Removes the regex pattern from either side of the string.

RiTa.useServer()   Enables the RiTaServer on host (default=localhost) using port (default=4444). Note: one must still start the server process (via the scripts provided).

RiTa.writeFile()   Creates a File with fname and writes the String[] 'lines' to it

Usage Web & Application