Skip to content
Snippets Groups Projects
Commit 26e9fe67 authored by ilor's avatar ilor
Browse files

wcclrun: remove do_head, add output-orths option

parent 24af99d1
Branches
No related merge requests found
...@@ -47,7 +47,6 @@ public: ...@@ -47,7 +47,6 @@ public:
return ops_; return ops_;
} }
void do_head();
void do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence); void do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence);
void do_stream(std::istream& is, bool first); void do_stream(std::istream& is, bool first);
...@@ -95,23 +94,6 @@ bool Runner::load_more_operators(const std::string& filename) ...@@ -95,23 +94,6 @@ bool Runner::load_more_operators(const std::string& filename)
return false; return false;
} }
void Runner::do_head()
{
streamsave sv(std::cout);
std::cout << "## ";
std::cout << std::setw(20) << "orth";
int i = 0;
foreach (const boost::shared_ptr<Wccl::FunctionalOperator>& o, ops_) {
++i;
std::cout << " ";
std::cout.setf(std::ios::right);
std::cout << std::setw(15) << "operator ";
std::cout.setf(std::ios::left);
std::cout << std::setw(5) << i;
}
std::cout << "\n";
}
void Runner::do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence) void Runner::do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence)
{ {
Wccl::SentenceContext sc(sentence); Wccl::SentenceContext sc(sentence);
...@@ -171,7 +153,6 @@ void Runner::do_stream(std::istream& is, bool first) ...@@ -171,7 +153,6 @@ void Runner::do_stream(std::istream& is, bool first)
{ {
Corpus2::XcesReader xr(tagset_, is); Corpus2::XcesReader xr(tagset_, is);
Corpus2::Sentence::Ptr s; Corpus2::Sentence::Ptr s;
//do_head(tagset, ops);
while ((s = xr.get_next_sentence())) { while ((s = xr.get_next_sentence())) {
do_sentence(s); do_sentence(s);
std::cout << "\n"; std::cout << "\n";
...@@ -209,6 +190,8 @@ int main(int argc, char** argv) ...@@ -209,6 +190,8 @@ int main(int argc, char** argv)
"Output in-sentence token counts\n") "Output in-sentence token counts\n")
("global-counts,g", value(&global_numbering), ("global-counts,g", value(&global_numbering),
"Output global counts\n") "Output global counts\n")
("output-orths,O", value(&output_orths),
"Output token orths\n")
("help,h", "Show help") ("help,h", "Show help")
; ;
boost::program_options::variables_map vm; boost::program_options::variables_map vm;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment