diff options
author | zens <zens@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-07-19 04:16:29 +0400 |
---|---|---|
committer | zens <zens@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-07-19 04:16:29 +0400 |
commit | 648bd1dfcdc337f15ddf88823515e0cbedf62bd4 (patch) | |
tree | 893e3a23ce02ef0dd1f356498fd2bb04feaa2014 /misc | |
parent | 5449e11bb91459dc84bb07ff26ad7143b47df420 (diff) |
- prepared confusion net input
-> new base class InputType is used throughout the decoder
instead of Sentence
Sentence and ConfusionNet derive from this class
-> Manager etc. do not know if the input is a sentence or a
confusion net (but could check if REALLY needed)
- two separate classes derived from TranslationOptionCollection:
one for text input and one for confusion net input
- score computation in PhraseDictionaryTree.cpp and some optimizations
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@183 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'misc')
-rw-r--r-- | misc/processPhraseTable.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/misc/processPhraseTable.cpp b/misc/processPhraseTable.cpp index cb73d3a10..8bb057c05 100644 --- a/misc/processPhraseTable.cpp +++ b/misc/processPhraseTable.cpp @@ -167,16 +167,17 @@ int main(int argc,char **argv) { else { // process confusion net input ConfusionNet net(&factorCollection); + std::vector<std::vector<float> > weights; + for(size_t i=0;i<pdicts.size();++i) + weights.push_back(std::vector<float>(noScoreComponent,1/(1.0*noScoreComponent))); while(net.Read(std::cin,factorOrder,cn-1)) { net.Print(std::cerr); - GenerateCandidates(net,pdicts); + GenerateCandidates(net,pdicts,weights); } - } - } } |