-
Notifications
You must be signed in to change notification settings - Fork 1
LexcCompiler
-
class LexcCompiler
- __init__ (self)
- __init__ (self, impl)
- __init__ (self, impl, withFlags)
- parse (infile)
- parse (filename)
- setVerbosity (verbose)
- addAlphabet (alphabet)
- addNoFlag (lexname)
- setCurrentLexiconName (lexicon_name)
- addStringEntry (entry, continuation, weight)
- addStringPairEntry (upper, lower, continuation, weight)
- addXreEntry (xre, continuation, weight)
- addXreDefinition (name, xre)
- setInitialLexiconName (lexicon_name)
- compileLexical ()
- printConnectedness ()
A compiler holding information contained in lexc style lexicons. A single LexcCompiler can be extended by adding entries to it, but little else can be done with it. It is sufficient to implement clone of lexc.
The easiest way to create transducers from lexc files is probably the function hfst.compile_lexc_file.
Create a lexc compiler for unspecified transducer format.
Create a lexc compiler with impl
as transducer format.
Create a lexc compiler with impl
as transducer format.
Compile lexc description from infile
into current compiler.
Compile lexc description from file filename
into current compiler.
Set verbosity options. When verbose
is true, LexcCompiler will output the messages that Xerox lexc compiler does.
TODO: document
- isQuiet()
- setTreatWarningsAsErrors(value)
- areWarningsTreatedAsErrors()
- setAllowMultipleSublexiconDefinitions(value)
- setWithFlags(value)
- setMinimizeFlags(value)
- setRenameFlags(value)
Add alphabet
to multicharacter symbol set.
These symbols may be used for regular expression ? for backends that do
not support open alphabets.
todo
Set current processing lexicon name to lexicon_name
.
Add entry defined by a entry
to current lexicon, pointing to continuation
weighing weight
to current lexicon.
Add entry defined by upper:lower
, pointing to continuation
weighing weight
to current lexicon.
Add entry defined by regular expression xre
, pointing to continuation
weighing weight
to current lexicon.
Add macro definition named name
matching regular expression xre
to known xerox regular expressions.
Set start lexicon's name to lexicon_name
.
Create final usable version of current lexicons and entries. Return: HfstTransducer pointer.
Check that current morphotax is connected and print anomalies. Works like xerox lexc, for compatibility.
Package hfst
- AttReader
- PrologReader
- HfstBasicTransducer
- HfstBasicTransition
- HfstTransducer
- HfstInputStream
- HfstOutputStream
- MultiCharSymbolTrie
- HfstTokenizer
- LexcCompiler
- XreCompiler
- PmatchContainer
- ImplementationType