Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
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
WCCL
Commits
b6311d2e
Commit
b6311d2e
authored
13 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
fix wccl-run --aggregate=1 again
parent
4df4571e
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wccl-apps/wccl-run.cpp
+15
-10
15 additions, 10 deletions
wccl-apps/wccl-run.cpp
with
15 additions
and
10 deletions
wccl-apps/wccl-run.cpp
+
15
−
10
View file @
b6311d2e
...
...
@@ -275,22 +275,23 @@ void Runner::output_tabular(const std::vector<std::vector<UnicodeString> >& outp
{
std
::
vector
<
int
>
lengths
(
outputs
[
0
].
size
());
foreach
(
const
std
::
vector
<
UnicodeString
>&
line
,
outputs
)
{
if
(
line
.
empty
())
continue
;
for
(
size_t
i
=
0
;
i
<
line
.
size
();
++
i
)
{
lengths
[
i
]
=
std
::
max
(
lengths
[
i
],
line
[
i
].
length
());
}
}
foreach
(
const
std
::
vector
<
UnicodeString
>&
line
,
outputs
)
{
for
(
size_t
i
=
0
;
i
<
line
.
size
()
-
1
;
++
i
)
{
UnicodeString
u
=
line
[
i
];
if
(
tabs
)
{
std
::
cout
<<
PwrNlp
::
to_utf8
(
line
[
i
])
<<
"
\t
"
;
}
else
{
u
.
padTrailing
(
lengths
[
i
]
+
1
);
std
::
cout
<<
PwrNlp
::
to_utf8
(
u
);
}
}
if
(
!
line
.
empty
())
{
for
(
size_t
i
=
0
;
i
<
line
.
size
()
-
1
;
++
i
)
{
UnicodeString
u
=
line
[
i
];
if
(
tabs
)
{
std
::
cout
<<
PwrNlp
::
to_utf8
(
line
[
i
])
<<
"
\t
"
;
}
else
{
u
.
padTrailing
(
lengths
[
i
]
+
1
);
std
::
cout
<<
PwrNlp
::
to_utf8
(
u
);
}
}
std
::
cout
<<
PwrNlp
::
to_utf8
(
line
.
back
());
}
std
::
cout
<<
"
\n
"
;
...
...
@@ -317,7 +318,11 @@ void Runner::run(boost::shared_ptr<Corpus2::TokenReader> reader, bool first)
timer
.
check_slice
();
}
if
(
!
filter_op_
)
{
std
::
cout
<<
"
\n
"
;
if
(
!
aggregate_output_
)
{
std
::
cout
<<
"
\n
"
;
}
else
{
outputs
.
resize
(
outputs
.
size
()
+
1
);
}
}
if
(
first
)
break
;
}
...
...
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