new Phrases()
The Phrases tool shows repeating sequences of words organized by frequency of repetition or number of words in each repeated phrase. You can work with phrases programmatically using Spyral.Corpus#phrases.
- Tutorials:
Example
let config = {
"columns": null,
"dir": null,
"docId": null,
"docIndex": null,
"maxLength": null,
"minLength": null,
"overlapFilter": null,
"query": null,
"sort": null
};
loadCorpus("austen").tool("phrases", config);
Members
-
columns
-
Properties:
Name Type Description columnscolumns 'term', 'rawFreq', 'length', 'distributions'
-
dir
-
Properties:
Name Type Default Description dirString desc The direction in which to sort the results: 'asc' or 'desc'
-
docId
-
Properties:
Name Type Description docIdString | Array.<String> The document ID(s) to restrict the results to.
-
docIndex
-
Properties:
Name Type Description docIndexNumber | Array.<Number> The document index(es) to restrict the results to.
-
height
-
Properties:
Name Type Description heightNumber The display height of the tool in pixels. -
maxLength
-
Properties:
Name Type Default Description maxLengthNumber 50 The maximum length (number of words) of the phrase to consider.
-
minLength
-
Properties:
Name Type Default Description minLengthNumber 2 The minimum length (number of words) of the phrase to consider.
-
overlapFilter
-
Properties:
Name Type Default Description overlapFilterString length Specifies the strategory for prioritizing and filtering out phrases. Options are: 'none' (no filtering), 'length' (prioritize phrase length), or 'rawFreq' (prioritize phrase frequency). See Phrases options for more info.
-
query
-
Properties:
Name Type Description queryString | Array.<String> A query or array of queries (queries can be separated by a comma). For query syntax, see the search documentation.
-
sort
-
Properties:
Name Type Default Description sortString length The column to sort the results by
-
style
-
Properties:
Name Type Description styleString A string of CSS properties to use as the style attribute for the tool's parent tag. -
width
-
Properties:
Name Type Description widthNumber The display width of the tool in pixels.