Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2019-04-01 15:57:50 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2019-04-01 15:57:50 +0300
commit03b2621e2c136577dadf9e289a2d0f997fc1facc (patch)
tree9809a2dbd5993449dfe005ab43f6a9fb97e255e3 /tools
parent8018d39f03312a12c8ff46f518b0f8cfc4676022 (diff)
Review fixes.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/python/openlr/quality.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/python/openlr/quality.py b/tools/python/openlr/quality.py
index 6b6bda34c1..ff9dcf9f5d 100755
--- a/tools/python/openlr/quality.py
+++ b/tools/python/openlr/quality.py
@@ -113,7 +113,8 @@ class Segment:
def __init__(self, segment_id, golden_route, matched_route, ignored):
if not golden_route and not ignored:
raise NoGoldenPathError(
- "segment {} does not have a golden route"
+ "segment {} does not have a corresponding golden route"
+ "and is not marked"
.format(segment_id)
)
self.segment_id = segment_id
@@ -156,7 +157,8 @@ def ignored_segments_number(tree, limit):
def print_ignored_segments_result(descr, tree, limit):
assessed_ignored_seg = []
- (assessed_ignored_seg_num, assessed_ignored_seg_but_matched) = ignored_segments_number(tree, limit)
+ (assessed_ignored_seg_num, assessed_ignored_seg_but_matched) =\
+ ignored_segments_number(tree, limit)
print()
print(descr)
print('{} matched segments from {} ignored segments.'.
@@ -183,7 +185,8 @@ def calculate(tree):
result = {}
for s in parse_segments(tree, args.limit):
try:
- # An ignored segment is estimated as 1 if matched_route is empty and as zero otherwise.
+ # An ignored segment is estimated as 1 if matched_route
+ # is empty and as zero otherwise.
if s.ignored:
result[s.segment_id] = 1.0 if len(s.matched_route) == 0 else 0.0
else: