new Documents()
The Documents tool shows a table of the documents in the corpus and includes functionality for modifying the corpus.
- Tutorials:
Example
let config = {
"columns": null,
"dir": null,
"docId": null,
"docIndex": null,
"query": null,
"sort": null,
};
loadCorpus("austen").tool("documents", config);
Members
-
columns
-
Properties:
Name Type Description columns
columns 'title', 'author', 'pubDate', 'publisher', 'pubPlace', 'keyword', 'collection', 'tokensCount-lexical', 'typesCount-lexical', 'typeTokenRatio-lexical', 'averageWordsPerSentence', 'language'
-
dir
-
Properties:
Name Type Description dir
String The direction in which to sort the results: 'asc' or 'desc'
-
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.
-
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.
-
sort
-
Properties:
Name Type Description sort
String The column to sort the results by