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
2855f14f
Commit
2855f14f
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
Corpus2::Chunk wrapper
parent
485a1a43
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/libcorpuschunk.i
+50
-0
50 additions, 0 deletions
swig/libcorpuschunk.i
with
69 additions
and
6 deletions
swig/Makefile
+
19
−
6
View file @
2855f14f
...
...
@@ -17,7 +17,8 @@ CBIN=libcorpustag.o \
libcorpustagset.o
\
libcorpustagsetmanager.o
\
libcorpuslexeme.o
\
libcorpussentence.o
libcorpussentence.o
\
libcorpuschunk.o
CBINOUT
=
_boost_shared_ptr.so
\
_libcorpustag.so
\
...
...
@@ -25,7 +26,8 @@ CBINOUT=_boost_shared_ptr.so \
_libcorpustagsetmanager.so
\
_libcorpuslexeme.so
\
_libcorpustoken.so
\
_libcorpussentence.so
_libcorpussentence.so
\
_libcorpuschunk.so
CWRAP
=
boost_shared_ptr_wrap.cxx
\
libcorpustag_wrap.cxx
\
...
...
@@ -33,7 +35,8 @@ CWRAP=boost_shared_ptr_wrap.cxx \
libcorpustagsetmanager_wrap.cxx
\
libcorpuslexeme_wrap.cxx
\
libcorpustoken_wrap.cxx
\
libcorpussentence_wrap.cxx
libcorpussentence_wrap.cxx
\
libcorpuschunk_wrap.cxx
CWRAPBIN
=
boost_shared_ptr_wrap.o
\
libcorpustag_wrap.o
\
...
...
@@ -41,7 +44,8 @@ CWRAPBIN=boost_shared_ptr_wrap.o \
libcorpustagsetmanager_wrap.o
\
libcorpuslexeme_wrap.o
\
libcorpustoken_wrap.o
\
libcorpussentence_wrap.o
libcorpussentence_wrap.o
\
libcorpuschunk_wrap.o
PYMODULES
=
boost_shared_ptr.py
\
libcorpustag.py
\
...
...
@@ -49,7 +53,8 @@ PYMODULES=boost_shared_ptr.py \
libcorpustagsetmanager.py
\
libcorpuslexeme.py
\
libcorpustoken.py
\
libcorpussentence.py
libcorpussentence.py
\
libcorpuschunk.py
PYCBIN
=
boost_shared_ptr.pyc
\
libcorpustag.pyc
\
...
...
@@ -57,7 +62,8 @@ PYCBIN=boost_shared_ptr.pyc \
libcorpustagsetmanager.pyc
\
libcorpuslexeme.pyc
\
libcorpustoken.pyc
\
libcorpussentence.pyc
libcorpussentence.pyc
\
libcorpuschunk.pyc
# -----------------------------------------------------------------------------
all
:
boost_shared_ptr.o $(CBIN)
...
...
@@ -105,6 +111,13 @@ libcorpuslexeme.o:
$(
CPP
)
-shared
libcorpuslexeme_wrap.o
\
$(
PWRUTILBIN
)
$(
CORPUS2BIN
)
-o
_libcorpuslexeme.so
# Chunk
libcorpuschunk.o
:
$(
SWIG
)
$(
SWIGOPTS_LANG
)
libcorpuschunk.i
$(
CPP
)
-c
libcorpuschunk_wrap.cxx
-I
$(
PYTHONDIR
)
$(
CPPFLAGS
)
$(
CPP
)
-shared
libcorpuschunk_wrap.o
\
$(
PWRUTILBIN
)
$(
CORPUS2BIN
)
-o
_libcorpuschunk.so
# Sentence
libcorpussentence.o
:
$(
SWIG
)
$(
SWIGOPTS_LANG
)
libcorpussentence.i
...
...
This diff is collapsed.
Click to expand it.
swig/libcorpuschunk.i
0 → 100644
+
50
−
0
View file @
2855f14f
#
ifndef
SWIG_LIBCORPUS2_CHUNK_I
#
define
SWIG_LIBCORPUS2_CHUNK_I
%
module
libcorpuschunk
%
{
#include <libcorpus2/chunk.h>
%}
%
include
"
std_set.i
"
%
include
"
std_map.i
"
%
include
"
std_pair.i
"
%
include
"
std_string.i
"
%
include
"
std_vector.i
"
%
include
"
boost_shared_ptr.i
"
%
include
"
libcorpussentence.i
"
%
template
(
attr_map_t
)
std
::
map
<
std
::
string
,
std
::
string
>
;
namespace
Corpus2
{
class Chunk {
public:
Chunk();
~Chunk();
/* --------------------------------------------------------------------- */
boost::shared_ptr<Chunk> clone_shared() const;
bool empty() const;
size_t size() const;
bool has_attribute(const std::string& name) const;
std::string get_attribute(const std::string& name) const;
void set_attribute(const std::string& name, const std::string& value);
std::vector< boost::shared_ptr<Sentence> >& sentences();
const std::vector< boost::shared_ptr<Sentence> >& sentences() const;
void append(const boost::shared_ptr<Sentence>& s);
typedef std::map<std::string, std::string> attr_map_t;
const attr_map_t& attributes() const;
};
}
using
namespace
std
;
using
namespace
Corpus2
;
#
endif
/* SWIG_LIBCORPUS2_CHUNK_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