# Path: vsmlib/benchmarks/analogy/analogy.py
# def profile_trivial(a):
# def check_options(options):
# def jsonify(data):
# def normed(v):
# def get_most_similar_fast(v):
# def get_most_collinear_fast(a, ap, b):
# def is_at_least_one_word_present(words):
# def is_pair_missing(pairs):
# def gen_vec_single(pairs):
# def gen_vec_single_nonoise(pairs):
# def get_crowndedness(vector):
#     def __init__(self, options):
#     def __call__(self, pairs_train, pairs_test):
#     def do_on_two_pairs(self, p_train, p_test):
#     def collect_stats(self, result, vec_a, vec_a_prime, vec_b, vec_b_prime, vec_b_prime_predicted):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vectors):
#     def __call__(self, pairs_train, pairs_test):
#     def do_on_two_pairs(self, pair_test):
#     def __init__(self, options):
#     def __call__(self, p_train, p_test):
# def create_list_test_right(pairs):
# def get_distance_closest_words(center, cnt_words=1):
# def get_rank(source, center):
# def process_prediction(p_test_one, scores, score_reg, score_sim, p_train=[], options=None):
#     def __init__(self, options):
#     def __call__(self, p_train, p_test):
# def do_test_on_pair_regr_filtered(p_train, p_test, file_out):
# def register_test_func(options):
# def run_category(pairs, name_dataset, name_category, options):
# def get_pairs(fname):
# def run(embeddings, options):
# def group_results(results):
# def subsample_dims(newdim):
# def main(args=None):
#     X = np.array([m.get_row(i) for i in x])
#     Y = np.hstack([np.ones(len(a_prime)), np.zeros(len(x) - len(a_prime))])
#     X = np.array([m.get_row(i) for i in x])
#     Y = np.hstack([np.ones(len(a_prime)), np.zeros(len(x) - len(a_prime))])
# class PairWise:
# class LinearOffset(PairWise):
# class PairDistance(PairWise):
# class ThreeCosMul(PairWise):
# class ThreeCosMul2(PairWise):
# class SimilarToAny(PairWise):
# class SimilarToB():
# class TheeCosAvg():
# class LRCos:
# 
# Path: vsmlib/benchmarks/similarity/similarity.py
# def read_test_set(path):
# def evaluate(m, data):
# def run(embeddings, options):
# def main(args=None):
# 
# Path: vsmlib/benchmarks/sequence_labeling/sequence_labeling.py
# def contextwin(l, win):
# def getInputOutput(lex, y, win, idx2word):
# def getX(input, m):
# def parse_args():
# def run(embeddings, options):
# def main(args=None):


import argparse
import os
import sys
import json
import vsmlib.config
import copy
from vsmlib.benchmarks.analogy import analogy
from vsmlib.benchmarks.similarity import similarity
from vsmlib.benchmarks.sequence_labeling import sequence_labeling
from multiprocessing import Pool
from multiprocessing import Process

    print(args.path_vector)
    if test_word_similarity is True:
        args.path_config = os.path.join(args.path_root_config, c.Evaluate.word_similarity.config_folder_name,
                                        'config.yaml')
        args.path_dataset = os.path.join(args.path_root_dataset, c.Evaluate.word_similarity.dataset_folder_name)
        tmp_results = similarity.main(args)
        write_results(args, tmp_results)

    if test_word_analogy_google is True:
        args.path_config = os.path.join(args.path_root_config, c.Evaluate.word_analogy_google.config_folder_name,
                                        'config_analogy.yaml')
        args.path_dataset = os.path.join(args.path_root_dataset, c.Evaluate.word_analogy_google.dataset_folder_name)
        tmp_results = analogy.main(args)
        print(tmp_results)
        write_results(args, tmp_results)

    if test_word_analogy_bats is True:
        args.path_config = os.path.join(args.path_root_config, c.Evaluate.word_analogy_bats.config_folder_name,
                                        'config_analogy.yaml')
        args.path_dataset = os.path.join(args.path_root_dataset, c.Evaluate.word_analogy_bats.dataset_folder_name)
        tmp_results = analogy.main(args)
        print(tmp_results)
        write_results(args, tmp_results)

    if test_sequence_labeling is True:
        tmp_results = []
        for subtask in c.Evaluate.sequence_labeling.subtasks:
            args.path_config = os.path.join(args.path_root_config, c.Evaluate.sequence_labeling.config_folder_name,
                                            'config.yaml')

