Skip to content
Snippets Groups Projects
Commit 6810c379 authored by ilor's avatar ilor
Browse files

use FunctionalOperator::clean to have consistent results in wccl-run...

use FunctionalOperator::clean to have consistent results in wccl-run (variables will not roll over to subsequent operator runs)
parent ec2e9c75
No related merge requests found
......@@ -234,6 +234,7 @@ void Runner::do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence,
sc.set_position(i);
UnicodeString vstr;
if (filter_op_) {
filter_op_->clean();
boost::shared_ptr<const Wccl::Value> v = filter_op_->base_apply(sc);
vstr = v->to_string_u(tagset_);
std::string uvstr = PwrNlp::to_utf8(vstr);
......@@ -263,6 +264,7 @@ void Runner::do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence,
}
foreach (const boost::shared_ptr<Wccl::FunctionalOperator>& o, ops_) {
o->clean();
boost::shared_ptr<const Wccl::Value> v = o->base_apply(sc);
UnicodeString vstr = v->to_string_u(tagset_);
out.push_back(vstr);
......
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