Python LMF library
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | List of all members
pylmflib.pylmflib.core.sense.Sense Class Reference

"Sense is a class representing one meaning of a lexical entry. The Sense class allows for hierarchical senses in that a sense may be more specific than another sense of the same lexical entry." (LMF) More...

Public Member Functions

def __init__
 Constructor. More...
 
def __del__
 Destructor. More...
 
def get_id
 IDentifier. More...
 
def set_senseNumber
 Set sense number. More...
 
def get_senseNumber
 Get sense number. More...
 
def create_definition
 Create a definition. More...
 
def add_definition
 Add a definition to the sense. More...
 
def get_definitions
 Get all definitions maintained by the sense. More...
 
def get_last_definition
 Get the previously registered Definition instance. More...
 
def find_definitions
 Find definitions. More...
 
def set_definition
 Set definition and language. More...
 
def find_glosses
 Find glosses. More...
 
def set_gloss
 Set gloss and language. More...
 
def set_note
 Set note, note type and language. More...
 
def find_notes
 Find notes. More...
 
def set_usage_note
 Set usage note and language. More...
 
def find_usage_notes
 Find usage notes. More...
 
def set_encyclopedic_information
 Set encyclopedic information and language. More...
 
def find_encyclopedic_informations
 Find encyclopedic informations. More...
 
def set_restriction
 Set restriction and language. More...
 
def find_restrictions
 Find restrictions. More...
 
def set_borrowed_word
 Set source language (in English). More...
 
def get_borrowed_word
 Get source language (in English). More...
 
def set_written_form
 Set loan word. More...
 
def get_written_form
 Get loan word. More...
 
def set_etymology
 Set etymology. More...
 
def get_etymology
 Get etymology. More...
 
def set_etymology_comment
 Set etymology comment and language. More...
 
def get_etymology_comment
 Get etymology comment. More...
 
def get_term_source_language
 Get language used for the etymology comment. More...
 
def set_etymology_gloss
 Set etymology gloss. More...
 
def get_etymology_gloss
 Get etymology gloss. More...
 
def set_etymology_source
 Set etymology source. More...
 
def get_etymology_source
 Get etymology source. More...
 
def set_scientific_name
 Set scientific name. More...
 
def get_scientific_name
 Get scientific name. More...
 
def create_paradigm
 Create a paradigm. More...
 
def add_paradigm
 Add a paradigm to the sense. More...
 
def get_paradigms
 Get all paradigms maintained by the sense. More...
 
def get_last_paradigm
 Get the previously registered Paradigm instance. More...
 
def set_paradigm_label
 Set paradigm label. More...
 
def set_paradigm_form
 Set paradigm form and language. More...
 
def set_morphology
 Set morphology. More...
 
def create_and_add_context
 Create a context and add it to the list. More...
 
def get_contexts
 Get all contexts maintained by the sense. More...
 
def get_last_context
 Get the previously registered Context instance. More...
 
def create_example
 Create a Context instance and set its reference. More...
 
def create_and_add_example
 Set written form, language and script of a new Context instance. More...
 
def add_example
 Set written form, language and script of an existing Context instance. More...
 
def set_example_comment
 Set comment of an existing Context instance. More...
 
def create_and_add_subject_field
 Create a subject field and add it to the list. More...
 
def get_subject_fields
 Get all subject fields maintained by the sense. More...
 
def set_semantic_domain
 Create a SubjectField instance and set its semantic domain and language. More...
 
def create_and_add_equivalent
 Create an equivalent and add it to the list. More...
 
def get_equivalents
 Get all equivalents maintained by the sense. More...
 
def set_translation
 Create an Equivalent instance and set its translation and language. More...
 
def get_translations
 Get all translations. More...
 

Public Attributes

 senseNumber
 
 id
 
 definition
 Definition instances are owned by Sense There is zero to many Definition instances per Sense. More...
 
 sense
 Sense instances are owned by Sense There is zero to many Sense instances per Sense. More...
 
 equivalent
 Equivalent instances are owned by Sense There is zero to many Equivalent instances per Sense. More...
 
 context
 Context instances are owned by Sense There is zero to many Context instances per Sense. More...
 
 subject_field
 SubjectField instances are owned by Sense There is zero to many SubjectField instances per Sense. More...
 
 paradigm
 Paradigm instances are owned by Sense There is zero to many Paradigm instances per Sense. More...
 

Detailed Description

"Sense is a class representing one meaning of a lexical entry. The Sense class allows for hierarchical senses in that a sense may be more specific than another sense of the same lexical entry." (LMF)

Definition at line 12 of file sense.py.

Constructor & Destructor Documentation

def pylmflib.pylmflib.core.sense.Sense.__init__ (   self,
  id = 0 
)

Constructor.

Sense instances are owned by LexicalEntry.

Parameters
idIDentifier. If not provided, default value is 0.
Returns
A Sense instance.

Definition at line 15 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.__del__ (   self)

Destructor.

Release Definition, Sense, Equivalent, Context, SubjectField, Paradigm instances.

Definition at line 43 of file sense.py.

Member Function Documentation

def pylmflib.pylmflib.core.sense.Sense.add_definition (   self,
  definition 
)

Add a definition to the sense.

Parameters
definitionThe Definition instance to add to the sense.
Returns
Sense instance.

Definition at line 97 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.add_example (   self,
  written_form,
  language = None,
  script_name = None 
)

Set written form, language and script of an existing Context instance.

Attributes 'writtenForm', 'language' and 'scriptName' are owned by TextRepresentation, which is owned by Context.

Parameters
written_formThe written form to set.
languageLanguage used for the written form.
script_nameThe name of the script used to write the example, e.g. devanagari.
Returns
Sense instance.

Definition at line 629 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.add_paradigm (   self,
  paradigm 
)

Add a paradigm to the sense.

Parameters
paradigmThe Paradigm instance to add to the sense.
Returns
Sense instance.

Definition at line 503 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.create_and_add_context (   self,
  reference = None 
)

Create a context and add it to the list.

Parameters
referenceThe context reference to set. If not provided, default value is None.
Returns
Context instance.

Definition at line 582 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.create_and_add_equivalent (   self)

Create an equivalent and add it to the list.

Returns
Equivalent instance.

Definition at line 683 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.create_and_add_example (   self,
  written_form,
  language = None,
  script_name = None 
)

Set written form, language and script of a new Context instance.

Attributes 'writtenForm', 'language' and 'scriptName' are owned by TextRepresentation, which is owned by Context.

Parameters
written_formThe written form to set.
languageLanguage used for the written form.
script_nameThe name of the script used to write the example, e.g. devanagari.
Returns
Sense instance.

Definition at line 613 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.create_and_add_subject_field (   self)

Create a subject field and add it to the list.

Returns
SubjectField instance.

Definition at line 659 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.create_definition (   self)

Create a definition.

Returns
Definition instance.

Definition at line 91 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.create_example (   self,
  reference = None 
)

Create a Context instance and set its reference.

Attribute 'targets' is owned by Context.

Parameters
referenceThe example reference to set. If not provided, default value is None.
Returns
Sense instance.

Definition at line 604 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.create_paradigm (   self)

Create a paradigm.

Returns
Paradigm instance.

Definition at line 497 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.find_definitions (   self,
  language 
)

Find definitions.

This attribute is owned by Definition.

Parameters
languageThe language to consider to retrieve the definition.
Returns
A Python list of found Definition attributes 'definition'.

Definition at line 118 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.find_encyclopedic_informations (   self,
  language 
)

Find encyclopedic informations.

This attribute is owned by Statement, which owned by Definition.

Parameters
languageLanguage to consider to retrieve the encyclopedic informations.
Returns
A Python list of found Statement attributes 'encyclopedicInformation'.

Definition at line 270 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.find_glosses (   self,
  language 
)

Find glosses.

This attribute is owned by Definition.

Parameters
languageThe language to consider to retrieve the gloss.
Returns
A Python list of found Definition attributes 'gloss'.

Definition at line 158 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.find_notes (   self,
  type,
  language = None 
)

Find notes.

This attribute is owned by Statement, which owned by Definition.

Parameters
typeType of the note to consider to retrieve the note.
languageIf this argument is given, find note only if written in this language.
Returns
A Python list of found Statement attributes 'notes'.

Definition at line 215 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.find_restrictions (   self,
  language 
)

Find restrictions.

This attribute is owned by Statement, which owned by Definition.

Parameters
languageLanguage to consider to retrieve the restriction.
Returns
A Python list of found Statement attributes 'restriction'.

Definition at line 297 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.find_usage_notes (   self,
  language 
)

Find usage notes.

This attribute is owned by Statement, which owned by Definition.

Parameters
languageLanguage to consider to retrieve the usage note.
Returns
A Python list of found Statement attributes 'usageNote'.

Definition at line 243 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_borrowed_word (   self)

Get source language (in English).

This attribute is owned by Statement, which is owned by Definition.

Returns
Statement attribute 'borrowedWord'.

Definition at line 323 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_contexts (   self)

Get all contexts maintained by the sense.

Returns
A Python list of contexts.

Definition at line 591 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_definitions (   self)

Get all definitions maintained by the sense.

Returns
A Python list of definitions.

