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:
authorSergey Magidovich <mgsergio@mapswithme.com>2016-07-12 16:21:46 +0300
committerSergey Magidovich <mgsergio@mapswithme.com>2016-07-14 11:38:36 +0300
commit61babee342ffe9da76e920aba8c61294607ab2f1 (patch)
treeae0ad875c507491659b24eabf6f8e9abefb8c5bb /tools
parent88d5775c230e5ac2caa06ad2266b893b300a2211 (diff)
Code review.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/python/booking_hotels_quality.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/python/booking_hotels_quality.py b/tools/python/booking_hotels_quality.py
index 914e4c797f..cd82adfd2d 100755
--- a/tools/python/booking_hotels_quality.py
+++ b/tools/python/booking_hotels_quality.py
@@ -14,6 +14,7 @@ import os
import pickle
import time
import urllib2
+import re
# init logging
logging.basicConfig(level=logging.DEBUG, format='[%(asctime)s] %(levelname)s: %(message)s')
@@ -21,7 +22,7 @@ logging.basicConfig(level=logging.DEBUG, format='[%(asctime)s] %(levelname)s: %(
def load_binary_list(path):
"""
- Loads referance binary classifier output.
+ Loads reference binary classifier output.
"""
bits = []
with open(path, 'r') as fd:
@@ -41,7 +42,7 @@ def load_score_list(path):
for line in fd:
if (not line.strip()) or line[0] == '#':
continue
- scores.append(float(line[line.rfind(':')+2:]))
+ scores.append(float(re.search(r'result score: (\d*\.\d+)', line).group(1)))
return scores