diff --git a/libmwereader/mwe.cpp b/libmwereader/mwe.cpp index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..046b644858b2d9c744ce51dbd58a4052e2b6f493 100644 --- a/libmwereader/mwe.cpp +++ b/libmwereader/mwe.cpp @@ -0,0 +1,15 @@ +#include "mwe.h" + +namespace Corpus2{ + LexicalUnit::LexicalUnit(const std::string &base, + boost::shared_ptr<Wccl::Operator<Wccl::Bool> > condition, + boost::shared_ptr<Wccl::Operator<Wccl::Bool> > head_cond, + std::map<std::string, std::string> variables) + : condition_(condition), + head_cond_(head_cond), + variables_(variables), + base_(base) + { + + } +}//ns Corpus2 diff --git a/libmwereader/mwe.h b/libmwereader/mwe.h index 2527d4ba5de5218247590e14db3142066a757dfc..7508b6b3e277e97cd9df24c5653b45a707e82dca 100644 --- a/libmwereader/mwe.h +++ b/libmwereader/mwe.h @@ -2,12 +2,25 @@ #define LIBMWEREADER_MWE_H #include <libcorpus2/io/reader.h> +#include <libwccl/ops/operator.h> namespace Corpus2 { + + class LexicalUnit { - +public: + LexicalUnit(const std::string &base, + boost::shared_ptr<Wccl::Operator<Wccl::Bool> > condition, + boost::shared_ptr<Wccl::Operator<Wccl::Bool> > head_cond, + std::map<std::string, std::string> variables + ); +protected: + boost::shared_ptr<Wccl::Operator<Wccl::Bool> > condition_; + boost::shared_ptr<Wccl::Operator<Wccl::Bool> > head_cond_; + std::map<std::string, std::string> variables_; + std::string base_; }; class FixedLU : public LexicalUnit diff --git a/libmwereader/mweparser.cpp b/libmwereader/mweparser.cpp index 901b1efc61f4f175bae6fa9594bf039d65c9d37b..4d0681349855f7e79d5c6b7e98ead387fd41af8c 100644 --- a/libmwereader/mweparser.cpp +++ b/libmwereader/mweparser.cpp @@ -54,6 +54,7 @@ namespace Corpus2 { void MWEParser::create_mwe() { + print_current_mwe(true); MWEBuilder::BoolOpPtr main = mwe_builder_->get_mwe_condition( wccl_operator_); MWEBuilder::BoolOpPtr head = mwe_builder_->get_head_condition(