From cf4143004793a4a522032898c760933e48b06d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <pawel.kedzia@pwr.wroc.pl> Date: Wed, 4 May 2011 12:01:38 +0200 Subject: [PATCH] Wrapper for Wccl::TokenMatch --- swig/libccltokenmatch.i | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 swig/libccltokenmatch.i diff --git a/swig/libccltokenmatch.i b/swig/libccltokenmatch.i new file mode 100644 index 0000000..28cbc2e --- /dev/null +++ b/swig/libccltokenmatch.i @@ -0,0 +1,36 @@ +#ifndef SWIG_LIBWCCL_TOKENMATCH_I +#define SWIG_LIBWCCL_TOKENMATCH_I + +%module libccltokenmatch +%{ + #include <libwccl/values/tokenmatch.h> +%} + +%include "libcclposition.i" +%include "libcclmatchdata.i" +%include "libcorpus/libcorpusannotatedsentence.i" + +%nodefaultctor Corpus2::TokenMatch; + +namespace Wccl { + class TokenMatch : public MatchData { + public: + explicit TokenMatch(Position position); + explicit TokenMatch(int pos); + + /* --------------------------------------------------------------------- */ + bool empty() const; + + /* --------------------------------------------------------------------- */ + Position first_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const; + Position last_token(const boost::shared_ptr<Corpus2::AnnotatedSentence>&) const; + + /* --------------------------------------------------------------------- */ + std::string to_raw_string() const; + }; +} + +using namespace std; +using namespace Wccl; + +#endif /* SWIG_LIBWCCL_TOKENMATCH_I */ -- GitLab