about
people
how to cite
dataset
versions
json schema
resources
browse
search
authors
books

poetree.Author

Class corresponding to a particular author. *One of id_author / wiki / viaf parameters needs to be set.

Parameters
ParameterMandatoryData typeDescription
lang1strISO code of the corpus. Values: 'cs', 'de', 'en', 'es', 'fr', 'hu', 'it', 'pt', 'ru'
id_author0intId(DB) if the author
wiki0strWiki id of the author
viaf0strVIAF id of the author
base_url0strAPI base_url. Default: 'https://versologie.cz/poetree/api/'

method :: get_sources

Get metadata of sources by the author. Create a new Source instance for each source, store it in a list and return it.

Parameters
ParameterMandatoryData typeDescription
published_after0intLimit to sources published no sooner than a given year
published_before0intLimit to sources published no later than a given year

Returns
Data typeDescription
listList holding instances of Source

method :: get_poems

Get metadata of poems by the author. Create a new Poem instance for each poem, store it in a list and return it.

Parameters
ParameterMandatoryData typeDescription
id_source0intLimit to poems from certain source

Returns
Data typeDescription
listList holding instances of Poem

method :: metadata

Returns metadata of selected target as a list, pandas dataframe or prints out a stringified table. It may be sorted according to any metadata key.

Parameters
ParameterMandatoryData typeDescription
target0strMetadata of what to return. Values: 'sources', 'poems', 'self'. Default: 'self'
output0strOutput format. Values: 'list', 'pandas', 'print'. Default: 'list'
sortby0strSubdict key according to which sort the list. Default: None
reverse0boolSort in reversed (descending) order. Default False

Returns
Data typeDescription
(list|pd.DataFrame|None)metadata
Supported by the Czech Science Foundation (GA23-07727S)