"Context is a class representing a text string that provides authentic context for the use of the word form managed by the Lemma. This class is to be distinguished from Sense Example." (LMF) More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | __del__ |
Destructor. More... | |
def | set_type |
Set context type. More... | |
def | get_type |
Get context type. More... | |
def | create_text_representation |
Create a text representation. More... | |
def | add_text_representation |
Add a text representation to the context. More... | |
def | get_text_representations |
Get all text representations maintained by the context. More... | |
def | get_last_text_representation |
Get the previously registered TextRepresentation instance. More... | |
def | find_written_forms |
Find written forms. More... | |
def | get_comments |
Get comments. More... | |
def | set_written_form |
Set text representation written form, language and script. More... | |
def | set_comment |
Set text representation comment. More... | |
def | get_speakerID |
Get related speaker identifier. More... | |
def | get_speaker |
Get speaker. More... | |
Public Attributes | |
language | |
type | |
text_representation | |
TextRepresentation instances are owned by Context There is zero to many TextRepresentation instances per Context. More... | |
targets | |
"Context is a class representing a text string that provides authentic context for the use of the word form managed by the Lemma. This class is to be distinguished from Sense Example." (LMF)
Definition at line 10 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.__init__ | ( | self, | |
speakerID = None |
|||
) |
Constructor.
Context instances are owned by Sense.
speakerID | Related speaker identifier. If not provided, default value is None. |
Definition at line 13 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.__del__ | ( | self | ) |
def pylmflib.pylmflib.mrd.context.Context.add_text_representation | ( | self, | |
text_representation | |||
) |
Add a text representation to the context.
text_representation | The TextRepresentation instance to add to the context. |
Definition at line 65 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.create_text_representation | ( | self | ) |
Create a text representation.
Definition at line 59 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.find_written_forms | ( | self, | |
language = None , |
|||
script_name = None |
|||
) |
Find written forms.
This attribute is owned by TextRepresentation.
language | If given, the language to consider to retrieve the written form. |
script_name | If given, the script to consider to retrieve the written form. |
Definition at line 86 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.get_comments | ( | self | ) |
Get comments.
This attribute is owned by TextRepresentation.
Definition at line 100 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.get_last_text_representation | ( | self | ) |
Get the previously registered TextRepresentation instance.
Definition at line 79 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.get_speaker | ( | self | ) |
Get speaker.
Definition at line 150 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.get_speakerID | ( | self | ) |
Get related speaker identifier.
Definition at line 144 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.get_text_representations | ( | self | ) |
Get all text representations maintained by the context.
Definition at line 73 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.get_type | ( | self | ) |
def pylmflib.pylmflib.mrd.context.Context.set_comment | ( | self, | |
comment | |||
) |
Set text representation comment.
Attribute 'comment' is owned by TextRepresentation.
comment | The comment to set. |
Definition at line 128 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.set_type | ( | self, | |
type | |||
) |
Set context type.
type | Type of text representations, in range 'type_example_range' defined in 'common/range.py'. |
Definition at line 40 of file context.py.
def pylmflib.pylmflib.mrd.context.Context.set_written_form | ( | self, | |
written_form, | |||
language = None , |
|||
script_name = None |
|||
) |
Set text representation written form, language and script.
Attributes 'writtenForm', 'language' and 'scriptName' are owned by TextRepresentation.
written_form | The written form to set. |
language | Language of the written form. |
script_name | The name of the script used to write the form, e.g. devanagari. |
Definition at line 111 of file context.py.
pylmflib.pylmflib.mrd.context.Context.language |
Definition at line 19 of file context.py.
pylmflib.pylmflib.mrd.context.Context.targets |
Definition at line 25 of file context.py.
pylmflib.pylmflib.mrd.context.Context.text_representation |
TextRepresentation instances are owned by Context There is zero to many TextRepresentation instances per Context.
Definition at line 23 of file context.py.
pylmflib.pylmflib.mrd.context.Context.type |
Definition at line 20 of file context.py.