Tools¶
The tools of the server measure a text with the statistics of esTS. All of them only read the given text: they store nothing and do not go to the network.
| Tool | What it does | Data |
|---|---|---|
analyze_text |
Statistics of a text in eleven groups with readings by scales | frequency dictionary for the lexical group |
kwic |
All occurrences of a word or a phrase with their context | - |
collocations |
Pairs of words that occur together more often than by chance | - |
dispersion |
How evenly words are spread over the text | - |
keyness |
Keywords against Spanish books or another text | frequency dictionary if no reference text is given |
compare_texts |
How two corpora of texts differ by style features | - |
visualize |
A chart of a text as an image with a summary in numbers | - |
find_texts |
Texts of the esTS datasets as links for the other tools | a downloaded dataset |
How to download the data is described in Data. The definitions and formulas of the metrics are in the esTS documentation: the server passes the values of esTS as they are.
Text¶
A text is given by the text argument or by the path to a file path - an absolute path to a UTF-8 file on the machine where the server runs; over HTTP - only from the ESTS_MCP_FILES_DIR directory. Instead of a path a link ests://datasets/... to a dataset text from find_texts can be passed. A file is handier for a long text: the agent does not have to send it in an argument, and the statistics are computed on the original text rather than on its retelling. A text and a corpus are limited in length: ESTS_MCP_MAX_TEXT_LENGTH, 500,000 characters by default (see Settings).
Line breaks matter: a line of the text is a line of verse for the verse group and a paragraph for the cohesion group, and a blank line separates stanzas. Words are compared ignoring case, while the written accent is part of a word: «solo» and «sólo», «el» and «él» are different words.
Response¶
Every response has the warnings key (in visualize - the last lines of the summary) - the reasons why values may be unstable or meaningless for this text: a short text, a text not in Spanish, the dictionary not downloaded, a statistic undefined on the text. The agent should read them before drawing conclusions. Numbers are rounded to four significant digits, an undefined value is null. Descriptions, readings and warnings are in English; the bands of the Spanish readability scales keep the Spanish names their authors gave them («normal», «algo difícil»).
Errors¶
An error reaches the agent as a tool error with a message saying what is wrong with the call. Common to all tools:
- an argument does not pass the schema of the tool: a wrong type, a number out of the allowed range, a value not in the list;
- no text is given, or it is given together with a path to a file;
- a link to a dataset is given as the text, not as the path;
- the path is not absolute (a URI
file://is accepted), the file cannot be read, is not a UTF-8 text file (a Word or PDF document, another encoding) or exceeds the limit; - the text is longer than the
ESTS_MCP_MAX_TEXT_LENGTHlimit; - the text has lone UTF-16 surrogate characters: this happens when a string is cut in the middle of an emoji;
- a link to a dataset names a dataset or a text that is not there, a dataset not downloaded, or texts longer than the limit.
The errors that depend on a tool are listed on its page.