Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
06af9b59
There was an error fetching the commit references. Please try again later.
Commit
06af9b59
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
(swig) Added wrapper for Wccl::MatchRule
parent
98c79359
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swig/Makefile
+14
-1
14 additions, 1 deletion
swig/Makefile
swig/libcclmatchrule.i
+55
-0
55 additions, 0 deletions
swig/libcclmatchrule.i
with
69 additions
and
1 deletion
swig/Makefile
+
14
−
1
View file @
06af9b59
...
@@ -35,7 +35,8 @@ CBIN=libcclvalue.o \
...
@@ -35,7 +35,8 @@ CBIN=libcclvalue.o \
libcclactionexeccontext.o
\
libcclactionexeccontext.o
\
libccltagaction.o
\
libccltagaction.o
\
libccltagrule.o
\
libccltagrule.o
\
libccltagrulesequence.o
libccltagrulesequence.o
\
libcclmatchrule.o
CBINOUT
=
_libcclvalue.so
\
CBINOUT
=
_libcclvalue.so
\
_libcclstrset.so
\
_libcclstrset.so
\
...
@@ -58,6 +59,7 @@ CBINOUT=_libcclvalue.so \
...
@@ -58,6 +59,7 @@ CBINOUT=_libcclvalue.so \
_libccltagaction.so
\
_libccltagaction.so
\
_libccltagrule.so
\
_libccltagrule.so
\
_libccltagrulesequence.so
\
_libccltagrulesequence.so
\
_libcclmatchrule.so
\
_boost_shared_ptr.so
_boost_shared_ptr.so
CWRAP
=
libcclvalue_wrap.cxx
\
CWRAP
=
libcclvalue_wrap.cxx
\
...
@@ -82,6 +84,7 @@ CWRAP=libcclvalue_wrap.cxx \
...
@@ -82,6 +84,7 @@ CWRAP=libcclvalue_wrap.cxx \
libccltagaction_wrap.cxx
\
libccltagaction_wrap.cxx
\
libccltagrule_wrap.cxx
\
libccltagrule_wrap.cxx
\
libccltagrulesequence_wrap.cxx
\
libccltagrulesequence_wrap.cxx
\
libcclmatchrule_wrap.cxx
\
boost_shared_ptr_wrap.cxx
boost_shared_ptr_wrap.cxx
CWRAPBIN
=
libcclvalue_wrap.o
\
CWRAPBIN
=
libcclvalue_wrap.o
\
...
@@ -105,6 +108,7 @@ CWRAPBIN=libcclvalue_wrap.o \
...
@@ -105,6 +108,7 @@ CWRAPBIN=libcclvalue_wrap.o \
libccltagaction_wrap.o
\
libccltagaction_wrap.o
\
libccltagrule_wrap.o
\
libccltagrule_wrap.o
\
libccltagrulesequence_wrap.o
\
libccltagrulesequence_wrap.o
\
libcclmatchrule_wrap.o
\
boost_shared_ptr_wrap.o
boost_shared_ptr_wrap.o
PYMODULES
=
libcclvalue.py
\
PYMODULES
=
libcclvalue.py
\
...
@@ -128,6 +132,7 @@ PYMODULES=libcclvalue.py \
...
@@ -128,6 +132,7 @@ PYMODULES=libcclvalue.py \
libccltagaction.py
\
libccltagaction.py
\
libccltagrule.py
\
libccltagrule.py
\
libccltagrulesequence.py
\
libccltagrulesequence.py
\
libcclmatchrule.py
\
boost_shared_ptr.py
boost_shared_ptr.py
PYCBIN
=
libcclvalue.pyc
\
PYCBIN
=
libcclvalue.pyc
\
...
@@ -151,6 +156,7 @@ PYCBIN=libcclvalue.pyc \
...
@@ -151,6 +156,7 @@ PYCBIN=libcclvalue.pyc \
libccltagaction.pyc
\
libccltagaction.pyc
\
libccltagrule.pyc
\
libccltagrule.pyc
\
libccltagrulesequence.pyc
\
libccltagrulesequence.pyc
\
libcclmatchrule.pyc
\
boost_shared_ptr.pyc
boost_shared_ptr.pyc
all
:
boost_shared_ptr.o $(CBIN)
all
:
boost_shared_ptr.o $(CBIN)
...
@@ -323,6 +329,13 @@ libccltagrulesequence.o:
...
@@ -323,6 +329,13 @@ libccltagrulesequence.o:
$(
CPP
)
-shared
libccltagrulesequence_wrap.o
\
$(
CPP
)
-shared
libccltagrulesequence_wrap.o
\
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libccltagrulesequence.so
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libccltagrulesequence.so
# MatchRule
libcclmatchrule.o
:
$(
SWIG
)
$(
SWIGOPTS_LANG
)
libcclmatchrule.i
$(
CPP
)
-c
libcclmatchrule_wrap.cxx
-I
$(
PYTHONDIR
)
-I
$(
WCCLDIR
)
$(
CPPFLAGS
)
$(
CPP
)
-shared
libcclmatchrule_wrap.o
\
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libcclmatchrule.so
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
clean
:
clean
:
rm
-f
$(
CBIN
)
$(
CBINOUT
)
$(
CWRAP
)
$(
CWRAPBIN
)
$(
PYMODULES
)
$(
PYCBIN
)
rm
-f
$(
CBIN
)
$(
CBINOUT
)
$(
CWRAP
)
$(
CWRAPBIN
)
$(
PYMODULES
)
$(
PYCBIN
)
This diff is collapsed.
Click to expand it.
swig/libcclmatchrule.i
0 → 100644
+
55
−
0
View file @
06af9b59
#
ifndef
SWIG_LIBWCCL_MATCHRULE_I
#
define
SWIG_LIBWCCL_MATCHRULE_I
%
module
libcclmatchrule
%
{
#include <libwccl/ops/matchrule.h>
%}
%
include
"
libcclvariables.i
"
%
include
"
libcclparsedexpression.i
"
%
include
"
libcorpus/libcorpusannotatedsentence.i
"
%
include
"
std_string.i
"
%
include
"
boost_shared_ptr.i
"
namespace
Wccl
{
class MatchRule : public ParsedExpression {
public:
MatchRule(
const Variables& variables,
const boost::shared_ptr<ApplyOperator>& apply
);
MatchRule(const MatchRule& other, bool clean = false);
MatchRule();
/* --------------------------------------------------------------------- */
%rename(OpFunMatchRule) operator()(const boost::shared_ptr<Corpus2::AnnotatedSentence>& s);
void operator()(const boost::shared_ptr<Corpus2::AnnotatedSentence>& s);
void apply(const boost::shared_ptr<Corpus2::AnnotatedSentence>& s);
/* --------------------------------------------------------------------- */
MatchRule clone() const;
MatchRule clone_clean() const;
boost::shared_ptr<MatchRule> clone_ptr() const;
boost::shared_ptr<MatchRule> clone_clean_ptr() const;
/* --------------------------------------------------------------------- */
%rename(OpEqMatchRule) *::operator=(const MatchRule& other);
/* --------------------------------------------------------------------- */
std::string to_string(const Corpus2::Tagset& tagset) const;
};
}
using
namespace
std
;
using
namespace
Wccl
;
#
endif
/* SWIG_LIBWCCL_MATCHRULE_I */
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment