Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
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
corpus2
Commits
a3e846a8
Commit
a3e846a8
authored
14 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
Wrapper for Corpus2::AnnotatedSentence
parent
96a030ff
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swig/Makefile
+19
-6
19 additions, 6 deletions
swig/Makefile
swig/libcorpusannotatedsentence.i
+59
-0
59 additions, 0 deletions
swig/libcorpusannotatedsentence.i
with
78 additions
and
6 deletions
swig/Makefile
+
19
−
6
View file @
a3e846a8
...
@@ -23,7 +23,8 @@ CBIN=libcorpustag.o \
...
@@ -23,7 +23,8 @@ CBIN=libcorpustag.o \
libcorpustokenwriter.o
\
libcorpustokenwriter.o
\
libcorpustokenreader.o
\
libcorpustokenreader.o
\
libcorpusiob.o
\
libcorpusiob.o
\
libcorpusannotationchannel.o
libcorpusannotationchannel.o
\
libcorpusannotatedsentence.o
CBINOUT
=
_boost_shared_ptr.so
\
CBINOUT
=
_boost_shared_ptr.so
\
_libcorpustag.so
\
_libcorpustag.so
\
...
@@ -36,7 +37,8 @@ CBINOUT=_boost_shared_ptr.so \
...
@@ -36,7 +37,8 @@ CBINOUT=_boost_shared_ptr.so \
_libcorpustokenwriter.so
\
_libcorpustokenwriter.so
\
_libcorpustokenreader.so
\
_libcorpustokenreader.so
\
_libcorpusiob.so
\
_libcorpusiob.so
\
_libcorpusannotationchannel.so
_libcorpusannotationchannel.so
\
_libcorpusannotatedsentence.so
CWRAP
=
boost_shared_ptr_wrap.cxx
\
CWRAP
=
boost_shared_ptr_wrap.cxx
\
libcorpustag_wrap.cxx
\
libcorpustag_wrap.cxx
\
...
@@ -49,7 +51,8 @@ CWRAP=boost_shared_ptr_wrap.cxx \
...
@@ -49,7 +51,8 @@ CWRAP=boost_shared_ptr_wrap.cxx \
libcorpustokenwriter_wrap.cxx
\
libcorpustokenwriter_wrap.cxx
\
libcorpustokenreader_wrap.cxx
\
libcorpustokenreader_wrap.cxx
\
libcorpusiob_wrap.cxx
\
libcorpusiob_wrap.cxx
\
libcorpusannotationchannel_wrap.cxx
libcorpusannotationchannel_wrap.cxx
\
libcorpusannotatedsentence_wrap.cxx
CWRAPBIN
=
boost_shared_ptr_wrap.o
\
CWRAPBIN
=
boost_shared_ptr_wrap.o
\
libcorpustag_wrap.o
\
libcorpustag_wrap.o
\
...
@@ -62,7 +65,8 @@ CWRAPBIN=boost_shared_ptr_wrap.o \
...
@@ -62,7 +65,8 @@ CWRAPBIN=boost_shared_ptr_wrap.o \
libcorpustokenwriter_wrap.o
\
libcorpustokenwriter_wrap.o
\
libcorpustokenreader_wrap.o
\
libcorpustokenreader_wrap.o
\
libcorpusiob_wrap.o
\
libcorpusiob_wrap.o
\
libcorpusannotationchannel_wrap.o
libcorpusannotationchannel_wrap.o
\
libcorpusannotatedsentence_wrap.o
PYMODULES
=
boost_shared_ptr.py
\
PYMODULES
=
boost_shared_ptr.py
\
libcorpustag.py
\
libcorpustag.py
\
...
@@ -75,7 +79,8 @@ PYMODULES=boost_shared_ptr.py \
...
@@ -75,7 +79,8 @@ PYMODULES=boost_shared_ptr.py \
libcorpustokenwriter.py
\
libcorpustokenwriter.py
\
libcorpustokenreader.py
\
libcorpustokenreader.py
\
libcorpusiob.py
\
libcorpusiob.py
\
libcorpusannotationchannel.py
libcorpusannotationchannel.py
\
libcorpusannotatedsentence.py
PYCBIN
=
boost_shared_ptr.pyc
\
PYCBIN
=
boost_shared_ptr.pyc
\
libcorpustag.pyc
\
libcorpustag.pyc
\
...
@@ -88,7 +93,8 @@ PYCBIN=boost_shared_ptr.pyc \
...
@@ -88,7 +93,8 @@ PYCBIN=boost_shared_ptr.pyc \
libcorpustokenwriter.pyc
\
libcorpustokenwriter.pyc
\
libcorpustokenreader.pyc
\
libcorpustokenreader.pyc
\
libcorpusiob.pyc
\
libcorpusiob.pyc
\
libcorpusannotationchannel.pyc
libcorpusannotationchannel.pyc
\
libcorpusannotatedsentence.pyc
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
all
:
boost_shared_ptr.o $(CBIN)
all
:
boost_shared_ptr.o $(CBIN)
...
@@ -185,6 +191,13 @@ libcorpusannotationchannel.o:
...
@@ -185,6 +191,13 @@ libcorpusannotationchannel.o:
$(
CPP
)
-shared
libcorpusannotationchannel_wrap.o
\
$(
CPP
)
-shared
libcorpusannotationchannel_wrap.o
\
$(
PWRUTILBIN
)
$(
CORPUS2BIN
)
-o
_libcorpusannotationchannel.so
$(
PWRUTILBIN
)
$(
CORPUS2BIN
)
-o
_libcorpusannotationchannel.so
# AnotatedSentence
libcorpusannotatedsentence.o
:
$(
SWIG
)
$(
SWIGOPTS_LANG
)
libcorpusannotatedsentence.i
$(
CPP
)
-c
libcorpusannotatedsentence_wrap.cxx
-I
$(
PYTHONDIR
)
$(
CPPFLAGS
)
$(
CPP
)
-shared
libcorpusannotatedsentence_wrap.o
\
$(
PWRUTILBIN
)
$(
CORPUS2BIN
)
-o
_libcorpusannotatedsentence.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/libcorpusannotatedsentence.i
0 → 100644
+
59
−
0
View file @
a3e846a8
#
ifndef
SWIG_LIBCORPUS2_ANNOTATEDSENTENCE_I
#
define
SWIG_LIBCORPUS2_ANNOTATEDSENTENCE_I
%
module
libcorpusannotatedsentence
%
{
#include <libcorpus2/ann/annotatedsentence.h>
%}
%
include
"
libcorpustoken.i
"
%
include
"
libcorpussentence.i
"
%
include
"
libcorpusannotationchannel.i
"
%
include
"
boost_shared_ptr.i
"
%
include
"
std_map.i
"
%
include
"
std_string.i
"
%
feature
(
"
notabstract
"
)
Corpus2
::
AnnotatedSentence
;
%
template
(
chan_map_t
)
std
::
map
<
std
::
string
,
Corpus2
::
AnnotationChannel
>
;
%
template
(
SentencePtr
)
boost
::
shared_ptr
<
Corpus2
::
Sentence
>
;
%
template
(
AnnotatedSentencePtr
)
boost
::
shared_ptr
<
Corpus2
::
AnnotatedSentence
>
;
namespace
Corpus2
{
class AnnotatedSentence : public Corpus2::Sentence {
public:
typedef std::map<std::string, AnnotationChannel> chan_map_t;
/* --------------------------------------------------------------------- */
AnnotatedSentence();
~AnnotatedSentence();
/* --------------------------------------------------------------------- */
Sentence::Ptr clone_shared() const;
static boost::shared_ptr<AnnotatedSentence> wrap_sentence(
const boost::shared_ptr<Sentence>& s);
static boost::shared_ptr<AnnotatedSentence> wrap_sentence_clone(
const boost::shared_ptr<Sentence>& s);
/* --------------------------------------------------------------------- */
void create_channel(const std::string& name);
bool has_channel(const std::string& name) const;
AnnotationChannel& get_channel(const std::string& name);
const AnnotationChannel& get_channel(const std::string& name) const;
const chan_map_t& all_channels() const;
/* --------------------------------------------------------------------- */
void append(Token *t);
/* --------------------------------------------------------------------- */
std::string annotation_info() const;
};
}
using
namespace
std
;
using
namespace
Corpus2
;
#
endif
/* SWIG_LIBCORPUS2_ANNOTATEDSENTENCE_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