Skip to content
Snippets Groups Projects
Commit 2434a2a2 authored by ilor's avatar ilor
Browse files

wccl-rules: fix silly typo and handle missing sections again

parent feb156bd
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ public:
boost::shared_ptr<Corpus2::TokenWriter> writer);
bool empty() const {
return size() > 0;
return size() == 0;
}
size_t size() const {
......@@ -128,6 +128,7 @@ void RuleRunner::apply_rules(boost::shared_ptr<Corpus2::TokenReader> reader,
}
foreach (boost::shared_ptr<Wccl::WcclFile>& f, parsed_files_) {
if (f->has_tag_rules()) {
if (tag_rule_iterations_ == 0) {
f->get_tag_rules_ptr()->execute_once(as);
} else if (tag_rule_iterations_ < 0) {
......@@ -135,8 +136,11 @@ void RuleRunner::apply_rules(boost::shared_ptr<Corpus2::TokenReader> reader,
} else {
f->get_tag_rules_ptr()->execute_until_done(as, tag_rule_iterations_);
}
}
if (f->has_match_rules()) {
f->get_match_rules_ptr()->apply_all(as);
}
}
timer.count_sentence(*as);
if (progress_) {
......@@ -280,7 +284,7 @@ int main(int argc, char** argv)
}
}
} catch (PwrNlp::PwrNlpError& e) {
std::cerr << e.info() << std::endl;
std::cerr << e.scope() << "error: " << e.info() << std::endl;
return 2;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment