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
645f3420
There was an error fetching the commit references. Please try again later.
Commit
645f3420
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
Relation wrapper
parent
316f37d6
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swig/corpus2.i
+1
-0
1 addition, 0 deletions
swig/corpus2.i
swig/relation.i
+57
-0
57 additions, 0 deletions
swig/relation.i
with
58 additions
and
0 deletions
swig/corpus2.i
+
1
−
0
View file @
645f3420
...
...
@@ -12,6 +12,7 @@
%
include
"
chunk.i
"
%
include
"
iob.i
"
%
include
"
lexeme.i
"
%
include
"
relation.i
"
%
include
"
sentence.i
"
%
include
"
tag.i
"
%
include
"
tagset.i
"
...
...
This diff is collapsed.
Click to expand it.
swig/relation.i
0 → 100644
+
57
−
0
View file @
645f3420
#
ifndef
SWIG_LIBCORPUS2_RELATION_I
#
define
SWIG_LIBCORPUS2_RELATION_I
%
module
libcorpusrelation
%
{
#include <libcorpus2/relation.h>
%}
%
include
"
std_defs.i
"
%
include
"
std_string.i
"
%
include
"
boost_shared_ptr.i
"
// %feature("notabstract") Corpus2::TokenMetaData;
%
template
(
DirectionPointPtr
)
boost
::
shared_ptr
<
Corpus2
::
DirectionPoint
>
;
%
template
(
ConstDirectionPointPtr
)
boost
::
shared_ptr
<
const
Corpus2
::
DirectionPoint
>
;
%
template
(
RelationPtr
)
boost
::
shared_ptr
<
Corpus2
::
Relation
>
;
%
template
(
ConstRelationPtr
)
boost
::
shared_ptr
<
const
Corpus2
::
Relation
>
;
namespace
Corpus2
{
class DirectionPoint {
public:
DirectionPoint(const std::string, const std::string, const int);
const std::string sentence_id() const;
const std::string channel_name() const;
int annotation_number() const;
};
class Relation {
public:
/*
Relation(const std::string& name,
const boost::shared_ptr<const DirectionPoint> from,
const boost::shared_ptr<const DirectionPoint> to);
*/
Relation(const std::string& name,
const DirectionPoint& from,
const DirectionPoint& to);
~Relation();
/* It must be renamed because "from" is python keyword */
%rename(rel_from) from() const;
const boost::shared_ptr<const DirectionPoint>& from() const;
/* Also "to" for consistency should be renamed to rel_to */
%rename(rel_to) to() const;
const boost::shared_ptr<const DirectionPoint>& to() const;
/* ...and "name" to rel_name */
%rename(rel_name) name() const;
const std::string name() const;
};
}
using
namespace
std
;
using
namespace
Corpus2
;
#
endif
/* SWIG_LIBCORPUS2_RELATION_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