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
455f2a2c
There was an error fetching the commit references. Please try again later.
Commit
455f2a2c
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
fixed next_document in Cropus
parent
cd5e51ab
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libcorpus2_whole/corpus.cpp
+1
-1
1 addition, 1 deletion
libcorpus2_whole/corpus.cpp
libcorpus2_whole/corpus.h
+12
-2
12 additions, 2 deletions
libcorpus2_whole/corpus.h
with
13 additions
and
3 deletions
libcorpus2_whole/corpus.cpp
+
1
−
1
View file @
455f2a2c
...
@@ -21,7 +21,7 @@ namespace whole{
...
@@ -21,7 +21,7 @@ namespace whole{
Corpus
::
Corpus
(
const
std
::
string
name
)
:
name_
(
name
),
documents_
()
Corpus
::
Corpus
(
const
std
::
string
name
)
:
name_
(
name
),
documents_
()
{
{
this
->
current_document_
=
documents_
.
begin
()
;
set_
=
false
;
}
}
}
// whole ns
}
// whole ns
...
...
This diff is collapsed.
Click to expand it.
libcorpus2_whole/corpus.h
+
12
−
2
View file @
455f2a2c
...
@@ -49,12 +49,22 @@ public:
...
@@ -49,12 +49,22 @@ public:
}
}
/// Next document in corpus
/// Next document in corpus
/// @todo I don't know if it'll be working... It should be tested!
boost
::
shared_ptr
<
Document
>
next_document
()
{
boost
::
shared_ptr
<
Document
>
next_document
()
{
return
*
(
current_document_
++
);
if
(
!
this
->
set_
)
{
this
->
set_
=
true
;
this
->
current_document_
=
documents_
.
begin
();
}
else
{
current_document_
++
;
}
return
*
current_document_
;
}
}
private
:
private
:
bool
set_
;
/// Corpus name
/// Corpus name
const
std
::
string
name_
;
const
std
::
string
name_
;
...
...
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