Definition at line 105 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_equivalents (   self)

Get all equivalents maintained by the sense.

Returns
A Python list of equivalents.

Definition at line 691 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_etymology (   self)

Get etymology.

This attribute is owned by Statement, which is owned by Definition.

Returns
The first found Statement attribute 'etymology'.

Definition at line 373 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_etymology_comment (   self,
  term_source_language = None 
)

Get etymology comment.

This attribute is owned by Statement, which is owned by Definition.

Parameters
term_source_languageThe language of the etymology comment to retrieve.
Returns
The first found Statement attribute 'etymologyComment'.

Definition at line 398 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_etymology_gloss (   self)

Get etymology gloss.

This attribute is owned by Statement, which is owned by Definition.

Returns
Statement attribute 'etymologyGloss'.

Definition at line 434 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_etymology_source (   self)

Get etymology source.

This attribute is owned by Statement, which is owned by Definition.

Returns
Statement attribute 'etymologySource'.

Definition at line 460 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_id (   self)

IDentifier.

Returns
Sense attribute 'id'.

Definition at line 66 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_last_context (   self)

Get the previously registered Context instance.

Returns
The last element of Sense attribute 'context'.

Definition at line 597 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_last_definition (   self)

Get the previously registered Definition instance.

Returns
The last element of Sense attribute 'definition'.

Definition at line 111 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_last_paradigm (   self)

Get the previously registered Paradigm instance.

Returns
The last element of Sense attribute 'paradigm'.

Definition at line 517 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_paradigms (   self)

Get all paradigms maintained by the sense.

Returns
A Python list of paradigms.

Definition at line 511 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_scientific_name (   self)

Get scientific name.

This attribute is owned by Statement, which is owned by Definition.

Returns
Statement attribute 'scientificName'.

Definition at line 486 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_senseNumber (   self,
  integer = False 
)

Get sense number.

If True, return a numerical value.

Returns
Sense attribute 'senseNumber'.

Definition at line 80 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_subject_fields (   self)

Get all subject fields maintained by the sense.

Returns
A Python list of subject fields.

Definition at line 667 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_term_source_language (   self)

Get language used for the etymology comment.

This attribute is owned by Statement, which is owned by Definition.

Returns
Statement attribute 'termSourceLanguage'.

Definition at line 408 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_translations (   self,
  language = None 
)

Get all translations.

This attribute is owned by Equivalent.

Parameters
languageIf this argument is given, get only translations that are described using this language.
Returns
A Python list of filtered Equivalent attributes 'translation'.

Definition at line 707 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.get_written_form (   self)

Get loan word.

This attribute is owned by Statement, which is owned by Definition.

Returns
Statement attribute 'writtenForm'.

Definition at line 348 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_borrowed_word (   self,
  borrowed_word 
)

Set source language (in English).

Attribute 'borrowedWord' is owned by Statement, which is owned by Definition.

Parameters
borrowed_wordSource language.
Returns
Sense instance.

Definition at line 308 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_definition (   self,
  definition,
  language = None 
)

Set definition and language.

These attributes are owned by Definition.

Parameters
definitionDefinition.
languageLanguage of definition.
Returns
Sense instance.

Definition at line 130 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_encyclopedic_information (   self,
  encyclopedic_information,
  language = None 
)

Set encyclopedic information and language.

These attributes are owned by Statement, which is owned by Definition.

Parameters
encyclopedic_informationEncyclopedic information to set.
languageLanguage used for the encyclopedic information.
Returns
Sense instance.

Definition at line 254 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_etymology (   self,
  etymology 
)

Set etymology.

Attribute 'etymology' is owned by Statement, which is owned by Definition.

Parameters
etymologyEtymology.
Returns
Sense instance.

Definition at line 358 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_etymology_comment (   self,
  etymology_comment,
  term_source_language = None 
)

Set etymology comment and language.

Attributes 'etymologyComment' and 'termSourceLanguage' are owned by Statement, which is owned by Definition.

Parameters
etymology_commentEtymology comment.
term_source_languageLanguage of the comment.
Returns
Sense instance.

Definition at line 382 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_etymology_gloss (   self,
  etymology_gloss 
)

Set etymology gloss.

Attribute 'etymologyGloss' is owned by Statement, which is owned by Definition.

Parameters
etymology_glossEtymology gloss.
Returns
Sense instance.

Definition at line 419 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_etymology_source (   self,
  etymology_source 
)

Set etymology source.

Attribute 'etymologySource' is owned by Statement, which is owned by Definition.

Parameters
etymology_sourceEtymology source.
Returns
Sense instance.

Definition at line 445 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_example_comment (   self,
  comment 
)

Set comment of an existing Context instance.

