HFST - Helsinki Finite-State Transducer Technology API  version 3.7.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HfstDataTypes.h
Go to the documentation of this file.
1 // This program is free software: you can redistribute it and/or modify
2 // it under the terms of the GNU General Public License as published by
3 // the Free Software Foundation, version 3 of the License.
4 //
5 // This program is distributed in the hope that it will be useful,
6 // but WITHOUT ANY WARRANTY; without even the implied warranty of
7 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 // GNU General Public License for more details.
9 //
10 // You should have received a copy of the GNU General Public License
11 // along with this program. If not, see <http://www.gnu.org/licenses/>.
12 #ifndef _HFST_DATA_TYPES_H_
13 #define _HFST_DATA_TYPES_H_
14 
15 #if HAVE_CONFIG_H
16 # include <config.h>
17 #endif
18 
19 #include <string>
20 #include <iostream>
21 #include <vector>
22 #include <map>
23 #include <set>
24 
25 
29 namespace hfst
30 {
31 
32  class HfstTransducer;
33  class HfstGrammar;
34  class HfstInputStream;
36 
38  typedef std::vector<HfstTransducer> HfstTransducerVector;
39 
40  // ENUMS AND TYPEDEFS...
41 
44  {
49  /* Add an enumerator for your transducer type here. */
50  //MY_TRANSDUCER_LIBRARY_TYPE,
58  };
59 
60  const char * implementation_type_to_string(ImplementationType type);
61  const char * implementation_type_to_format(ImplementationType type);
62 
65  enum PushType
66  {
69  };
70 
74  typedef std::vector<HfstTransducer> HfstTransducerVector;
75 
79  typedef std::pair <HfstTransducer,HfstTransducer> HfstTransducerPair;
83  typedef std::vector <HfstTransducerPair> HfstTransducerPairVector;
84 
88  typedef std::vector<std::string> StringVector;
97  typedef std::pair<float, StringVector> HfstOneLevelPath;
101  typedef std::set<HfstOneLevelPath> HfstOneLevelPaths;
102 
106  typedef std::vector<std::pair<std::string,std::string> > StringPairVector;
108  typedef std::pair<float, StringPairVector> HfstTwoLevelPath;
110  typedef std::set<HfstTwoLevelPath> HfstTwoLevelPaths;
111 
112  namespace implementations {
113  template <class C> class HfstTransitionGraph;
120  typedef unsigned int HfstState;
121 
122  template <class C> class HfstTransition;
127 
128  }
129 
130  // ...ENUMS AND TYPEDEFS
131 
132 
133 }
134 // vim: set ft=cpp.doxygen:
135 #endif
Definition: HfstDataTypes.h:48
Definition: HfstDataTypes.h:45
HfstTransitionGraph< HfstFastTransitionData > HfstFastTransducer
A specialization for faster conversion.
Definition: HfstDataTypes.h:117
std::vector< std::pair< std::string, std::string > > StringPairVector
A vector of string pairs.
Definition: HfstDataTypes.h:106
unsigned int HfstState
The number of a state in an HfstTransitionGraph.
Definition: HfstDataTypes.h:120
Definition: HfstDataTypes.h:68
Definition: HfstDataTypes.h:54
HfstTransition< HfstFastTransitionData > HfstFastTransition
An HfstTransition with transition data of type HfstFastTransitionData.
Definition: HfstDataTypes.h:126
ImplementationType
The type of an HfstTransducer.
Definition: HfstDataTypes.h:43
Definition: HfstDataTypes.h:67
A simple transition graph format that consists of states and transitions between those states...
Definition: HfstDataTypes.h:113
PushType
The type of a push operation.
Definition: HfstDataTypes.h:65
A stream for writing binary transducers.
Definition: HfstOutputStream.h:67
std::vector< HfstTransducer > HfstTransducerVector
a vector of transducers for methods applying a cascade of automata
Definition: HfstDataTypes.h:35
std::set< HfstTwoLevelPath > HfstTwoLevelPaths
A set of two-level weighted paths.
Definition: HfstDataTypes.h:110
Definition: HfstDataTypes.h:51
Definition: HfstDataTypes.h:46
One implementation of template class C in HfstTransition.
Definition: HfstFastTransitionData.h:13
Definition: HfstDataTypes.h:52
std::set< HfstOneLevelPath > HfstOneLevelPaths
A set of simple paths.
Definition: HfstDataTypes.h:101
std::pair< HfstTransducer, HfstTransducer > HfstTransducerPair
A pair of transducers.
Definition: HfstDataTypes.h:79
std::pair< float, StringVector > HfstOneLevelPath
A path of one level of arcs with collected weight.
Definition: HfstDataTypes.h:97
std::pair< float, StringPairVector > HfstTwoLevelPath
A path of two level of arcs with collected weight.
Definition: HfstDataTypes.h:108
std::vector< HfstTransducerPair > HfstTransducerPairVector
A vector of transducer pairs.
Definition: HfstDataTypes.h:83
HfstTransition< HfstTropicalTransducerTransitionData > HfstBasicTransition
An HfstTransition with transition data of type HfstTropicalTransducerTransitionData.
Definition: HfstDataTypes.h:122
One implementation of template class C in HfstTransition.
Definition: HfstTropicalTransducerTransitionData.h:34
HfstTransitionGraph< HfstTropicalTransducerTransitionData > HfstBasicTransducer
An HfstTransitionGraph with transitions of type HfstTropicalTransducerTransitionData and weight type ...
Definition: HfstDataTypes.h:114
A transition that consists of a target state and transition data represented by class C...
Definition: HfstDataTypes.h:122
Definition: HfstDataTypes.h:55
Definition: HfstDataTypes.h:47
Definition: HfstDataTypes.h:53
std::vector< std::string > StringVector
A vector of strings.
Definition: HfstDataTypes.h:88