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

poetree.Poem

Class corresponding to a particular poem.

Parameters
ParameterMandatoryData typeDescription
lang1strISO code of the corpus. Values: 'cs', 'de', 'en', 'es', 'fr', 'hu', 'it', 'pt', 'ru'
id_1intId(DB) if the poem

method :: get_body

Get body of the poem (if not fetched yet), store it in self.content_ and return it

Parameters

None

Returns
Data typeDescription
dictObject representing body of the poem

method :: get_all

Get body of the poem (if not fetched yet), store it in self.content_ and return it together with metadata

Parameters

None

Returns
Data typeDescription
dictObject representing body and metadata of the poem

method :: metadata

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

Parameters
ParameterMandatoryData typeDescription
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)