def _create_default_topic_similarities():
 topic_similarities_dict = {topic: {} for topic in RECOMMENDATION_CATEGORIES}
 data = DEFAULT_TOPIC_SIMILARITIES_STRING.splitlines()
 data = list(csv.reader(data))
 topics_list = data[0]
 topic_similarities_values = data[1:]
 for (row_ind, topic_1) in enumerate(topics_list):
  for (col_ind, topic_2) in enumerate(topics_list):
   topic_similarities_dict[topic_1][topic_2] = float(topic_similarities_values[row_ind][col_ind])
 return save_topic_similarities(topic_similarities_dict)

def _create_default_topic_similarities ( ) : topic_similarities_dict = { topic : { } for topic in RECOMMENDATION_CATEGORIES } data = DEFAULT_TOPIC_SIMILARITIES_STRING . splitlines ( ) data = list ( csv . reader ( data ) ) topics_list = data [ 0 ] topic_similarities_values = data [ 1 : ] for ( row_ind , topic_1 ) in enumerate ( topics_list ) : for ( col_ind , topic_2 ) in enumerate ( topics_list ) : topic_similarities_dict [ topic_1 ] [ topic_2 ] = float ( topic_similarities_values [ row_ind ] [ col_ind ] ) return save_topic_similarities ( topic_similarities_dict )
creates the default topic similarities .