new TermsBerry()
The TermsBerry tool provides a way of exploring high frequency terms and their collocates (words that occur in proximity).
- Tutorials:
Example
let config = {
categories: null, // a query for the keywords (can be comma-separated list)
context: null, // a named stopword list or comma-separated list of words
docId: null, // document index to restrict to (can be comma-separated list)
docIndex: null, // the size of the context (the number of words on each side of the keyword)
numInitialTerms: null, // the initial number of terms to display
query: null, // the initial number of terms to display
stopList: null, // the initial number of terms to display
};
loadCorpus("austen").tool("termsberry", config);
Members
-
categories
-
Properties:
Name Type Description categories
String The categories ID to use. For more information see the Categories documentation.
-
context
-
Properties:
Name Type Default Description context
Number 2 The number of terms to consider on each side of the keyword.
-
docId
-
Properties:
Name Type Description docId
String | Array.<String> The document ID(s) to restrict the results to.
-
docIndex
-
Properties:
Name Type Description docIndex
Number | Array.<Number> The document index(es) to restrict the results to.
-
numInitialTerms
-
Properties:
Name Type Description numInitialTerms
Number The number of initial terms to display.
-
query
-
Properties:
Name Type Description query
String | Array.<String> A query or array of queries (queries can be separated by a comma). For query syntax, see the search documentation.
-
stopList
-
Properties:
Name Type Default Description stopList
String auto A comma-separated list of words, a named list or a URL to a plain text list, one word per line. By default this is set to 'auto' which auto-detects the document's language and loads an appropriate list (if available for that language). Set this to blank to not use the default stopList. For more information see the Stopwords documentation.