Пример #1
0
def sim_script_closest(l1):
    """

    :param l1: language name, wikiname?
    :return: langdists, closest
    """
    langdists = wikidatastats.loaddump()
    closest = wikidatastats.getclosest(l1, langdists)
    return langdists, closest
Пример #2
0
def sim_script(l1, l2):
    """
    l1 and l2 are Wikipedia language names (as found in wikidata.<lang> files)

    :param l1:
    :param l2:
    :return:
    """
    langdists = wikidatastats.loaddump()
    return wikidatastats.compare(l1, l2, langdists)