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

Public Member Functions

 LatticeNode (std::string_view word, WordIndex idx, SegmentGraphPath path, const State &state, float cost=0)
 
float cost () const
 
float score () const
 
void setScore (float score)
 
const SegmentGraphNodefrom () const
 
const SegmentGraphNodeto () const
 
const SegmentGraphPath & path () const
 
LatticeNodeprev () const
 
void setPrev (LatticeNode *prev)
 
template<typename T >
 requires (std::is_base_of_v< LatticeNode, T >) T &as()
 
template<typename T >
 requires (std::is_base_of_v< LatticeNode, T >) const T &as() const
 
std::string fullWord () const
 Return the full word till the begining of the sentence.
 
SentenceResult toSentenceResult (float adjust=0.0F) const
 
State & state ()
 
- Public Member Functions inherited from libime::WordNode
 WordNode (std::string_view word, WordIndex idx)
 
 WordNode (WordNode &&other) noexcept(std::is_nothrow_move_constructible_v< std::string >)
 
WordNodeoperator= (WordNode &&other) noexcept(std::is_nothrow_move_assignable_v< std::string >)
 
const std::string & word () const
 
WordIndex idx () const
 
void setIdx (WordIndex idx)
 

Protected Attributes

SegmentGraphPath path_
 
float cost_
 
float score_ = 0.0F
 
State state_
 
LatticeNodeprev_ = nullptr
 
- Protected Attributes inherited from libime::WordNode
std::string word_
 
WordIndex idx_
 

Detailed Description

Definition at line 89 of file lattice.h.


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