From ba1b7de47ef2b8867b4ddbbf65ad6ffe160b42c1 Mon Sep 17 00:00:00 2001 From: Bartosz Broda <bartosz.broda@gmail.com> Date: Sat, 11 Jun 2011 17:14:45 +0200 Subject: [PATCH] add lexunit c-tor --- libmwereader/mwe.cpp | 15 +++++++++++++++ libmwereader/mwe.h | 15 ++++++++++++++- libmwereader/mweparser.cpp | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/libmwereader/mwe.cpp b/libmwereader/mwe.cpp index e69de29..046b644 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 2527d4b..7508b6b 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 901b1ef..4d06813 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( -- GitLab