Cambridge SMT System
data.lmbr.hpp
Go to the documentation of this file.
1 // Licensed under the Apache License, Version 2.0 (the "License");
2 // you may not use these files except in compliance with the License.
3 // You may obtain a copy of the License at
4 //
5 // http://www.apache.org/licenses/LICENSE-2.0
6 //
7 // Unless required by applicable law or agreed to in writing, software
8 // distributed under the License is distributed on an "AS IS" BASIS,
9 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 // See the License for the specific language governing permissions and
11 // limitations under the License.
12 
13 // Copyright 2012 - Gonzalo Iglesias, AdriĆ  de Gispert, William Byrne
14 
15 #ifndef DATA_LMBR_HPP
16 #define DATA_LMBR_HPP
17 
18 #define tracer cerr
19 
20 namespace ucam {
21 namespace lmbr {
22 
23 const unsigned kEpsLabel = 0;
24 
25 typedef unordered_set<fst::WordId> Wlist;
26 typedef Wlist::iterator WlistIt;
27 typedef double Posterior;
28 typedef unordered_map< fst::NGram
29 , fst::StdArc::StateId
32 typedef unordered_map< fst::NGram
33 , std::vector< std::vector<Posterior> >
36 
37 struct lmbrtunedata {
38  std::basic_string<float> wps;
39  std::basic_string<float> alpha;
40  unsigned idx;
41  std::vector<string> hyp;
42 };
43 
44 }
45 } // end namespaces
46 
47 #endif // DATA_LMBR_HPP
unordered_set< fst::WordId > Wlist
Definition: data.lmbr.hpp:25
const unsigned kEpsLabel
Definition: data.lmbr.hpp:23
unordered_map< fst::NGram, std::vector< std::vector< Posterior > >, ucam::util::hashfvecuint, ucam::util::hasheqvecuint > NGramToPosteriorsMapper
Definition: data.lmbr.hpp:35
std::basic_string< float > alpha
Definition: data.lmbr.hpp:39
HashFVec< std::basic_string< unsigned > > hashfvecuint
double Posterior
Definition: data.lmbr.hpp:27
std::basic_string< float > wps
Definition: data.lmbr.hpp:38
Wlist::iterator WlistIt
Definition: data.lmbr.hpp:26
std::basic_string< WordId > NGram
unordered_map< fst::NGram, fst::StdArc::StateId, ucam::util::hashfvecuint, ucam::util::hasheqvecuint > NGramToStateMapper
Definition: data.lmbr.hpp:31
std::vector< string > hyp
Definition: data.lmbr.hpp:41
Definition: bleu.hpp:14