"Lexicon is a class containing all the lexical entries of a given language within the entire resource." (LMF) More...
Public Member Functions | |
| def | __init__ |
| Constructor. More... | |
| def | __del__ |
| Destructor. More... | |
| def | set_id |
| Set lexicon identifier. More... | |
| def | get_id |
| Get identifier. More... | |
| def | set_entrySource |
| Set lexicon entry source. More... | |
| def | get_entrySource |
| Get entry source. More... | |
| def | set_language |
| Set lexicon language. More... | |
| def | get_language |
| Get language. More... | |
| def | set_languageScript |
| Set lexicon language script. More... | |
| def | get_languageScript |
| Get language script. More... | |
| def | set_label |
| Set lexicon label. More... | |
| def | get_label |
| Get label. More... | |
| def | set_lexiconType |
| Set lexicon type. More... | |
| def | get_lexiconType |
| Get lexicon type. More... | |
| def | set_vowelHarmony |
| def | get_vowelHarmony |
| def | set_localPath |
| Set lexicon local path. More... | |
| def | get_localPath |
| Get lexicon local path. More... | |
| def | get_lexical_entries |
| Get all lexical entries maintained by the lexicon. More... | |
| def | add_lexical_entry |
| Add a lexical entry to the lexicon. More... | |
| def | remove_lexical_entry |
| Remove a lexical entry from the lexicon. More... | |
| def | count_lexical_entries |
| Count number of lexical entries of the lexicon. More... | |
| def | sort_homonym_numbers |
| Sort similar given items of lexical entries contained in the lexicon according to their homonym number. More... | |
| def | sort_lexical_entries |
| Sort given items of lexical entries contained in the lexicon according to a certain order. More... | |
| def | find_lexical_entries |
| Find all lexical entries which characteristics meet the given condition. More... | |
| def | check_cross_references |
| Check all cross-references in the lexicon. More... | |
| def | reset_check |
| Reset boolean to be able to check all cross-references in the lexicon again. More... | |
| def | convert_to_latex |
Public Attributes | |
| language | |
| languageScript | |
| label | |
| lexiconType | |
| entrySource | |
| vowelHarmony | |
| localPath | |
| lexical_entry | |
| All LexicalEntry instances are maintained by Lexicon There is one or more LexicalEntry instances per Lexicon. More... | |
| id | |
"Lexicon is a class containing all the lexical entries of a given language within the entire resource." (LMF)
Definition at line 9 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.__init__ | ( | self, | |
id = None |
|||
| ) |
Constructor.
Lexicon instances are owned by LexicalResource.
Definition at line 12 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.__del__ | ( | self | ) |
| def pylmflib.pylmflib.core.lexicon.Lexicon.add_lexical_entry | ( | self, | |
| lexical_entry | |||
| ) |
Add a lexical entry to the lexicon.
| lexical_entry | A LexicalEntry instance to add to the Lexicon. |
Definition at line 149 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.check_cross_references | ( | self | ) |
Check all cross-references in the lexicon.
Fill the private attribute '__lexicalEntry' of each RelatedForm instance for all lexical entries.
Definition at line 283 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.convert_to_latex | ( | self | ) |
This method converts the lexicon into LaTeX format.
Definition at line 349 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.count_lexical_entries | ( | self | ) |
Count number of lexical entries of the lexicon.
Definition at line 165 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.find_lexical_entries | ( | self, | |
| filter | |||
| ) |
Find all lexical entries which characteristics meet the given condition.
| filter | Function or lambda function taking a lexical entry as argument, and returning True or False; for instance 'lambda lexical_entry: lexical_entry.get_lexeme() == "Hello"'. |
Definition at line 272 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_entrySource | ( | self | ) |
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_id | ( | self | ) |
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_label | ( | self | ) |
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_language | ( | self | ) |
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_languageScript | ( | self | ) |
Get language script.
Definition at line 89 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_lexical_entries | ( | self | ) |
Get all lexical entries maintained by the lexicon.
Definition at line 143 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_lexiconType | ( | self | ) |
Get lexicon type.
Definition at line 117 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_localPath | ( | self | ) |
Get lexicon local path.
Definition at line 137 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.get_vowelHarmony | ( | self | ) |
Definition at line 126 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.remove_lexical_entry | ( | self, | |
| lexical_entry | |||
| ) |
Remove a lexical entry from the lexicon.
| lexical_entry | The LexicalEntry instance to remove from the Lexicon. |
Definition at line 157 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.reset_check | ( | self | ) |
Reset boolean to be able to check all cross-references in the lexicon again.
Reset the private attribute '__checked'.
Definition at line 341 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_entrySource | ( | self, | |
| entry_source | |||
| ) |
Set lexicon entry source.
| entry_source | The entry source to set. |
Definition at line 53 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_id | ( | self, | |
| id | |||
| ) |
Set lexicon identifier.
| id | The identifier to set. |
Definition at line 39 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_label | ( | self, | |
| label | |||
| ) |
Set lexicon label.
| label | The label to set. |
Definition at line 95 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_language | ( | self, | |
| language | |||
| ) |
Set lexicon language.
| language | The language to set. |
Definition at line 67 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_languageScript | ( | self, | |
| language_script | |||
| ) |
Set lexicon language script.
| language_script | The language script to set. |
Definition at line 81 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_lexiconType | ( | self, | |
| lexicon_type | |||
| ) |
Set lexicon type.
| lexicon_type | The lexicon type to set. |
Definition at line 109 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_localPath | ( | self, | |
| local_path | |||
| ) |
Set lexicon local path.
| local_path | The absolute path to audio files to set. |
Definition at line 129 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.set_vowelHarmony | ( | self, | |
| vowel_harmony | |||
| ) |
Definition at line 123 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.sort_homonym_numbers | ( | self, | |
items = lambda lexical_entry: lexical_entry.get_lexeme(), |
|||
condition = lambda lexical_entry: True |
|||
| ) |
Sort similar given items of lexical entries contained in the lexicon according to their homonym number.
| items | Lambda function giving the item to sort. Default value is 'lambda lexical_entry: lexical_entry.get_lexeme()', which means that the items to sort are lexemes. |
| condition | Lambda function giving a condition to apply classification. |
Definition at line 171 of file lexicon.py.
| def pylmflib.pylmflib.core.lexicon.Lexicon.sort_lexical_entries | ( | self, | |
items = lambda lexical_entry: lexical_entry.get_lexeme(), |
|||
sort_order = None, |
|||
comparison = None |
|||
| ) |
Sort given items of lexical entries contained in the lexicon according to a certain order.
| items | Lambda function giving the item to sort. Default value is 'lambda lexical_entry: lexical_entry.get_lexeme()', which means that the items to sort are lexemes. |
| sort_order | Default value is 'None', which means that the lexicographical ordering uses the ASCII ordering. |
| comparison | Function to compare items. If 'None', a default function to compare character by character is provided. |
Definition at line 201 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.entrySource |
Definition at line 22 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.id |
Definition at line 44 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.label |
Definition at line 20 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.language |
Definition at line 18 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.languageScript |
Definition at line 19 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.lexical_entry |
All LexicalEntry instances are maintained by Lexicon There is one or more LexicalEntry instances per Lexicon.
Definition at line 27 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.lexiconType |
Definition at line 21 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.localPath |
Definition at line 24 of file lexicon.py.
| pylmflib.pylmflib.core.lexicon.Lexicon.vowelHarmony |
Definition at line 23 of file lexicon.py.
1.8.7