def s_one_one(topics):
 s_one_one = []
 for top_words in topics:
  s_one_one_t = []
  for (w_prime_index, w_prime) in enumerate(top_words):
   for (w_star_index, w_star) in enumerate(top_words):
    if (w_prime_index == w_star_index):
     continue
    else:
     s_one_one_t.append((w_prime, w_star))
  s_one_one.append(s_one_one_t)
 return s_one_one

def s_one_one ( topics ) : s_one_one = [ ] for top_words in topics : s_one_one_t = [ ] for ( w_prime_index , w_prime ) in enumerate ( top_words ) : for ( w_star_index , w_star ) in enumerate ( top_words ) : if ( w_prime_index == w_star_index ) : continue else : s_one_one_t . append ( ( w_prime , w_star ) ) s_one_one . append ( s_one_one_t ) return s_one_one
this function performs s_one_one segmentation on a list of topics .