diff --git a/swig/libcclexpression.i b/swig/libcclexpression.i index 128f7a9f0492a0a05defd21bab6d3d501b54e14b..be265e1634862447bf5c9bade01d516e400d90a9 100644 --- a/swig/libcclexpression.i +++ b/swig/libcclexpression.i @@ -7,7 +7,7 @@ #include <boost/noncopyable.hpp> %} -%include "libcorpustagset.i" +%include "libcorpus/libcorpustagset.i" %include "std_string.i" namespace Wccl { diff --git a/swig/libcclmatch.i b/swig/libcclmatch.i index 41ba586bd2fc24102b69d20a9bc29dc212d2081d..1e3d64bcfd0cbe5317cceb72e1768eed4c1bd8e1 100644 --- a/swig/libcclmatch.i +++ b/swig/libcclmatch.i @@ -7,12 +7,18 @@ #include <libwccl/values/match.h> %} -%include "libcclvalue.i" %include "std_string.i" +%include "libcclvalue.i" +%include "libcclposition.i" +// %include "libcclmatchdata.i" +// %include "libccltokenmatch.i" +%include "libcorpus/libcorpusannotatedsentence.i" %feature("notabstract") Wccl::Match; namespace Wccl { + // class MatchData; + class Match : public Value { public: const char* get_type_name() const { return type_name; } @@ -22,12 +28,27 @@ namespace Wccl { } Match(); + // Match(const boost::shared_ptr<MatchData>& data); + // Match(const boost::shared_ptr<TokenMatch>& data); + // Match(const boost::shared_ptr<AnnotationMatch>& data); + // Match(const boost::shared_ptr<MatchVector>& data); + + // Match(const MatchData& data); + // Match(const Match& match); + + // %rename(MatchEq) operator=(const Match& match); + // Match& operator=(const Match& match); + + // const MatchData& get_value() const; + // MatchData& get_value(); + + // void set_value(const MatchData& m); + // bool empty() const; - // TODO // virtual Position first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const; // virtual Position last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const; - std::string to_raw_string() const; + // std::string to_raw_string() const; }; } diff --git a/swig/libcclmatchdata.i b/swig/libcclmatchdata.i index 3d75e4fda3ab4246d001da2c057661bb2ca45652..a39b2be634b61aa59e10e6c02a581c82dd048071 100644 --- a/swig/libcclmatchdata.i +++ b/swig/libcclmatchdata.i @@ -11,7 +11,7 @@ %include "libcclposition.i" %include "libcorpus/libcorpusannotatedsentence.i" -// %template(MatchDataPtr) boost::shared_ptr<Wccl::MatchData>; +%template(MatchDataPtr) boost::shared_ptr<Wccl::MatchData>; namespace Wccl { class MatchData { diff --git a/swig/libcclparser.i b/swig/libcclparser.i index fc2284bbf6efe82dcca453060980e12062fce2c2..84deead5ea8c3c134e364665a020e78aba6dbb59 100644 --- a/swig/libcclparser.i +++ b/swig/libcclparser.i @@ -6,10 +6,13 @@ #include <libwccl/parser/Parser.h> %} -%include "libcorpustagsetmanager.i" +%include "libcclbool.i" +%include "libccloperator.i" +%include "libcorpus/libcorpustagsetmanager.i" %include "std_string.i" %include "std_vector.i" +%include "boost_shared_ptr.i" namespace Wccl { class Parser { @@ -17,10 +20,13 @@ namespace Wccl { Parser(const Corpus2::Tagset&); ~TagsetManager(); - /* --------------------------------------------------------------------- */ + + // %rename (SharedPtrBoolOperator) boost::shared_ptr<Operator<Bool> >; + shared_ptr<Operator<Bool> > parseBoolOperator(const std::string&) const; }; } +using namespace boost; using namespace std; using namespace Corpus2; diff --git a/swig/libcclsentencecontext.i b/swig/libcclsentencecontext.i index b1bb4459e9bbe96460fbf1037e28be6dabd136e0..e3202d8ac16261c70f06ed60126b3411dbfbe0d2 100644 --- a/swig/libcclsentencecontext.i +++ b/swig/libcclsentencecontext.i @@ -6,9 +6,9 @@ #include <libwccl/sentencecontext.h> %} -%include "libcorpustoken.i" -%include "libcorpuslexeme.i" -%include "libcorpussentence.i" +%include "libcorpus/libcorpustoken.i" +%include "libcorpus/libcorpuslexeme.i" +%include "libcorpus/libcorpussentence.i" %include "libcclposition.i"