Reference

Class

RiTa

Name

concordance

Description Creates a concordance, a list of words with their frequency of occurence, from the given text and options
Example

// Java

opts = new HashMap();
opts.put("ignoreCase", false);
opts.put("ignoreStopWords", true);

result = RiTa.concordance(text, opts);


// JavaScript

opts = {
ignoreCase: false,
ignoreStopWords: true
};

result = RiTa.concordance(text, opts);

Parameters
Stringthe text
Object
(or Map
options (optional) the relevant options for the KWIC model:

{int} options.wordCount:
# of words of context on either side of input word

{boolean} options.ignoreCase:
Ignore upper/lower case in the model

{boolean} options.ignoreStopWords:
Ignore words like 'the', 'and', 'a', 'of', etc, as specified in RiTa.STOP_WORDS

{boolean} options.ignorePunctuation:
Ignore punctuation tokens in the model

{String[]} options.wordsToIgnore:
A set of words (alternative stop-words, for example) to ignore.

Returns
Object
(or Map in Java)
the concordance
Note See https://en.wikipedia.org/wiki/Concordance_%28publishing%29
Syntax
RiTa.concordance(text, opts);
Platform Java / JavaScript