Commit 9e680e58 authored by Grzegorz Kostkowski's avatar Grzegorz Kostkowski

Disable excessive debug logging

parent f3952f3b
......@@ -390,19 +390,19 @@ def run(
resources['vertex_id_weight_map'] = prepare_graph_vertex_weight_map(
doc_context, lod_url_vertex_id_map, cats_keyed_vectors)
# DEBUG PRINTS
if debug_output_writer:
debug_output_writer.write(
"APPLIED WEIGHTS FOR CATEGORIES NODES:\n")
sorted_v_id_weight = sorted(
resources['vertex_id_weight_map'].items(),
key=operator.itemgetter(1))
for v_id, w in sorted_v_id_weight:
cat = vertex_id_lod_url_map.get(v_id, '-')
if isinstance(cat, unicode):
cat = cat.encode("utf8")
cat = cat.replace('http://dbpedia.org/resource/Category:',
'') # just for shorter print
debug_output_writer.write("{}\t{}\n".format(cat.ljust(80), w))
# if debug_output_writer:
# debug_output_writer.write(
# "APPLIED WEIGHTS FOR CATEGORIES NODES:\n")
# sorted_v_id_weight = sorted(
# resources['vertex_id_weight_map'].items(),
# key=operator.itemgetter(1))
# for v_id, w in sorted_v_id_weight:
# cat = vertex_id_lod_url_map.get(v_id, '-')
# if isinstance(cat, unicode):
# cat = cat.encode("utf8")
# cat = cat.replace('http://dbpedia.org/resource/Category:',
# '') # just for shorter print
# debug_output_writer.write("{}\t{}\n".format(cat.ljust(80), w))
# doc_context, vertex_id_vector_map, cats_keyed_vectors)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment