Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
8ef00260
Commit
8ef00260
authored
Apr 16, 2011
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
extract a function in wcclrun
parent
ece779e3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
wcclrun/main.cpp
+6
-0
6 additions, 0 deletions
wcclrun/main.cpp
with
6 additions
and
0 deletions
wcclrun/main.cpp
+
6
−
0
View file @
8ef00260
...
@@ -58,6 +58,8 @@ public:
...
@@ -58,6 +58,8 @@ public:
void
do_sentence
(
const
boost
::
shared_ptr
<
Corpus2
::
Sentence
>&
sentence
);
void
do_sentence
(
const
boost
::
shared_ptr
<
Corpus2
::
Sentence
>&
sentence
);
void
do_stream
(
std
::
istream
&
is
,
bool
first
);
void
do_stream
(
std
::
istream
&
is
,
bool
first
);
void
output_tabular
(
const
std
::
vector
<
std
::
vector
<
UnicodeString
>
>
outputs
);
private
:
private
:
const
Corpus2
::
Tagset
&
tagset_
;
const
Corpus2
::
Tagset
&
tagset_
;
Wccl
::
Parser
parser_
;
Wccl
::
Parser
parser_
;
...
@@ -184,7 +186,11 @@ void Runner::do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence)
...
@@ -184,7 +186,11 @@ void Runner::do_sentence(const boost::shared_ptr<Corpus2::Sentence>& sentence)
}
}
}
}
}
}
output_tabular
(
outputs
);
}
void
Runner
::
output_tabular
(
const
std
::
vector
<
std
::
vector
<
UnicodeString
>
>
outputs
)
{
std
::
vector
<
int
>
lengths
(
outputs
[
0
].
size
());
std
::
vector
<
int
>
lengths
(
outputs
[
0
].
size
());
foreach
(
const
std
::
vector
<
UnicodeString
>&
line
,
outputs
)
{
foreach
(
const
std
::
vector
<
UnicodeString
>&
line
,
outputs
)
{
for
(
size_t
i
=
0
;
i
<
line
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
line
.
size
();
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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