Functions | |
| def | compute_name |
| Compute attribute/module name from object name as follows: 'ObjectName' attribute/module name is 'object_name'. More... | |
| def | factory |
| This function is an object factory. More... | |
| def | xml_lmf_read |
| Read an XML LMF file. More... | |
| def | get_sub_elements |
| This function recursively parses the given XML element and creates corresponding LMF instances with their attributes. More... | |
| def pylmflib.pylmflib.input.xml_lmf.compute_name | ( | object_name | ) |
Compute attribute/module name from object name as follows: 'ObjectName' attribute/module name is 'object_name'.
| object_name | String containing name of the object, e.g. 'LexicalEntry'. |
Definition at line 9 of file xml_lmf.py.
| def pylmflib.pylmflib.input.xml_lmf.factory | ( | object_name, | |
| attributes | |||
| ) |
This function is an object factory.
Indeed, from an object name and its attributes, it creates a Python object and sets its attributes.
| object_name | A Python string containing the object name, for instance 'LexicalEntry'. |
| attributes | A Python dictionary containing pairs of attribute name (as a Python string) and value, for instance {'partOfSpeech': 'n'}. |
Definition at line 24 of file xml_lmf.py.
| def pylmflib.pylmflib.input.xml_lmf.get_sub_elements | ( | instance, | |
| element | |||
| ) |
This function recursively parses the given XML element and creates corresponding LMF instances with their attributes.
| instance | An LMF object instance. |
| element | An XML element. |
Definition at line 72 of file xml_lmf.py.
| def pylmflib.pylmflib.input.xml_lmf.xml_lmf_read | ( | filename | ) |
Read an XML LMF file.
| filename | The name of the XML LMF file to read with full path, for instance 'user/input.xml'. |
Definition at line 60 of file xml_lmf.py.
1.8.7