Models
Django models for dictionary app.
Here are all the models that are actually used within the application. Some models are missing because they are not being used, but haven’t yet been removed.
Models for the Signbank dictionary/corpus.
- class signbank.dictionary.models.AllowedTags(*args, **kwargs)
Tags a model is allowed to use.
- allowed_tags
The tags that are shown in tag lists.
- content_type
The ContentType of the object whose AllowedTags we set.
- class signbank.dictionary.models.Dataset(*args, **kwargs)
Dataset/Lexicon of which Glosses are part of.
- admins
The admins of this Dataset. Admins receive notifications when a user applies for permissins for the Dataset.
- clean_fields(exclude: Collection[str] | None = None) None
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
- copyright
The copyright statement for the data in this Dataset, the license used for the videos etc.
- description
A description of the Dataset: who maintains it, what is its purpose, etc.
- get_deferred_fields() set[str]
Return a set containing names of deferred fields for this instance.
- glosslanguage
Gloss language, which spoken language is used for the gloss name, used in ELAN external controlled vocabulary
- is_public
Boolean defining whether to show this Dataset in the public interface.
- name
A private name for the Dataset. Can include abbrevations not recognizable by the general users.
- public_name
Public name for the Dataset, intended for users of the public interface.
- refresh_from_db(using: str | None = None, fields: Iterable[str] | None = None, from_queryset: QuerySet[Any] | None = None) None
Reload field values from the database.
By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.
Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.
When accessing deferred fields of an instance, the deferred loading of the field will call this method.
- show_comments_in_public
Boolean defining whether to show Gloss comments in public interface.
- show_urls_in_public
Boolean defining whether to show GlossUrls in public interface.
- signlanguage
The Sign Language of the Glosses in this Dataset.
- translation_languages
The translation equivalent languages that should be available to the Glosses of this Dataset.
- class signbank.dictionary.models.Dialect(*args, **kwargs)
A dialect name - a regional dialect of a given Language
- description
Description of the Dialect.
- language
The Language of the Dialect.
- name
Name of the Dialect.
- class signbank.dictionary.models.FieldChoice(id, field, english_name, machine_value)
- english_name
English (verbose) name of the FieldChoice.
- field
The name of the FieldChoice.
- machine_value
Machine value of the FieldChoice, its ID number.
- class signbank.dictionary.models.Gloss(id, published, exclude_from_ecv, dataset, idgloss, idgloss_en, notes, created_at, created_by, updated_at, updated_by, handedness, strong_handshape, weak_handshape, location, relation_between_articulators, absolute_orientation_palm, absolute_orientation_fingers, relative_orientation_movement, relative_orientation_location, orientation_change, handshape_change, repeated_movement, alternating_movement, movement_shape, movement_direction, movement_manner, contact_type, phonology_other, mouth_gesture, mouthing, phonetic_variation, iconic_image, named_entity, semantic_field, number_of_occurences)
- created_at
The DateTime when the Gloss was created.
- created_by
The User who created the Gloss.
- dataset
The Dataset (Lexicon) this Gloss is part of.
- dialect
One or more regional dialects that this Gloss is used in.
- exclude_from_ecv
Boolean: Exclude this gloss from all ELAN externally controlled vocabularies (ECV)?
- field_labels()
Return the dictionary of field labels for use in a template
- static get_choice_lists()
Return FieldChoices for selected fields in JSON, grouped by field, key=machine_value, value=english_name
- get_translation_languages()
Returns translation languages that are set for the Dataset of the Gloss.
- get_translations_for_translation_languages()
Returns a zipped list of translation languages and translations.
- idgloss
Gloss in Finnish. This is the unique identifying name of the Gloss.
- idgloss_en
Gloss in English. This is the English name of the Gloss.
- notes
Notes about the Gloss.
- published
Boolean: Is this Gloss published in the public interface?
- updated_at
The DateTime when the Glosses information was last updated.
- updated_by
The User who last updated the Glosses information.
- class signbank.dictionary.models.GlossRelation(*args, **kwargs)
Relation between two glosses
- source
The source Gloss of the Relation.
- tag()
The type of the Relation, a Tag.
- target
The target Gloss of the Relation, the Gloss to which the source Gloss related to.
- class signbank.dictionary.models.GlossTranslations(*args, **kwargs)
Store a string representation of translation equivalents of certain Language for a Gloss.
- get_keywords()
Returns keywords parsed from self.translations.
- get_keywords_unique()
Returns only unique keywords from get_keywords()
- gloss
The Gloss to translate
- language
The written/spoken Language of the translations.
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- translations
The fields that contains the translations, a text field.
- class signbank.dictionary.models.GlossURL(*args, **kwargs)
URL’s for gloss
- gloss
The Gloss the URL belongs to.
- url
The URL, a websites address.
- class signbank.dictionary.models.Keyword(*args, **kwargs)
A keyword that stores the text for translation(s)
- text
The text of a Keyword.
- class signbank.dictionary.models.Language(*args, **kwargs)
A written language, used for translations in written languages.
- clean_fields(exclude: Collection[str] | None = None) None
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
- description
Description of the Language.
- get_deferred_fields() set[str]
Return a set containing names of deferred fields for this instance.
- language_code_2char
The ISO 639-1 code of the Language (2 characters long).
- language_code_3char
The ISO 639-3 code of the Language (3 characters long).
- name
The name of a spoken/written Language.
- refresh_from_db(using: str | None = None, fields: Iterable[str] | None = None, from_queryset: QuerySet[Any] | None = None) None
Reload field values from the database.
By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.
Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.
When accessing deferred fields of an instance, the deferred loading of the field will call this method.
- class signbank.dictionary.models.MorphologyDefinition(*args, **kwargs)
Tells something about morphology of a gloss
- class signbank.dictionary.models.Relation(*args, **kwargs)
A relation between two glosses
- class signbank.dictionary.models.RelationToForeignSign(*args, **kwargs)
Defines a relationship to another sign in another language (often a loan)
- gloss
The source Gloss of the relation.
- loan
Boolean: Is this a loan sign?
- other_lang
The language of the related sign.
- other_lang_gloss
The name of the Gloss in the related language.
- class signbank.dictionary.models.SignLanguage(*args, **kwargs)
A sign language.
- clean_fields(exclude: Collection[str] | None = None) None
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.
- get_deferred_fields() set[str]
Return a set containing names of deferred fields for this instance.
- language_code_3char
The ISO 639-3 code of the Sign Language (3 characters long).
- name
The name of the Sign Language
- public_name
Name of the Sign Language to use for public interface, perhaps less strict naming convention
- refresh_from_db(using: str | None = None, fields: Iterable[str] | None = None, from_queryset: QuerySet[Any] | None = None) None
Reload field values from the database.
By default, the reloading happens from the database this instance was loaded from, or by the read router if this instance wasn’t loaded from any database. The using parameter will override the default.
Fields can be used to specify which fields to reload. The fields should be an iterable of field attnames. If fields is None, then all non-deferred fields are reloaded.
When accessing deferred fields of an instance, the deferred loading of the field will call this method.
- class signbank.dictionary.models.Translation(*args, **kwargs)
A translation equivalent of a sign in selected language.
- gloss
The Gloss to translate.
- keyword
The Keyword of the translation, the textual form.
- language
The written/spoken Language of the translation.
- order
The order number of the Translation within a Glosses Translations.
- signbank.dictionary.models.build_choice_list(field)
This function builds a list of choices from FieldChoice.
- signbank.dictionary.models.model
alias of
GlossRelation