Skip to content
Snippets Groups Projects
Commit 1923cc70 authored by ilor's avatar ilor
Browse files

add missing getter impl in wcclfile, fix wccl-rules

parent a8e745f5
Branches
No related merge requests found
...@@ -36,6 +36,14 @@ boost::shared_ptr<const TagRuleSequence> WcclFile::get_tag_rules_ptr() const ...@@ -36,6 +36,14 @@ boost::shared_ptr<const TagRuleSequence> WcclFile::get_tag_rules_ptr() const
return tag_rules_; return tag_rules_;
} }
boost::shared_ptr<MatchRuleSequence> WcclFile::get_match_rules_ptr()
{
if (!has_match_rules()) {
throw WcclError("There are no match rules.");
}
return match_rules_;
}
boost::shared_ptr<const MatchRuleSequence> WcclFile::get_match_rules_ptr() const boost::shared_ptr<const MatchRuleSequence> WcclFile::get_match_rules_ptr() const
{ {
if (!has_match_rules()) { if (!has_match_rules()) {
......
...@@ -125,9 +125,7 @@ void RuleRunner::apply_rules(boost::shared_ptr<Corpus2::TokenReader> reader, ...@@ -125,9 +125,7 @@ void RuleRunner::apply_rules(boost::shared_ptr<Corpus2::TokenReader> reader,
} else { } else {
f->get_tag_rules_ptr()->execute_until_done(as, tag_rule_iterations_); f->get_tag_rules_ptr()->execute_until_done(as, tag_rule_iterations_);
} }
foreach (const boost::shared_ptr<Wccl::MatchRule>& mr, f->get_match_rules()) { f->get_match_rules_ptr()->apply_all(as);
mr->apply(as);
}
} }
timer.count_sentence(*as); timer.count_sentence(*as);
......
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