diff --git a/swig/libccltokenmatch.i b/swig/libccltokenmatch.i new file mode 100644 index 0000000000000000000000000000000000000000..28cbc2e250a6b936bdfed90496f79e2db72de204 --- /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 */