about
people
how to cite
dataset
versions
json schema
resources
browse
search
authors
books
corpora
https://versologie.cz/poetree/api/corpora
Return the list of available corpora and their basic characteristics (# of authors, # of poems...).
The response is a JSON of the following structure:
[ { "corpus": (str) ISO code of corpus language, "desc": (str) Description of corpus, "n_authors": (int) # of authors, "n_poems": (int) # of poems, "n_lines": (int) # of lines, "n_types": (int) # of types, "n_tokens": (int) # of tokens } ]
Example: List all available corpora.
show https://versologie.cz/poetree/api/corpora
corpus
https://versologie.cz/poetree/api/corpus
Return the metadata on a single corpus (# of authors, # of poems...).
ParameterMandatoryData typeDescription
corpus1strCorpus to get metadata of
The response is a JSON of the following structure:
{ "corpus": (str) ISO code of corpus language, "desc": (str) Description of corpus, "n_authors": (int) # of authors, "n_poems": (int) # of poems, "n_lines": (int) # of lines, "n_types": (int) # of types, "n_tokens": (int) # of tokens }
Example: Get metadata on PoeTree.fr
show https://versologie.cz/poetree/api/corpus?corpus=fr
authors
https://versologie.cz/poetree/api/authors
Return the list of authors and their metadata in a particular corpus.
ParameterMandatoryData typeDescription
corpus1strCorpus to scan
country0strLimit to authors from certain countries. Either single value (country=pt) or stringified list (country=pt,br)
born_after0intLimit to authors born no sooner than a given year
born_before0intLimit to authors born no later than a given year
died_after0intLimit to authors that died no sooner than a given year
died_before0intLimit to authors that died no later than a given year
The response is a JSON of the following structure:
[ { "id_": (int) id(DB) of author", "name": (str) name of author author.name, "viaf": (str|null) VIAF id author.viaf, "wiki": (str|null) wikidata id author.wiki, "country": (str|null) country iso code if relevant author.country, "born": (int|null) year of birth author.born, "died": (int|null) year of death author.died, "n_poems": (int) number of poems by author } ]
Example: Authors in PoeTree.en coming from uk and born no sooner than 1800
show https://versologie.cz/poetree/api/authors?corpus=en&country=uk&born_after=1800
author
https://versologie.cz/poetree/api/author
Return data on a single author. One of (id_author, wiki, viaf) parameters has to be set.
ParameterMandatoryData typeDescription
corpus1strCorpus to scan
id_author0strAuthor's id(DB)
wiki0intAuthor's wiki id
viaf0intAuthor's viaf id
The response is a JSON of the following structure:
{ "id_": (int) id(DB) of author", "name": (str) name of author author.name, "viaf": (str|null) VIAF id author.viaf, "wiki": (str|null) wikidata id author.wiki, "country": (str|null) country iso code if relevant author.country, "born": (int|null) year of birth author.born, "died": (int|null) year of death author.died, "n_poems": (int) number of poems by author }
Example: Author in PoeTree.en having id_author 1
show https://versologie.cz/poetree/api/author?corpus=en&id_author=1
sources
https://versologie.cz/poetree/api/sources
Return the list of sources (books).
ParameterMandatoryData typeDescription
corpus1strCorpus to scan
id_author0intAuthor of the source id(DB)
wiki0strAuthor of the source wiki id
viaf0strAuthor of the source viaf id
published_before0intLimit to sources published no sooner than a given year
published_after0intLimit to sources published no later than a given year
The response is a JSON of the following structure:
[ { "id_": (int) id(DB) of source, "id": (str) id(JSON) of source source.id, "title": (str|null) title of source source.title, "id_author": (int|list) id(DB) of source author(s), "year_published": (int|null) year when source published source.year_published, "publisher": (str|null) name of publisher source.publisher, "place": (int|null) place where published source.place } ]
Example: Poems from PoeTree.cs written by an author with wiki id Q712420 (Otokar Březina)
show https://versologie.cz/poetree/api/sources?corpus=cs&wiki=Q712420
source
https://versologie.cz/poetree/api/source
Return object representing a single source. One of the (id_source, id_poem) parameters has to be specified.
ParameterMandatoryData typeDescription
corpus1strCorpus to scan
id_source0intId(DB) of the source
id_poem0intId(DB) of the poem its source is to be found
The response is a JSON of the following structure:
{ "id_": (int) id(DB) of source, "id": (str) id(JSON) of source source.id, "title": (str|null) title of source source.title, "id_author": (int|list) id(DB) of source author(s), "year_published": (int|null) year when source published source.year_published, "publisher": (str|null) name of publisher source.publisher, "place": (int|null) place where published source.place }
Example: Source of the poem having id=1 in PoeTree.en
show https://versologie.cz/poetree/api/source?corpus=en&id_poem=1
poems
https://versologie.cz/poetree/api/poems
Return the list of poems written by selected author / coming from selected source and their metadata. One of (id_author, wiki, viaf, id_source) parameters has to be set.
ParameterMandatoryData typeDescription
corpus1strCorpus to scan
id_author0intAuthor's id(DB)
wiki0strAuthor's wiki id
viaf0strAuthor's viaf id
id_source0strId(DB) of the source
The response is a JSON of the following structure:
[ { "id_": (int) id(DB) of poem, "id": (str) id(JSON) of poem id, "title": (str) title of poem title, "id_source": (str) id(DB) of source, "id_author": (int|list) id(DB) of author(s), "year_created_from": (int|null) min year of creation year_created, "year_created_to": (int|null) max year of creation year_created, "duplicate": (false|str) whether considered duplicate duplicate, } ]
Example: Poems from PoeTree.es written by an author with wiki id Q165257 (Lope de Vega)
show https://versologie.cz/poetree/api/poems?corpus=es&wiki=Q165257
poem
https://versologie.cz/poetree/api/poem
Return object representing a single poem
ParameterMandatoryData typeDescription
corpus1strCorpus to scan
id_poem1intId(DB) of the poem
neighbors0boolWhether to include list of nearest neighbors (default: 0)
lines0boolWhether to include object representing lines (default: 1)
words0boolWhether to include objects representing words (default: 1)
multiwords0boolWhether to return multiwords or their parts separately (default: 0)
The response is a JSON of the following structure:
{ "id_": (int) id(DB) of poem, "id": (int) id(JSON) of poem id, "title": (str) title of poem title, "id_source": (int) id(DB) of source, "id_author": (int|list) id(DB) of author(s), "year_created_from": (int|null) min year of creation year_created, "year_created_to": (int|null) max year of creation year_created, "duplicate": (false|str) whether considered duplicate duplicate, "neighbors": (list) list of 20 nearest neighbors neighbors, "body": (list) list representing lines, words... body }
Example: Poem from PoeTree.cs having id_poem=1 without word annotation
show https://versologie.cz/poetree/api/poem?corpus=cs&id_poem=1&words=0
countries
https://versologie.cz/poetree/api/countries
Returns country codes that appear in the corpus and number of authors per country
ParameterMandatoryData typeDescription
corpus1strCorpus to scan
The response is a JSON of the following structure:
{ "{iso-code of country}author.country": (int) number of authors }
Example: Country codes appearing in PoeTree.en
show https://versologie.cz/poetree/api/countries?corpus=en
Supported by the Czech Science Foundation (GA23-07727S)