summaryrefslogtreecommitdiff
path: root/training
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-01 19:22:10 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-01 19:22:10 +0000
commit31242eb4c9f60b2b9a36e94c28c1167f64ff6008 (patch)
tree55834c8393e99b96b9d464a8603460a75f532ae5 /training
parent0b925c0ca7e80805b461ce03418193e56ae76ab4 (diff)
docs
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@92 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'training')
-rw-r--r--training/grammar_convert.cc8
-rw-r--r--training/plftools.cc6
2 files changed, 11 insertions, 3 deletions
diff --git a/training/grammar_convert.cc b/training/grammar_convert.cc
index 461ff8e4..8d292f8a 100644
--- a/training/grammar_convert.cc
+++ b/training/grammar_convert.cc
@@ -1,3 +1,7 @@
+/*
+ this program modifies cfg hypergraphs (forests) and extracts kbests?
+ what are: json, split ?
+ */
#include <iostream>
#include <algorithm>
#include <sstream>
@@ -120,7 +124,7 @@ bool CheckPermutationMask(const vector<int>& mask, const vector<int>& pi) {
req_min = cur_max - 1;
}
if (pi[i] > req_min) {
- if (pi[i] > cur_max) cur_max = pi[i];
+ if (pi[i] > cur_max) cur_max = pi[i];
} else {
return false;
}
@@ -142,7 +146,7 @@ void PermuteYKRecursive(int nodeid, const WordID& parent, const int max_reorder,
const TRule& rule = *hg->edges_[oe_index].rule_;
const Hypergraph::TailNodeVector orig_tail = hg->edges_[oe_index].tail_nodes_;
const int tail_size = orig_tail.size();
- for (int i = 0; i < tail_size; ++i) {
+ for (int i = 0; i < tail_size; ++i) {
PermuteYKRecursive(hg->edges_[oe_index].tail_nodes_[i], node->cat_, max_reorder, hg);
}
const vector<WordID>& of = rule.f_;
diff --git a/training/plftools.cc b/training/plftools.cc
index 903ec54f..d58e0b43 100644
--- a/training/plftools.cc
+++ b/training/plftools.cc
@@ -1,3 +1,7 @@
+char const* NOTES =
+ "Process (PLF format) lattice: sharpen distribution, nbest, graphviz, push weights\n"
+ ;
+
#include <iostream>
#include <fstream>
#include <vector>
@@ -33,7 +37,7 @@ void InitCommandLine(int argc, char** argv, po::variables_map* conf) {
po::notify(*conf);
if (conf->count("help") || conf->count("input") == 0) {
- cerr << dcmdline_options << endl;
+ cerr << dcmdline_options << endl << NOTES << endl;
exit(1);
}
}