This class represents a Toolbox lexicon, which consists of an optional
header and one or more Entry objects, saved in a dictionary whose keys
are passed as a parameter to the parse() method.
|
__init__(self,
file)
This method construct a Lexicon object with a header and a dictionary
of entries. |
source code
|
|
|
__str__(self)
This method defines the string representation of a Lexicon object |
source code
|
|
|
|
string
|
|
list of Entry objects
|
|
|
add_entry(self,
entry,
unique=True)
This method adds an Entry object to a Lexicon object. |
source code
|
|
dictionary object
|
parse(self,
head_field_marker=' lx ' ,
subentry_field_marker=None,
key_fields=None,
unique_entry=True,
unique_subentry=True)
This method parses a Toolbox file in a Lexicon object. |
source code
|
|
Inherited from corpora.toolbox.StandardFormat :
close ,
fields ,
open ,
open_string ,
raw_fields
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|