Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mateusz Pawlik
ted-datasets
Commits
42c89843
Commit
42c89843
authored
Jun 04, 2018
by
Thomas Huetter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
statistics/statistics.py: fixed bug in counting
parent
6e165826
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
statistics/statistics.py
statistics/statistics.py
+1
-1
No files found.
statistics/statistics.py
View file @
42c89843
...
...
@@ -66,7 +66,7 @@ with open(args.inputfile) as f:
# for each tree in the inputfile
for
line
in
f
:
# remove all '}', split line by '{' and remove empty entries at the beginning and end
nodes
=
re
.
split
(
r
'[{]'
,
re
.
sub
(
'[\}]'
,
''
,
line
))[
1
:
-
1
]
nodes
=
re
.
split
(
r
'[{]'
,
re
.
sub
(
'[\}]'
,
''
,
line
.
rstrip
()
))[
1
:]
# get tree size
tree_size
=
len
(
nodes
)
# sum to compute average
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment