new Topics()
The Topics tool provides a rudimentary way of generating term clusters from a document or corpus and then seeing how each topic (term cluster) is distributed across the document or corpus. You can work with topics programmatically using Spyral.Corpus#topics.
- Tutorials:
Example
let config = {
"iterations": null,
"perDocLimit": null,
"seed": null,
"stopList": null,
"termsPerTopic": null,
"topics": null
};
loadCorpus("austen").tool("Topics", config);
Members
-
height
-
Properties:
Name Type Description heightNumber The display height of the tool in pixels. -
iterations
-
Properties:
Name Type Default Description iterationsNumber 100 The number of iterations.
-
perDocLimit
-
Properties:
Name Type Default Description perDocLimitNumber 1000 The number of terms to limit each document to.
-
seed
-
Properties:
Name Type Default Description seedNumber 0 The seed to use for random number generation.
-
stopList
-
Properties:
Name Type Default Description stopListString 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.
-
style
-
Properties:
Name Type Description styleString A string of CSS properties to use as the style attribute for the tool's parent tag. -
termsPerTopic
-
Properties:
Name Type Default Description termsPerTopicNumber 10 The number of terms per topic.
-
topics
-
Properties:
Name Type Default Description topicsNumber 10 The number of topics.
-
width
-
Properties:
Name Type Description widthNumber The display width of the tool in pixels.