HFST - Helsinki Finite-State Transducer Technology - C++ API  version 3.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HfstDataTypes.h
Go to the documentation of this file.
1 // Copyright (c) 2016 University of Helsinki
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 3 of the License, or (at your option) any later version.
7 // See the file COPYING included with this distribution for more
8 // information.
9 
10 #ifndef _HFST_DATA_TYPES_H_
11 #define _HFST_DATA_TYPES_H_
12 
13 #if HAVE_CONFIG_H
14 # include <config.h>
15 #endif
16 
17 #include <string>
18 #include <iostream>
19 #include <vector>
20 #include <map>
21 #include <set>
22 
23 
27 namespace hfst
28 {
29 
30  class HfstTransducer;
31  class HfstGrammar;
32  class HfstInputStream;
34 
36  typedef std::vector<HfstTransducer> HfstTransducerVector;
37 
38  // ENUMS AND TYPEDEFS...
39 
42  {
48  /* Add an enumerator for your transducer type here. */
49  //MY_TRANSDUCER_LIBRARY_TYPE,
57  };
58 
59  const char * implementation_type_to_string(ImplementationType type);
60  const char * implementation_type_to_format(ImplementationType type);
61 
64  enum PushType
65  {
68  };
69 
73  typedef std::vector<HfstTransducer> HfstTransducerVector;
74 
78  typedef std::pair <HfstTransducer,HfstTransducer> HfstTransducerPair;
82  typedef std::vector <HfstTransducerPair> HfstTransducerPairVector;
83 
87  typedef std::vector<std::string> StringVector;
96  typedef std::pair<float, StringVector> HfstOneLevelPath;
100  typedef std::set<HfstOneLevelPath> HfstOneLevelPaths;
101 
105  typedef std::vector<std::pair<std::string,std::string> > StringPairVector;
107  typedef std::pair<float, StringPairVector> HfstTwoLevelPath;
109  typedef std::set<HfstTwoLevelPath> HfstTwoLevelPaths;
110 
111  namespace implementations {
112  template <class C> class HfstTransitionGraph;
116  class HfstFastTransitionData;
119  typedef unsigned int HfstState;
120 
121  template <class C> class HfstTransition;
126 
127  }
128 
129  // ...ENUMS AND TYPEDEFS
130 
131 
132 }
133 // vim: set ft=cpp.doxygen:
134 #endif
Definition: HfstDataTypes.h:46
Definition: HfstDataTypes.h:47
Definition: HfstDataTypes.h:43
std::vector< std::pair< std::string, std::string > > StringPairVector
A vector of string pairs.
Definition: HfstDataTypes.h:105
unsigned int HfstState
The number of a state in an HfstTransitionGraph.
Definition: HfstDataTypes.h:119
Definition: HfstDataTypes.h:67
Definition: HfstDataTypes.h:53
ImplementationType
The type of an HfstTransducer.
Definition: HfstDataTypes.h:41
Definition: HfstDataTypes.h:66
A simple transition graph format that consists of states and transitions between those states...
Definition: HfstDataTypes.h:112
PushType
The type of a push operation.
Definition: HfstDataTypes.h:64
A stream for writing binary transducers.
Definition: HfstOutputStream.h:70
std::vector< HfstTransducer > HfstTransducerVector
a vector of transducers for methods applying a cascade of automata
Definition: HfstDataTypes.h:33
std::set< HfstTwoLevelPath > HfstTwoLevelPaths
A set of two-level weighted paths.
Definition: HfstDataTypes.h:109
Definition: HfstDataTypes.h:50
Definition: HfstDataTypes.h:44
Definition: HfstDataTypes.h:51
std::set< HfstOneLevelPath > HfstOneLevelPaths
A set of simple paths.
Definition: HfstDataTypes.h:100
std::pair< HfstTransducer, HfstTransducer > HfstTransducerPair
A pair of transducers.
Definition: HfstDataTypes.h:78
std::pair< float, StringVector > HfstOneLevelPath
A path of one level of arcs with collected weight.
Definition: HfstDataTypes.h:96
std::pair< float, StringPairVector > HfstTwoLevelPath
A path of two level of arcs with collected weight.
Definition: HfstDataTypes.h:107
std::vector< HfstTransducerPair > HfstTransducerPairVector
A vector of transducer pairs.
Definition: HfstDataTypes.h:82
HfstTransition< HfstTropicalTransducerTransitionData > HfstBasicTransition
An HfstTransition with transition data of type HfstTropicalTransducerTransitionData.
Definition: HfstDataTypes.h:121
One implementation of template class C in HfstTransition.
Definition: HfstTropicalTransducerTransitionData.h:45
HfstTransitionGraph< HfstTropicalTransducerTransitionData > HfstBasicTransducer
An HfstTransitionGraph with transitions of type HfstTropicalTransducerTransitionData and weight type ...
Definition: HfstDataTypes.h:113
A transition that consists of a target state and transition data represented by class C...
Definition: HfstDataTypes.h:121
Definition: HfstDataTypes.h:54
Definition: HfstDataTypes.h:45
Definition: HfstDataTypes.h:52
std::vector< std::string > StringVector
A vector of strings.
Definition: HfstDataTypes.h:87