// subtract the mean of each language, reducing clumping by language and
// improving multilingual alignment.
rows_by_language = defaultdict(list)
for i, label in enumerate(row_labels):
lang = get_language(label)
rows_by_language[lang].append(i)
all_languages = sorted(rows_by_language)
row_groups = [rows_by_language[lang] for lang in all_languages]
// Subtract the mean so that vectors don"t just clump around common
After Change
// Subtract the mean so that vectors don"t just clump around common
// hypernyms
orig_vecs -= orig_vecs.mean(0)
// Delete the frame we built, we won"t need its indices again until the end
del retroframe