omorfi 0.9.9
Open morphology of Finnish
Public Member Functions | Data Fields | Static Public Attributes
omorfi.guesser.Guesser Class Reference

Public Member Functions

def __init__ (self)
 
def use_analyser (self, Analyser analyser)
 
def load_guesser (self, str hfstfile)
 
def guess (self, Token token)
 

Data Fields

 guesser
 
 analyser
 
 try_titlecase
 
 try_lowercase
 
 try_uppercase
 
 try_detitlecase
 

Static Public Attributes

int PENALTY = 28021984
 

Detailed Description

An object for omorfi’s morphological guessing.

Constructor & Destructor Documentation

◆ __init__()

def omorfi.guesser.Guesser.__init__ (   self)
Load analysis model from a file.

Args
    f: containing single hfst automaton binary.

Member Function Documentation

◆ guess()

def omorfi.guesser.Guesser.guess (   self,
Token  token 
)
Speculate morphological analyses of OOV token.

This method may use multiple information sources, but not the actual
analyser. Therefore a typical use of this is after the analyse(token)
function has failed. Note that some information sources perform badly
when guessing without context, for these the analyse_sentence(sent) is
the only option.

Side-effect:
    This operation stores guesses in token for future use as well as
    returning them.

Args:
    token: token to analyse with guessers.

Returns:
    New guesses as a list of Analysis objects.

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