From cc9601b3ae7366d71abf1d99aa80eeb8cc44a096 Mon Sep 17 00:00:00 2001 From: Adam Wardynski <award@.(win7-laptop)> Date: Wed, 8 Dec 2010 12:45:39 +0100 Subject: [PATCH] Agreement ops now take tagset ref in constructor. Note: still not implemented internals of agreement --- libwccl/ops/functions/bool/predicates/pointagreement.h | 7 +++++-- libwccl/ops/functions/bool/predicates/strongagreement.h | 7 +++++-- libwccl/ops/functions/bool/predicates/weakagreement.h | 7 +++++-- libwccl/ops/functions/tset/agrfilter.h | 8 +++++--- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/libwccl/ops/functions/bool/predicates/pointagreement.h b/libwccl/ops/functions/bool/predicates/pointagreement.h index b9b58e9..cefa1f7 100644 --- a/libwccl/ops/functions/bool/predicates/pointagreement.h +++ b/libwccl/ops/functions/bool/predicates/pointagreement.h @@ -19,10 +19,12 @@ public: PointAgreement( const PosFunctionPtr& pos1_expr, const PosFunctionPtr& pos2_expr, - const TSetFunctionPtr& attribs_expr) + const TSetFunctionPtr& attribs_expr, + const Corpus2::Tagset& tagset) : pos1_expr_(pos1_expr), pos2_expr_(pos2_expr), - attribs_expr_(attribs_expr) + attribs_expr_(attribs_expr), + tagset_(tagset) { BOOST_ASSERT(pos1_expr_); BOOST_ASSERT(pos2_expr_); @@ -45,6 +47,7 @@ protected: const PosFunctionPtr pos1_expr_; const PosFunctionPtr pos2_expr_; const TSetFunctionPtr attribs_expr_; + const Corpus2::Tagset& tagset_; /** * Gets two positions from arguments. If either of them diff --git a/libwccl/ops/functions/bool/predicates/strongagreement.h b/libwccl/ops/functions/bool/predicates/strongagreement.h index c59ee02..83c9dd6 100644 --- a/libwccl/ops/functions/bool/predicates/strongagreement.h +++ b/libwccl/ops/functions/bool/predicates/strongagreement.h @@ -18,10 +18,12 @@ public: StrongAgreement( const PosFunctionPtr& left_pos_expr, const PosFunctionPtr& right_pos_expr, - const TSetFunctionPtr& attribs_expr) + const TSetFunctionPtr& attribs_expr, + const Corpus2::Tagset& tagset) : left_pos_expr_(left_pos_expr), right_pos_expr_(right_pos_expr), - attribs_expr_(attribs_expr) + attribs_expr_(attribs_expr), + tagset_(tagset) { BOOST_ASSERT(left_pos_expr_); BOOST_ASSERT(right_pos_expr_); @@ -45,6 +47,7 @@ protected: const PosFunctionPtr left_pos_expr_; const PosFunctionPtr right_pos_expr_; const TSetFunctionPtr attribs_expr_; + const Corpus2::Tagset& tagset_; /** * Gets start and end positions for range from arguments. diff --git a/libwccl/ops/functions/bool/predicates/weakagreement.h b/libwccl/ops/functions/bool/predicates/weakagreement.h index f3f5883..e4a47ab 100644 --- a/libwccl/ops/functions/bool/predicates/weakagreement.h +++ b/libwccl/ops/functions/bool/predicates/weakagreement.h @@ -18,10 +18,12 @@ public: WeakAgreement( const PosFunctionPtr& left_pos_expr, const PosFunctionPtr& right_pos_expr, - const TSetFunctionPtr& attribs_expr) + const TSetFunctionPtr& attribs_expr, + const Corpus2::Tagset& tagset) : left_pos_expr_(left_pos_expr), right_pos_expr_(right_pos_expr), - attribs_expr_(attribs_expr) + attribs_expr_(attribs_expr), + tagset_(tagset) { BOOST_ASSERT(left_pos_expr_); BOOST_ASSERT(right_pos_expr_); @@ -45,6 +47,7 @@ protected: const PosFunctionPtr left_pos_expr_; const PosFunctionPtr right_pos_expr_; const TSetFunctionPtr attribs_expr_; + const Corpus2::Tagset& tagset_; /** * Gets start and end positions for range from arguments. diff --git a/libwccl/ops/functions/tset/agrfilter.h b/libwccl/ops/functions/tset/agrfilter.h index f86f3fd..d41d4c6 100644 --- a/libwccl/ops/functions/tset/agrfilter.h +++ b/libwccl/ops/functions/tset/agrfilter.h @@ -22,11 +22,13 @@ public: const PosFunctionPtr& left_pos_expr, const PosFunctionPtr& right_pos_expr, const TSetFunctionPtr& attribs_expr, - const TSetFunctionPtr& mask_expr) + const TSetFunctionPtr& mask_expr, + const Corpus2::Tagset& tagset) : left_pos_expr_(left_pos_expr), right_pos_expr_(right_pos_expr), attribs_expr_(attribs_expr), - mask_expr_(mask_expr) + mask_expr_(mask_expr), + tagset_(tagset) { BOOST_ASSERT(left_pos_expr_); BOOST_ASSERT(right_pos_expr_); @@ -54,7 +56,7 @@ protected: const TSetFunctionPtr attribs_expr_; const TSetFunctionPtr mask_expr_; - + const Corpus2::Tagset& tagset_; /** * Gets range specified via Position expressions. Trims the range -- GitLab