Attribute 'comment' is owned by TextRepresentation, which is owned by Context.

Parameters
commentThe comment to set.
Returns
Sense instance.

Definition at line 645 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_gloss (   self,
  gloss,
  language = None 
)

Set gloss and language.

These attributes are owned by Definition.

Parameters
glossGloss.
languageLanguage of gloss.
Returns
Sense instance.

Definition at line 170 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_morphology (   self,
  morphology 
)

Set morphology.

Attribute 'morphology' is owned by Paradigm.

Parameters
morphologyMorphology.
Returns
Sense instance.

Definition at line 563 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_note (   self,
  note,
  type = None,
  language = None 
)

Set note, note type and language.

These attributes are owned by Statement, which is owned by Definition.

Parameters
noteNote to set.
typeType of the note.
languageLanguage used for the note.
Returns
Sense instance.

Definition at line 198 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_paradigm_form (   self,
  paradigm_form,
  language = None 
)

Set paradigm form and language.

Attributes 'paradigm' and 'language' are owned by Paradigm.

Parameters
paradigm_formParadigm form.
languageLanguage used for the paradigm form.
Returns
Sense instance.

Definition at line 534 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_paradigm_label (   self,
  paradigm_label 
)

Set paradigm label.

Attribute 'paradigmLabel' is owned by Paradigm.

Parameters
paradigm_labelParadigm label.
Returns
Sense instance.

Definition at line 524 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_restriction (   self,
  restriction,
  language = None 
)

Set restriction and language.

These attributes are owned by Statement, which is owned by Definition.

Parameters
restrictionRestriction to set.
languageLanguage used for the restriction.
Returns
Sense instance.

Definition at line 281 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_scientific_name (   self,
  scientific_name 
)

Set scientific name.

Attribute 'scientificName' is owned by Statement, which is owned by Definition.

Parameters
scientific_nameScientific name.
Returns
Sense instance.

Definition at line 471 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_semantic_domain (   self,
  semantic_domain,
  language = None 
)

Create a SubjectField instance and set its semantic domain and language.

Attributes 'semanticDomain' and 'language' are owned by SubjectField.

Parameters
semantic_domainThe semantic domain to set.
languageLanguage used to describe the semantic domain.
Returns
Sense instance.

Definition at line 673 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_senseNumber (   self,
  sense_number 
)

Set sense number.

Parameters
sense_numberThe sense number to set.
Returns
Sense instance.

Definition at line 72 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_translation (   self,
  translation,
  language = None 
)

Create an Equivalent instance and set its translation and language.

Attributes 'translation' and 'language' are owned by Equivalent.

Parameters
translationThe translation to set.
languageLanguage used for the translation.
Returns
Sense instance.

Definition at line 697 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_usage_note (   self,
  usage_note,
  language = None 
)

Set usage note and language.

These attributes are owned by Statement, which is owned by Definition.

Parameters
usage_noteUsage note to set.
languageLanguage used for the usage note.
Returns
Sense instance.

Definition at line 227 of file sense.py.

def pylmflib.pylmflib.core.sense.Sense.set_written_form (   self,
  written_form 
)

Set loan word.

Attribute 'writtenForm' is owned by Statement, which is owned by Definition.

Parameters
written_formLoan word.
Returns
Sense instance.

Definition at line 333 of file sense.py.

Member Data Documentation

pylmflib.pylmflib.core.sense.Sense.context

Context instances are owned by Sense There is zero to many Context instances per Sense.

Definition at line 35 of file sense.py.

pylmflib.pylmflib.core.sense.Sense.definition

Definition instances are owned by Sense There is zero to many Definition instances per Sense.

Definition at line 26 of file sense.py.

pylmflib.pylmflib.core.sense.Sense.equivalent

Equivalent instances are owned by Sense There is zero to many Equivalent instances per Sense.

Definition at line 32 of file sense.py.

pylmflib.pylmflib.core.sense.Sense.id

Definition at line 23 of file sense.py.

pylmflib.pylmflib.core.sense.Sense.paradigm

Paradigm instances are owned by Sense There is zero to many Paradigm instances per Sense.

Definition at line 41 of file sense.py.

pylmflib.pylmflib.core.sense.Sense.sense

Sense instances are owned by Sense There is zero to many Sense instances per Sense.

Definition at line 29 of file sense.py.

pylmflib.pylmflib.core.sense.Sense.senseNumber

Definition at line 21 of file sense.py.

pylmflib.pylmflib.core.sense.Sense.subject_field

SubjectField instances are owned by Sense There is zero to many SubjectField instances per Sense.

Definition at line 38 of file sense.py.


The documentation for this class was generated from the following file: