Configuration data
The config subdirectory of Glottolog data contains machine readable metadata like the list
of macroareas. This information can be accessed via an instance of
pyglottolog.Glottolog
, too, using the stem of the filename as attribute name:
>>> for ma in Glottolog().macroareas.values():
... print(ma.name)
...
South America
Eurasia
Africa
Papunesia
North America
Australia
Below are the details of the API to access configuration data.
- class pyglottolog.config.AES(ordinal, id, name, egids, unesco, elcat, reference_id, icon=None)[source]
AES status values
See also
Method generated by attrs for class AES.
- ordinal
Sequential numeric value
- id
unique identifier (suitable as Python name, see https://docs.python.org/3/reference/lexical_analysis.html#identifiers)
- name
unique human-readable name
- egids
corresponding status in the EGIDS scala
- unesco
corresponding status in the UNESCO scala
- elcat
corresponding status in ElCat
- reference_id
Glottolog reference ID linking to further information
- class pyglottolog.config.AESSource(id, name, url, reference_id, pages=None)[source]
Reference information for AES sources
Method generated by attrs for class AESSource.
- id
- name
- url
- reference_id
Glottolog reference ID linking to further information
- pages
- class pyglottolog.config.Macroarea(id, name, description, reference_id)[source]
Glottolog macroareas (see https://glottolog.org/meta/glossary#macroarea)
Method generated by attrs for class Macroarea.
- id
- name
- description
- reference_id
Glottolog reference ID linking to further information
- class pyglottolog.config.DocumentType(rank, id, name, description, abbv, bibabbv, webabbr, triggers)[source]
Document types categorize Glottolog references
Method generated by attrs for class DocumentType.
- rank
- id
- name
- description
- class pyglottolog.config.LanguageType(id, pseudo_family_id, category, description)[source]
Language types categorize languages.
Method generated by attrs for class LanguageType.
- id
- pseudo_family_id
Glottocode of the pseudo-family that languages of this type are grouped in.
- category
category name for languages of this type
- description
- class pyglottolog.config.LanguoidLevel(ordinal, id, description)[source]
Languoid levels describe the position of languoid nodes in the classification.
- Variables:
name – alias for id
Method generated by attrs for class LanguoidLevel.
- ordinal
- id
- description
- class pyglottolog.config.Config[source]
More convenient access to objects stored as sections in INI files
This class makes objects (i.e. INI sections) accessible as values of a dict, keyed by an id attribute, which is infered from the id or name option of the section and, additonally, under as attribute named after id.