Concordance
kwicFind every occurrence of a word or phrase in Spanish text with surrounding context to inspect exact usage and quote lines; optionally match all inflected forms by lemma.
Instructions
Find every occurrence of a word or a phrase in a text with its context (KWIC concordance).
Use it to see how a word is used in the text and to quote it exactly. Words are compared ignoring case; accents are part of the word (solo and sólo are two words); with by_lemma - by the lemmas of esMorph in the context of the sentence (a word of the query by any lemma of its analyses: vino finds both the wine and the forms of venir). A phrase does not run across the end of a sentence. The texts of a query link ests://datasets/...? are searched one by one: the context does not run into the next text.
The result has "n_matches" - the number of occurrences, and "matches" - the lines in the order of the text: the left context "left", the occurrence "keyword" as written in the text and the right context "right"; a line of a text of a dataset also has the link "path" and the title "title" of that text. The lines are limited by the parameter limit and by about 40 thousand characters of the response in all. The key "warnings" lists the warnings: a text not in Spanish, not all occurrences shown.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"keyword": "<keyword>"
},
"name": "kwic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute path to a UTF-8 text file on the machine where the server runs, or a link ests://datasets/... from find_texts, instead of text: a long text need not be sent in the argument | |
| text | No | Text in Spanish; path can be given instead | |
| limit | No | Largest number of lines in the response | |
| window | No | Number of words of context on the left and on the right | |
| keyword | Yes | Word or phrase | |
| by_lemma | No | Find every form of a word by its lemma: gato finds gatos, cantar finds cantaba |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||