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
d68f1e0b
Commit
d68f1e0b
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
(swig) Added wrapper for Wccl::TagRule
parent
bd77e608
Branches
Branches containing commit
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/libccltagrule.i
+74
-0
74 additions, 0 deletions
swig/libccltagrule.i
with
88 additions
and
1 deletion
swig/Makefile
+
14
−
1
View file @
d68f1e0b
...
@@ -33,7 +33,8 @@ CBIN=libcclvalue.o \
...
@@ -33,7 +33,8 @@ CBIN=libcclvalue.o \
libcclsentencecontext.o
\
libcclsentencecontext.o
\
libcclparser.o
\
libcclparser.o
\
libcclactionexeccontext.o
\
libcclactionexeccontext.o
\
libccltagaction.o
libccltagaction.o
\
libccltagrule.o
CBINOUT
=
_libcclvalue.so
\
CBINOUT
=
_libcclvalue.so
\
_libcclstrset.so
\
_libcclstrset.so
\
...
@@ -54,6 +55,7 @@ CBINOUT=_libcclvalue.so \
...
@@ -54,6 +55,7 @@ CBINOUT=_libcclvalue.so \
_libcclparser.so
\
_libcclparser.so
\
_libcclactionexeccontext.so
\
_libcclactionexeccontext.so
\
_libccltagaction.so
\
_libccltagaction.so
\
_libccltagrule.so
\
_boost_shared_ptr.so
_boost_shared_ptr.so
CWRAP
=
libcclvalue_wrap.cxx
\
CWRAP
=
libcclvalue_wrap.cxx
\
...
@@ -76,6 +78,7 @@ CWRAP=libcclvalue_wrap.cxx \
...
@@ -76,6 +78,7 @@ CWRAP=libcclvalue_wrap.cxx \
libcclparser_wrap.cxx
\
libcclparser_wrap.cxx
\
libcclactionexeccontext_wrap.cxx
\
libcclactionexeccontext_wrap.cxx
\
libccltagaction_wrap.cxx
\
libccltagaction_wrap.cxx
\
libccltagrule_wrap.cxx
\
boost_shared_ptr_wrap.cxx
boost_shared_ptr_wrap.cxx
CWRAPBIN
=
libcclvalue_wrap.o
\
CWRAPBIN
=
libcclvalue_wrap.o
\
...
@@ -97,6 +100,7 @@ CWRAPBIN=libcclvalue_wrap.o \
...
@@ -97,6 +100,7 @@ CWRAPBIN=libcclvalue_wrap.o \
libcclparser_wrap.o
\
libcclparser_wrap.o
\
libcclactionexeccontext_wrap.o
\
libcclactionexeccontext_wrap.o
\
libccltagaction_wrap.o
\
libccltagaction_wrap.o
\
libccltagrule_wrap.o
\
boost_shared_ptr_wrap.o
boost_shared_ptr_wrap.o
PYMODULES
=
libcclvalue.py
\
PYMODULES
=
libcclvalue.py
\
...
@@ -118,6 +122,7 @@ PYMODULES=libcclvalue.py \
...
@@ -118,6 +122,7 @@ PYMODULES=libcclvalue.py \
libcclparser.py
\
libcclparser.py
\
libcclactionexeccontext.py
\
libcclactionexeccontext.py
\
libccltagaction.py
\
libccltagaction.py
\
libccltagrule.py
\
boost_shared_ptr.py
boost_shared_ptr.py
PYCBIN
=
libcclvalue.pyc
\
PYCBIN
=
libcclvalue.pyc
\
...
@@ -139,6 +144,7 @@ PYCBIN=libcclvalue.pyc \
...
@@ -139,6 +144,7 @@ PYCBIN=libcclvalue.pyc \
libcclparser.pyc
\
libcclparser.pyc
\
libcclactionexeccontext.pyc
\
libcclactionexeccontext.pyc
\
libccltagaction.pyc
\
libccltagaction.pyc
\
libccltagrule.pyc
\
boost_shared_ptr.pyc
boost_shared_ptr.pyc
all
:
boost_shared_ptr.o $(CBIN)
all
:
boost_shared_ptr.o $(CBIN)
...
@@ -297,6 +303,13 @@ libccltagaction.o:
...
@@ -297,6 +303,13 @@ libccltagaction.o:
$(
CPP
)
-shared
libccltagaction_wrap.o
\
$(
CPP
)
-shared
libccltagaction_wrap.o
\
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libccltagaction.so
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libccltagaction.so
# TagRule
libccltagrule.o
:
$(
SWIG
)
$(
SWIGOPTS_LANG
)
libccltagrule.i
$(
CPP
)
-c
libccltagrule_wrap.cxx
-I
$(
PYTHONDIR
)
-I
$(
WCCLDIR
)
$(
CPPFLAGS
)
$(
CPP
)
-shared
libccltagrule_wrap.o
\
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libccltagrule.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/libccltagrule.i
0 → 100644
+
74
−
0
View file @
d68f1e0b
#
ifndef
SWIG_LIBWCCL_TAGRULE_I
#
define
SWIG_LIBWCCL_TAGRULE_I
%
module
libccltagrule
%
{
#include <libwccl/ops/tagrule.h>
%}
%
include
"
libcclbool.i
"
%
include
"
libccltagaction.i
"
%
include
"
libcclvariables.i
"
%
include
"
libcclsentencecontext.i
"
%
include
"
libcclparsedexpression.i
"
%
include
"
libcorpus/libcorpustagset.i
"
%
include
"
std_string.i
"
%
include
"
boost_shared_ptr.i
"
%
template
(
TagRulePtr
)
boost
::
shared_ptr
<
Wccl
::
TagRule
>
;
namespace
Wccl
{
class TagRule : public ParsedExpression {
public:
/*
TagRule(
const std::string& name,
const Variables& variables,
const boost::shared_ptr<const std::vector<boost::shared_ptr<TagAction> > >& actions,
const boost::shared_ptr<const Function<Bool> >& condition = TrueCondition()
);
*/
TagRule();
TagRule(const TagRule& other, bool clean = false);
/* --------------------------------------------------------------------- */
%rename(OpFunTagRule) operator()(const SentenceContext& sentence_context);
Bool operator()(SentenceContext& sentence_context);
/* --------------------------------------------------------------------- */
Bool execute(SentenceContext& sentence_context);
std::string name() const;
/* --------------------------------------------------------------------- */
TagRule clone() const;
TagRule clone_clean() const;
/* --------------------------------------------------------------------- */
boost::shared_ptr<TagRule> clone_ptr() const;
boost::shared_ptr<TagRule> clone_clean_ptr() const;
/* --------------------------------------------------------------------- */
%rename(OperatorEqTagRule) *::operator=(const TagRule& other);
/* --------------------------------------------------------------------- */
std::string to_string(const Corpus2::Tagset& tagset) const;
/* --------------------------------------------------------------------- */
protected:
TagRule* clone_internal() const;
private:
// static const boost::shared_ptr<const Function<Bool> > TrueCondition();
};
}
using
namespace
boost
;
using
namespace
Wccl
;
using
namespace
std
;
#
endif
/* SWIG_LIBWCCL_TAGRULE_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