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
8d0e3cf5
Commit
8d0e3cf5
authored
12 years ago
by
michal
Browse files
Options
Downloads
Patches
Plain Diff
fix wrap_sentence and wrap_sentence_clone in AnnotatedSentence - perserve id
parent
ba50c5fc
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
libcorpus2/ann/annotatedsentence.cpp
+2
-2
2 additions, 2 deletions
libcorpus2/ann/annotatedsentence.cpp
with
3 additions
and
3 deletions
CMakeLists.txt
+
1
−
1
View file @
8d0e3cf5
...
...
@@ -2,7 +2,7 @@ PROJECT(Corpus2Library)
set
(
corpus2_ver_major
"1"
)
set
(
corpus2_ver_minor
"2"
)
set
(
corpus2_ver_patch
"
2
"
)
set
(
corpus2_ver_patch
"
3
"
)
cmake_minimum_required
(
VERSION 2.8.0
)
...
...
This diff is collapsed.
Click to expand it.
libcorpus2/ann/annotatedsentence.cpp
+
2
−
2
View file @
8d0e3cf5
...
...
@@ -48,7 +48,7 @@ boost::shared_ptr<AnnotatedSentence> AnnotatedSentence::wrap_sentence(
boost
::
shared_ptr
<
AnnotatedSentence
>
a
;
a
=
boost
::
dynamic_pointer_cast
<
AnnotatedSentence
>
(
s
);
if
(
!
a
)
{
a
=
boost
::
make_shared
<
AnnotatedSentence
>
();
a
=
boost
::
make_shared
<
AnnotatedSentence
>
(
s
->
id
()
);
BOOST_FOREACH
(
Token
*
t
,
s
->
tokens
())
{
a
->
append
(
t
);
}
...
...
@@ -63,7 +63,7 @@ boost::shared_ptr<AnnotatedSentence> AnnotatedSentence::wrap_sentence_clone(
boost
::
shared_ptr
<
AnnotatedSentence
>
a
;
a
=
boost
::
dynamic_pointer_cast
<
AnnotatedSentence
>
(
s
);
if
(
!
a
)
{
a
=
boost
::
make_shared
<
AnnotatedSentence
>
();
a
=
boost
::
make_shared
<
AnnotatedSentence
>
(
s
->
id
()
);
BOOST_FOREACH
(
Token
*
t
,
s
->
tokens
())
{
a
->
append
(
t
->
clone
());
}
...
...
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