Skip to content
Snippets Groups Projects
Commit 538765db authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

(swig) Added wrapper for Wccl::MatchRuleSequence

parent 4a795d96
Branches
No related merge requests found
......@@ -37,8 +37,10 @@ CBIN=libcclvalue.o \
libccltagrule.o \
libccltagrulesequence.o \
libcclmatchrule.o \
libcclmatchrulesequence.o \
libcclfunctionalopsequence.o \
libcclwcclfileopsections.o \
libcclwcclfile.o \
wccl.o
CBINOUT=_libcclvalue.so \
......@@ -63,6 +65,7 @@ CBINOUT=_libcclvalue.so \
_libccltagrule.so \
_libccltagrulesequence.so \
_libcclmatchrule.so \
_libcclmatchrulesequence.so \
_libcclfunctionalopsequence.so \
_libcclwcclfileopsections.so \
_wccl.so \
......@@ -90,6 +93,7 @@ CWRAP=libcclvalue_wrap.cxx \
libccltagrule_wrap.cxx \
libccltagrulesequence_wrap.cxx \
libcclmatchrule_wrap.cxx \
libcclmatchrulesequence_wrap.cxx \
libcclfunctionalopsequence_wrap.cxx \
libcclwcclfileopsections_wrap.cxx \
wccl_wrap.cxx \
......@@ -117,6 +121,7 @@ CWRAPBIN=libcclvalue_wrap.o \
libccltagrule_wrap.o \
libccltagrulesequence_wrap.o \
libcclmatchrule_wrap.o \
libcclmatchrulesequence_wrap.o \
libcclfunctionalopsequence_wrap.o \
libcclwcclfileopsections_wrap.o \
wccl_wrap.o \
......@@ -144,6 +149,7 @@ PYMODULES=libcclvalue.py \
libccltagrule.py \
libccltagrulesequence.py \
libcclmatchrule.py \
libcclmatchrulesequence.py \
libcclfunctionalopsequence.py \
libcclwcclfileopsections.py \
wccl.py \
......@@ -171,6 +177,7 @@ PYCBIN=libcclvalue.pyc \
libccltagrule.pyc \
libccltagrulesequence.pyc \
libcclmatchrule.pyc \
libcclmatchrulesequence.pyc \
libcclfunctionalopsequence.pyc \
libcclwcclfileopsections.pyc \
wccl.pyc \
......@@ -353,6 +360,13 @@ libcclmatchrule.o:
$(CPP) -shared libcclmatchrule_wrap.o \
$(CCLBIN) $(ANTLRLIB) -o _libcclmatchrule.so
# MatchRuleSequence
libcclmatchrulesequence.o:
$(SWIG) $(SWIGOPTS_LANG) libcclmatchrulesequence.i
$(CPP) -c libcclmatchrulesequence_wrap.cxx -I$(PYTHONDIR) -I$(WCCLDIR) $(CPPFLAGS)
$(CPP) -shared libcclmatchrulesequence_wrap.o \
$(CCLBIN) $(ANTLRLIB) -o _libcclmatchrulesequence.so
# FunctionalOpSequence
libcclfunctionalopsequence.o:
$(SWIG) $(SWIGOPTS_LANG) libcclfunctionalopsequence.i
......@@ -366,6 +380,13 @@ libcclwcclfileopsections.o:
$(CPP) -c libcclwcclfileopsections_wrap.cxx -I$(PYTHONDIR) -I$(WCCLDIR) $(CPPFLAGS)
$(CPP) -shared libcclwcclfileopsections_wrap.o \
$(CCLBIN) $(ANTLRLIB) -o _libcclwcclfileopsections.so
# WcclFile
libcclwcclfile.o:
$(SWIG) $(SWIGOPTS_LANG) libcclwcclfile.i
$(CPP) -c libcclwcclfile_wrap.cxx -I$(PYTHONDIR) -I$(WCCLDIR) $(CPPFLAGS)
$(CPP) -shared libcclwcclfile_wrap.o \
$(CCLBIN) $(ANTLRLIB) -o _libcclwcclfile.so
# -----------------------------------------------------------------------------
# Wccl Library
......
#ifndef SWIG_LIBWCCL_MATCHRULESEQUENCE_I
#define SWIG_LIBWCCL_MATCHRULESEQUENCE_I
%module libcclmatchrulesequence
%{
#include <libwccl/ops/matchrulesequence.h>
%}
%include "libcclmatchrule.i"
%include "libcclexpression.i"
%include "libcorpus/libcorpusannotatedsentence.i"
%include "std_string.i"
%include "std_vector.i"
%include "boost_shared_ptr.i"
%template(MatchRuleVector) std::vector<MatchRule>;
namespace Wccl {
class MatchRuleSequence : public std::vector<MatchRule>, public Expression {
public:
MatchRuleSequence();
MatchRuleSequence(const std::vector<MatchRule>& rules);
/* --------------------------------------------------------------------- */
%rename(OpFunMatchRuleSequence) operator()(const boost::shared_ptr<Corpus2::AnnotatedSentence>& sentence);
void operator()(const boost::shared_ptr<Corpus2::AnnotatedSentence>& sentence);
/* --------------------------------------------------------------------- */
void apply_all(const boost::shared_ptr<Corpus2::AnnotatedSentence>& sentence);
/* --------------------------------------------------------------------- */
std::string to_string(const Corpus2::Tagset& tagset) const;
};
}
using namespace boost;
using namespace Wccl;
using namespace std;
#endif /* SWIG_LIBWCCL_MATCHRULESEQUENCE_I */
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment