Dataset texts¶
find_texts(dataset, author=null, genre=null, period=null, country=null, gender=null, year_from=null, year_to=null, min_len=null, max_len=null, limit=20, offset=0)
A search for texts in the esTS datasets: a reference for keyness and compare_texts or a sample for analyze_text without searching the web. The texts themselves are not in the response: the tool returns links to them, and the links are passed to path, reference_path, a_paths and b_paths of any tool instead of a file path. The link ests://datasets/<dataset>/<number> is one text. The query link ests://datasets/<dataset>?<filters> is all the texts found. analyze_text and collocations take them as one text, and analyze_text with per_text gives a table of statistics for every text with a summary over the corpus. kwic, dispersion and keyness tell the texts apart: a concordance line names its text, the texts are the parts of the dispersion, phrases do not run from one text into another. In a_paths and b_paths of compare_texts they are separate texts of the corpus. The length of the texts together - query_chars in the response - is limited by the server limit on a text max_text_length. A text longer than the limit (Don Quijote has 2 million characters) is taken in parts: the response gives its number of parts parts, and the link to a part is ests://datasets/<dataset>/<number>?part=<k>.
| Dataset | What it contains | Filters | On disk |
|---|---|---|---|
spanish_literature |
150 works by 33 authors of Spain, Latin America and the Philippines, from the Golden Age to the 1920s (Project Gutenberg, public domain): prose, poems, drama, publicism; a book of poems is one text; the lines of prose, drama and publicism are wrapped inside paragraphs separated by blank lines | author, genre, country, year_from, year_to |
86 MB |
spanish_sonnets |
4259 sonnets of the Diachronic Spanish Sonnet Corpus DISCO 5.0 in the public domain, 15th-20th centuries; stanzas are separated by blank lines | author, period, country, gender |
5 MB |
Both datasets have the length filters min_len and max_len. The author and the country are found by a part of the name regardless of case and accents (in the sonnets «gongora» finds Carlos Sigüenza y Góngora); the country of a sonnet is the country of birth of its author. A filter the dataset does not have gives an error listing the available ones. If nothing is found, warnings names the authors of the dataset with the words of the query, and for a country that matches nothing the countries of the dataset. For prose, drama and publicism warnings reminds that the paragraphs of the cohesion group need blank_lines=true. offset gives the next page of the response. The descriptions of the datasets and their licenses are on the esTS pages Spanish-language literature and Spanish sonnets.
The datasets are not part of the package or of the Docker image. How to download a dataset is described in Data, and the ests://datasets resource shows what is downloaded. How to mount datasets into the image is described in Server over HTTP.
Errors are the ones common to the tools, a dataset not downloaded, a filter the dataset does not have and a wrong filter value: the earliest year later than the latest one.
Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
dataset |
string |
- | Dataset: spanish_literature, spanish_sonnets |
author |
string |
null |
Author, a part of the name regardless of case and accents |
genre |
string |
null |
Genre of spanish_literature: prose, poems, drama, publicism |
period |
string |
null |
Period of spanish_sonnets: 15th-17th, 18th, 19th, 20th |
country |
string |
null |
Country of the author, a part of its Spanish name regardless of case and accents: «España», «México», «Argentina» |
gender |
string |
null |
Gender of the author of a sonnet: F, M |
year_from |
integer |
null |
Earliest year of the first publication in spanish_literature |
year_to |
integer |
null |
Latest year of the first publication in spanish_literature |
min_len |
integer |
null |
Least text length in characters |
max_len |
integer |
null |
Greatest text length in characters |
limit |
integer |
20 |
Number of texts in the response, up to 200 |
offset |
integer |
0 |
How many texts found to skip: the next page of the response |
Result¶
| Field | Type | Description |
|---|---|---|
dataset |
string |
Dataset |
n_found |
integer |
How many texts were found |
query |
string |
Link to all the texts found |
query_chars |
integer |
Length of all the texts found together in characters |
max_text_length |
integer |
The server limit on a text in characters (ESTS_MCP_MAX_TEXT_LENGTH) |
texts |
array[object] |
limit texts after the first offset: the link path, the fields of the dataset record (author, title, genre, country, years of publication; for a sonnet the period, the gender and the years of life of the author), the length n_chars in characters and, for a text longer than the limit, the number of parts parts |
warnings |
array[string] |
Hints if nothing is found, how many texts are left beyond the page, the wrapped lines of prose, drama and publicism |