Python LMF library
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | List of all members
pylmflib.pylmflib.morphology.lemma.Lemma Class Reference

"Lemma is a Form subclass representing a form chosen by convention to designate the Lexical Entry. The lemma is usually equivalent to one of the inflected forms, the root, stem or compound phrase." (LMF). More...

Inheritance diagram for pylmflib.pylmflib.morphology.lemma.Lemma:

Public Member Functions

def __init__
 Constructor. More...
 
def __del__
 Destructor. More...
 
def set_lexeme
 Set lexeme. More...
 
def get_lexeme
 Get lexeme. More...
 
def create_form_representation
 Create a form representation. More...
 
def add_form_representation
 Add a form representation to the lemma. More...
 
def find_form_representations
 Find variant forms. More...
 
def get_form_representations
 Get all form representations maintained by the lemma. More...
 
def get_form_representation
 Get a given form representation maintained by the lemma. More...
 
def set_variant_form
 Set variant form and type. More...
 
def get_variant_forms
 Get all variant forms of specified type. More...
 
def set_variant_comment
 Set variant comment and language. More...
 
def set_tone
 Set tone. More...
 
def get_tones
 Get all tones. More...
 
def set_geographical_variant
 Set geographical variant. More...
 
def set_phonetic_form
 Set phonetic form. More...
 
def get_phonetic_forms
 Get all phonetic forms. More...
 
def set_contextual_variation
 Set contextual variation. More...
 
def get_contextual_variations
 Get all contextual variations. More...
 
def set_spelling_variant
 Set spelling variant. More...
 
def get_spelling_variants
 Get all spelling variants. More...
 
def set_citation_form
 Set citation form. More...
 
def get_citation_forms
 Get all citation forms. More...
 
def set_dialect
 Set dialect. More...
 
def set_transliteration
 Set transliteration. More...
 
def get_transliterations
 Get all transliterations. More...
 
def set_script_name
 Set script name. More...
 
def set_audio
 Set audio resource. More...
 

Public Attributes

 hyphenation
 
 lexeme
 

Detailed Description

"Lemma is a Form subclass representing a form chosen by convention to designate the Lexical Entry. The lemma is usually equivalent to one of the inflected forms, the root, stem or compound phrase." (LMF).

Definition at line 9 of file lemma.py.

Constructor & Destructor Documentation

def pylmflib.pylmflib.morphology.lemma.Lemma.__init__ (   self)

Constructor.

Lemma instance is owned by LexicalEntry.

Returns
A Lemma instance.

Definition at line 12 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.__del__ (   self)

Destructor.

Definition at line 22 of file lemma.py.

Member Function Documentation

def pylmflib.pylmflib.morphology.lemma.Lemma.add_form_representation (   self,
  form_representation 
)

Add a form representation to the lemma.

Parameters
form_representationThe FormRepresentation instance to add to the lemma.
Returns
Lemma instance.

Definition at line 47 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.create_form_representation (   self)

Create a form representation.

Returns
FormRepresentation instance.

Definition at line 41 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.find_form_representations (   self,
  type 
)

Find variant forms.

This attribute is owned by FormRepresentation.

Parameters
typeThe type to consider to retrieve the variant form.
Returns
A Python list of found FormRepresentation attributes 'variantForm'.

Definition at line 55 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_citation_forms (   self,
  script_name = None 
)

Get all citation forms.

This attribute is owned by FormRepresentation.

Parameters
script_nameIf provided, get only citation forms that are written using this script.
Returns
A Python list of FormRepresentation attributes 'citationForm'.

Definition at line 299 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_contextual_variations (   self)

Get all contextual variations.

This attribute is owned by FormRepresentation.

Returns
A Python list of FormRepresentation attributes 'contextualVariation'.

Definition at line 236 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_form_representation (   self,
  index 
)

Get a given form representation maintained by the lemma.

Parameters
indexThe index of the wanted form representation.
Returns
The wanted FormRepresentation instance.

Definition at line 73 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_form_representations (   self)

Get all form representations maintained by the lemma.

Returns
A Python list of form representations.

Definition at line 67 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_lexeme (   self)

Get lexeme.

Returns
Lemma attribute 'lexeme'.

Definition at line 35 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_phonetic_forms (   self,
  script_name = None 
)

Get all phonetic forms.

This attribute is owned by FormRepresentation.

Parameters
script_nameIf provided, get only phonetic forms that are written using this script.
Returns
A Python list of FormRepresentation attributes 'phoneticForm'.

Definition at line 205 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_spelling_variants (   self)

Get all spelling variants.

This attribute is owned by FormRepresentation.

Returns
A Python list of FormRepresentation attributes 'spellingVariant'.

Definition at line 266 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_tones (   self)

Get all tones.

This attribute is owned by FormRepresentation.

Returns
A Python list of FormRepresentation attributes 'tone'.

Definition at line 153 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_transliterations (   self)

Get all transliterations.

This attribute is owned by FormRepresentation.

Returns
A Python list of FormRepresentation attributes 'transliteration'.

Definition at line 349 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.get_variant_forms (   self,
  type = "unspecified" 
)

Get all variant forms of specified type.

This attribute is owned by FormRepresentation.

Returns
A Python list of FormRepresentation attributes 'variantForm' if type matches.

Definition at line 103 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_audio (   self,
  media_type,
  file_name,
  author,
  quality,
  start_position,
  duration,
  external_reference,
  audio_file_format 
)

Set audio resource.

Attributes 'mediaType', 'fileName', 'author', 'quality', 'startPosition', 'durationOfEffectiveSpeech', 'externalReference', 'audioFileFormat' are owned by Material/Audio, which is owned by FormRepresentation.

Parameters
media_typeThe media type to set.
file_nameName of the audio file.
authorAuthor of the recording.
qualityQuality of the recording, in range 'quality_range' defined in 'common/range.py'.
start_positionStart position of the form in the recording, in format 'Thh:mm:ss,msms', e.g. "T00:05:00".
durationDuration of the effcetive speech, in format 'PThhHmmMssS', e.g. "PT00:05:00".
external_referenceReference of the audio file, if not directly provided.
audio_file_formatFormat of the audio file, e.g. "wav".
Returns
Lemma instance.

Definition at line 379 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_citation_form (   self,
  citation_form,
  script_name = None 
)

Set citation form.

This attribute is owned by FormRepresentation.

Parameters
citation_formThe citation form to set.
script_nameThe name of the script used to write the citation form, e.g. devanagari.
Returns
Lemma instance.

Definition at line 277 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_contextual_variation (   self,
  contextual_variation 
)

Set contextual variation.

This attribute is owned by FormRepresentation.

Parameters
contextual_variationThe contextual variation to set.
Returns
Lemma instance.

Definition at line 217 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_dialect (   self,
  dialect 
)

Set dialect.

This attribute is owned by FormRepresentation.

Parameters
dialectThe dialect to set.
Returns
Lemma instance.

Definition at line 311 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_geographical_variant (   self,
  geographical_variant 
)

Set geographical variant.

This attribute is owned by FormRepresentation.

Parameters
geographical_variantThe geographical variant to set.
Returns
Lemma instance.

Definition at line 164 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_lexeme (   self,
  lexeme 
)

Set lexeme.

Parameters
lexemeThe lexeme to set.
Returns
Lemma instance.

Definition at line 27 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_phonetic_form (   self,
  phonetic_form,
  script_name = None 
)

Set phonetic form.

This attribute is owned by FormRepresentation.

Parameters
phonetic_formThe phonetic form to set.
script_nameThe name of the script used to write the phonetic form, e.g. pinyin.
Returns
Lemma instance.

Definition at line 183 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_script_name (   self,
  script_name 
)

Set script name.

This attribute is owned by FormRepresentation.

Parameters
script_nameThe script name to set.
Returns
Lemma instance.

Definition at line 360 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_spelling_variant (   self,
  spelling_variant 
)

Set spelling variant.

This attribute is owned by FormRepresentation.

Parameters
spelling_variantThe spelling variant to set.
Returns
Lemma instance.

Definition at line 247 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_tone (   self,
  tone 
)

Set tone.

This attribute is owned by FormRepresentation.

Parameters
toneThe tone to set.
Returns
Lemma instance.

Definition at line 134 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_transliteration (   self,
  transliteration 
)

Set transliteration.

This attribute is owned by FormRepresentation.

Parameters
transliterationThe transliteration to set.
Returns
Lemma instance.

Definition at line 330 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_variant_comment (   self,
  comment,
  language = None 
)

Set variant comment and language.

These attributes are owned by FormRepresentation.

Parameters
commentVariant comment.
languageLanguage of comment.
Returns
Lemma instance.

Definition at line 114 of file lemma.py.

def pylmflib.pylmflib.morphology.lemma.Lemma.set_variant_form (   self,
  variant_form,
  type = "unspecified" 
)

Set variant form and type.

These attributes are owned by FormRepresentation.

Parameters
variant_formVariant form.
typeType of variant, in range 'type_variant_range' defined in 'common/range.py'.
Returns
Lemma instance.

Definition at line 83 of file lemma.py.

Member Data Documentation

pylmflib.pylmflib.morphology.lemma.Lemma.hyphenation

Definition at line 19 of file lemma.py.

pylmflib.pylmflib.morphology.lemma.Lemma.lexeme

Definition at line 20 of file lemma.py.


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