libime
Public Member Functions | Static Public Member Functions | List of all members
libime::LanguageModel Class Reference
Inheritance diagram for libime::LanguageModel:
Inheritance graph
[legend]
Collaboration diagram for libime::LanguageModel:
Collaboration graph
[legend]

Public Member Functions

 LanguageModel (const char *file)
 
 LanguageModel (std::shared_ptr< const StaticLanguageModelFile > file=nullptr)
 
std::shared_ptr< const StaticLanguageModelFilelanguageModelFile () const
 
WordIndex beginSentence () const override
 
WordIndex endSentence () const override
 
WordIndex unknown () const override
 
const State & beginState () const override
 
const State & nullState () const override
 
WordIndex index (std::string_view word) const override
 
float score (const State &state, const WordNode &node, State &out) const override
 
bool isUnknown (WordIndex idx, std::string_view word) const override
 
void setUnknownPenalty (float unknown)
 
float unknownPenalty () const
 
unsigned int maxNgramLength (const std::vector< std::string > &words) const
 
- Public Member Functions inherited from libime::LanguageModelBase
bool isNodeUnknown (const LatticeNode &node) const
 
float singleWordScore (std::string_view word) const
 
float singleWordScore (const State &state, std::string_view word) const
 
float wordsScore (const State &state, const std::vector< std::string_view > &word) const
 

Static Public Member Functions

static size_t maxOrder ()
 

Detailed Description

Definition at line 69 of file languagemodel.h.


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