Cambridge SMT System
data-main.applylm.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_MAIN_APPLYLM_HPP
16 #define DATA_MAIN_APPLYLM_HPP
17 
25 namespace ucam {
26 namespace fsttools {
31 template <class ArcT = void >
32 struct ApplyLMData {
34  sidx ( 0 ),
35  stats ( new StatsData ) {
36  };
37 
38  // sentence/lattice identifier.
39  unsigned sidx;
40 
41  // only for bilingual models:
42  std::string integerMappedSentence;
43  std::vector<std::vector<unsigned> > sourceWindows;
44 
46  unordered_map<std::string, std::vector <const KenLMData *> > klm;
47  boost::scoped_ptr<StatsData> stats;
48  unordered_map<std::string, void *> fsts;
50  unordered_map<std::string, ucam::util::WordMapper *> wm;
51 };
52 
53 }
54 } // end namespaces
55 
56 #endif
Contains data for statistics, i.e. allows timing actions and methods called during execution...
Definition: data.stats.hpp:88
boost::scoped_ptr< StatsData > stats
unordered_map< std::string, std::vector< const KenLMData * > > klm
lists of language models indexed by a key (i.e. parameter )
data structure for applylm tool
unordered_map< std::string, void * > fsts
unordered_map< std::string, ucam::util::WordMapper * > wm
Wordmap/Integer map objects.
std::vector< std::vector< unsigned > > sourceWindows
Definition: bleu.hpp:14