Data models¶
Basic models.
- class cltoolkit.models.CLCore(id, wordlist=None, data=None)[source]¶
Base class to represent data in a wordlist.
- class cltoolkit.models.WithForms(forms=None)[source]¶
Mixin to represent data in a wordlist that contains forms.
- class cltoolkit.models.WithDataset(obj=None, dataset=None)[source]¶
Mixin to represent data in a wordlist from a specific dataset.
- class cltoolkit.models.Language(id, wordlist=None, data=None, forms=None, obj=None, dataset=None, senses=None, concepts=None)[source]¶
Base class for handling languages.
- Variables
senses – DictTuple of senses, i.e. glosses for forms.
concepts – DictTuple of senses with explicit Concepticon mapping.
glottocode – str, Glottocode for the language.
Note
A language variety is defined for a specific dataset only.
- class cltoolkit.models.Sense(id, wordlist=None, data=None, forms=None, obj=None, dataset=None, language=None)[source]¶
A sense description (concept in source) which does not need to be linked to the Concepticon.
- Variables
language –
Language
instancename – str, the gloss
Note
Unlike senses in a wordlist, which are dataset-specific, concepts in a wordlist are defined for all datasets.
- class cltoolkit.models.Concept(id, wordlist=None, data=None, forms=None, language=None, senses=None, name=None, concepticon_id=None, concepticon_gloss=None)[source]¶
Base class for the concepts in a dataset.
- Variables
language –
Language
instancename – str, the gloss
senses – iterable of senses mapped to this concept
concepticon_id – str ID of the Concepticon concept set the concept is mapped to.
concepticon_gloss – str gloss of the Concepticon concept set the concept is mapped to.
Note
Unlike senses in a wordlist, which are dataset-specific, concepts in a wordlist are defined for all datasets. As a result, they lack a reference to the original dataset in which they occur, but they have an attribute senses which is a reference to the original senses as they occur in different datasets.
- class cltoolkit.models.Form(id, wordlist=None, data=None, obj=None, dataset=None, concept=None, language=None, sense=None, sounds=NOTHING, cognates=NOTHING)[source]¶
Base class for handling the form part of linguistic signs.
- Variables
concept – The concept (if any) expressed by the form.
language – The language in which the form occurs.
sense – The meaning expressed by the form.
sounds – The segmented strings defined by the B(road) IPA.
graphemes – The segmented graphemes (possibly not BIPA conform).
- sounds¶
Sounds (graphemes recognized in the specified transcription system) in the segmented form:
- graphemes¶
Graphemes in the segmented form:
- class cltoolkit.models.Cognate(id, wordlist=None, data=None, obj=None, dataset=None, form=None, contribution=None)[source]¶