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
26f56cee
Commit
26f56cee
authored
12 years ago
by
Adam Radziszewski
Browse files
Options
Downloads
Patches
Plain Diff
add add_channel to annot sent
parent
12ecc683
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libcorpus2/ann/annotatedsentence.h
+13
-0
13 additions, 0 deletions
libcorpus2/ann/annotatedsentence.h
swig/annotatedsentence.i
+1
-0
1 addition, 0 deletions
swig/annotatedsentence.i
with
14 additions
and
0 deletions
libcorpus2/ann/annotatedsentence.h
+
13
−
0
View file @
26f56cee
...
...
@@ -96,6 +96,19 @@ public:
return
i
->
second
;
}
/**
* Add a copy of the given annotation channel.
* If a channel of the given name already exists, will do nothing and return false.
* Otherwise, will add the channel and return true.
*/
bool
add_channel
(
const
std
::
string
&
name
,
const
AnnotationChannel
&
chan
)
{
if
(
has_channel
(
name
))
{
return
false
;
}
channels_
.
insert
(
std
::
make_pair
(
name
,
chan
));
return
true
;
}
const
chan_map_t
&
all_channels
()
const
{
return
channels_
;
}
...
...
This diff is collapsed.
Click to expand it.
swig/annotatedsentence.i
+
1
−
0
View file @
26f56cee
...
...
@@ -49,6 +49,7 @@ namespace Corpus2 {
AnnotationChannel& get_channel(const std::string& name);
const AnnotationChannel& get_channel(const std::string& name) const;
bool add_channel(const std::string& name, const AnnotationChannel& chan);
const chan_map_t& all_channels() const;
/* --------------------------------------------------------------------- */
...
...
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