HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.9.0
Public Member Functions | List of all members
LexcCompiler Class Reference

A compiler holding information contained in lexc style lexicons. More...

Public Member Functions

def __init__
 Create a lexc compiler for unspecified transducer format. More...
 
def __init__
 Create a lexc compiler with impl as transducer format. More...
 
def __init__
 Create a lexc compiler with impl as transducer format. More...
 
def addAlphabet
 Add alphabet to multicharacter symbol set. More...
 
def addNoFlag
 todo More...
 
def addStringEntry
 Add entry defined by a entry to current lexicon, pointing to continuation weighing weight to current lexicon. More...
 
def addStringPairEntry
 Add entry defined by upper:lower, pointing to continuation weighing weight to current lexicon. More...
 
def addXreDefinition
 Add macro definition named name matching regular expression xre to known xerox regular expressions. More...
 
def addXreEntry
 Add entry defined by regular expression xre, pointing to continuation weighing weight to current lexicon. More...
 
def areWarningsTreatedAsErrors
 todo More...
 
def compileLexical
 Create final usable version of current lexicons and entries. More...
 
def isQuiet
 todo More...
 
def parse
 Compile lexc description from infile into current compiler. More...
 
def parse
 Compile lexc description from file filename into current compiler. More...
 
def printConnectedness
 Check that current morphotax is connected and print anomalies. More...
 
def setAllowMultipleSublexiconDefinitions
 todo More...
 
def setCurrentLexiconName
 Set current processing lexicon name to lexicon_name. More...
 
def setInitialLexiconName
 Set start lexicon's name to lexicon_name. More...
 
def setMinimizeFlags
 todo More...
 
def setRenameFlags
 todo More...
 
def setTreatWarningsAsErrors
 todo More...
 
def setVerbosity
 Set verbosity options. More...
 
def setWithFlags
 todo More...
 

Detailed Description

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.

Constructor & Destructor Documentation

def __init__ (   self)

Create a lexc compiler for unspecified transducer format.

def __init__ (   self,
  impl 
)

Create a lexc compiler with impl as transducer format.

def __init__ (   self,
  impl,
  withFlags 
)

Create a lexc compiler with impl as transducer format.

Member Function Documentation

def addAlphabet (   alphabet)

Add alphabet to multicharacter symbol set.

These symbols may be used for regular expression ? for backends that do not support open alphabets.

def addNoFlag (   lexname)

todo

def addStringEntry (   entry,
  continuation,
  weight 
)

Add entry defined by a entry to current lexicon, pointing to continuation weighing weight to current lexicon.

def addStringPairEntry (   upper,
  lower,
  continuation,
  weight 
)

Add entry defined by upper:lower, pointing to continuation weighing weight to current lexicon.

def addXreDefinition (   name,
  xre 
)

Add macro definition named name matching regular expression xre to known xerox regular expressions.

def addXreEntry (   xre,
  continuation,
  weight 
)

Add entry defined by regular expression xre, pointing to continuation weighing weight to current lexicon.

def areWarningsTreatedAsErrors ( )

todo

def compileLexical ( )

Create final usable version of current lexicons and entries.

Returns
HfstTransducer pointer.
def isQuiet ( )

todo

def parse (   infile)

Compile lexc description from infile into current compiler.

def parse (   filename)

Compile lexc description from file filename into current compiler.

def printConnectedness ( )

Check that current morphotax is connected and print anomalies.

Works like xerox lexc, for compatibility.

def setAllowMultipleSublexiconDefinitions (   value)

todo

def setCurrentLexiconName (   lexicon_name)

Set current processing lexicon name to lexicon_name.

def setInitialLexiconName (   lexicon_name)

Set start lexicon's name to lexicon_name.

def setMinimizeFlags (   value)

todo

def setRenameFlags (   value)

todo

def setTreatWarningsAsErrors (   value)

todo

def setVerbosity (   verbose)

Set verbosity options.

When verbose is true, LexcCompiler will output the messages that Xerox lexc compiler does.

def setWithFlags (   value)

todo


The documentation for this class was generated from the following file: