HFST - Helsinki Finite-State Transducer Technology API  version 3.7.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HfstEpsilonHandler.h
1 #ifndef _HFST_EPSILON_HANDLER_H_
2 #define _HFST_EPSILON_HANDLER_H_
3 
4 #include "HfstDataTypes.h"
5 
6 namespace hfst {
7 
8  /* A class for handling input epsilon cycles in function lookup_fd. */
9  class HfstEpsilonHandler
10  {
11  protected:
12  typedef std::vector<hfst::implementations::HfstState> HfstStateVector;
13  // the path of consecutive input epsilon transitions
14  HfstStateVector epsilon_path;
15  size_t max_cycles; // maximum number of consecutive epsilon cycles allowed
16  size_t cycles; // number of cycles detected so far
17  public:
18  HfstEpsilonHandler(size_t cutoff);
19  void push_back(hfst::implementations::HfstState s);
20  void pop_back();
21  bool can_continue(hfst::implementations::HfstState s);
22  };
23 
24 }
25 
26 #endif // _HFST_EPSILON_HANDLER_H_
unsigned int HfstState
The number of a state in an HfstTransitionGraph.
Definition: HfstDataTypes.h:120
Datatypes that are needed when using the HFST API.