Reference

Class

RiTa

Name

search

Description Searches for words in the lexicon that match the given criteria, either by phoneme, stress, or letters. If no regex or options are supplied, the full set of words is returned.
Example
RiTa.search();
RiTa.search("tting")
Parameters
Stringregex pattern to match (optional)
Object
(or Map in Java)
options (optional)

{int} options.minLength:
minimum number of characters in target word (default=3)

{int} options.maxLength:
maximum number of characters in target word

{int} options.numSyllables:
target # of syllables in the word

{int} options.limit:
maximum # of results to return

{String} options.type:
use "stresses" to indicate that the regex is for stresses match
use "phones" to indicate that the regex is for phonemes match

{String} options.pos:
target part-of-speech for the word
either from the Penn tag set or the simplified tag set [a, r, v, n]

Returns
String[]array of words matching the search criteria in the lexicon (or all words if no criteria is provided)
Syntax
RiTa.search()
RiTa.search(regex);
RiTa.search(regex, opts);
Platform Java / JavaScript