# Path: vsmlib/benchmarks/analogy/analogy.py
# def profile_trivial(a):
# def check_options(options):
# def jsonify(data):
# def normed(v):
# def get_most_similar_fast(v):
# def get_most_collinear_fast(a, ap, b):
# def is_at_least_one_word_present(words):
# def is_pair_missing(pairs):
# def gen_vec_single(pairs):
# def gen_vec_single_nonoise(pairs):
# def get_crowndedness(vector):
#     def __init__(self, options):
#     def __call__(self, pairs_train, pairs_test):
#     def do_on_two_pairs(self, p_train, p_test):
#     def collect_stats(self, result, vec_a, vec_a_prime, vec_b, vec_b_prime, vec_b_prime_predicted):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vec_a, vec_a_prime, vec_b):
#     def compute_scores(self, vectors):
#     def __call__(self, pairs_train, pairs_test):
#     def do_on_two_pairs(self, pair_test):
#     def __init__(self, options):
#     def __call__(self, p_train, p_test):
# def create_list_test_right(pairs):
# def get_distance_closest_words(center, cnt_words=1):
# def get_rank(source, center):
# def process_prediction(p_test_one, scores, score_reg, score_sim, p_train=[], options=None):
#     def __init__(self, options):
#     def __call__(self, p_train, p_test):
# def do_test_on_pair_regr_filtered(p_train, p_test, file_out):
# def register_test_func(options):
# def run_category(pairs, name_dataset, name_category, options):
# def get_pairs(fname):
# def run(embeddings, options):
# def group_results(results):
# def subsample_dims(newdim):
# def main(args=None):
#     X = np.array([m.get_row(i) for i in x])
#     Y = np.hstack([np.ones(len(a_prime)), np.zeros(len(x) - len(a_prime))])
#     X = np.array([m.get_row(i) for i in x])
#     Y = np.hstack([np.ones(len(a_prime)), np.zeros(len(x) - len(a_prime))])
# class PairWise:
# class LinearOffset(PairWise):
# class PairDistance(PairWise):
# class ThreeCosMul(PairWise):
# class ThreeCosMul2(PairWise):
# class SimilarToAny(PairWise):
# class SimilarToB():
# class TheeCosAvg():
# class LRCos:
# 
# Path: vsmlib/benchmarks/similarity/similarity.py
# def read_test_set(path):
# def evaluate(m, data):
# def run(embeddings, options):
# def main(args=None):
# 
# Path: vsmlib/benchmarks/sequence_labeling/sequence_labeling.py
# def contextwin(l, win):
# def getInputOutput(lex, y, win, idx2word):
# def getX(input, m):
# def parse_args():
# def run(embeddings, options):
# def main(args=None):


# Path: vsmlib/benchmarks/evaluate_all.py
import argparse
import os
import sys
import json
import vsmlib.config
import copy
from vsmlib.benchmarks.analogy import analogy
from vsmlib.benchmarks.similarity import similarity
from vsmlib.benchmarks.sequence_labeling import sequence_labeling
from multiprocessing import Pool
from multiprocessing import Process


    print(args.path_vector)
    if test_word_similarity is True:
        args.path_config = os.path.join(args.path_root_config, c.Evaluate.word_similarity.config_folder_name,
                                        'config.yaml')
        args.path_dataset = os.path.join(args.path_root_dataset, c.Evaluate.word_similarity.dataset_folder_name)
        tmp_results = similarity.main(args)
        write_results(args, tmp_results)

    if test_word_analogy_google is True:
        args.path_config = os.path.join(args.path_root_config, c.Evaluate.word_analogy_google.config_folder_name,
                                        'config_analogy.yaml')
        args.path_dataset = os.path.join(args.path_root_dataset, c.Evaluate.word_analogy_google.dataset_folder_name)
        tmp_results = analogy.main(args)
        print(tmp_results)
        write_results(args, tmp_results)

    if test_word_analogy_bats is True:
        args.path_config = os.path.join(args.path_root_config, c.Evaluate.word_analogy_bats.config_folder_name,
                                        'config_analogy.yaml')
        args.path_dataset = os.path.join(args.path_root_dataset, c.Evaluate.word_analogy_bats.dataset_folder_name)
        tmp_results = analogy.main(args)
        print(tmp_results)
        write_results(args, tmp_results)

    if test_sequence_labeling is True:
        tmp_results = []
        for subtask in c.Evaluate.sequence_labeling.subtasks:
            args.path_config = os.path.join(args.path_root_config, c.Evaluate.sequence_labeling.config_folder_name,
                                            'config.yaml')

            args.path_dataset = os.path.join(args.path_root_dataset, c.Evaluate.sequence_labeling.dataset_folder_name,