<commit_before>__author__ = 'pershik'

from . import _init_antonyms


def get_antonyms(word):
    if word in _init_antonyms.antonyms:
        return _init_antonyms.antonyms[word]
    else:
        return []<commit_msg>Added doctests to get_antonyms<commit_after># coding:utf8

__author__ = 'pershik'

try:
    from . import _init_antonyms
except SystemError:
    import _init_antonyms


def get_antonyms(word):

    """
    Get antonyms list for the given word

    >>> get_antonyms('свет')
    ['тьма', 'мрак', 'темнота', 'тень']
    >>> get_antonyms('диван')
    []

    :param word: russian word in the initial form
    :return: list of all its antonyms
    """
    if word in _init_antonyms.antonyms:
        return _init_antonyms.antonyms[word]
    else:
        return []
{'fraction_non_alphanumeric': 0.10167310167310167, 'fraction_numerical': 0.001287001287001287, 'mean_word_length': 3.2054054054054055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6177959', 'n_tokens_mistral': 288, 'n_tokens_neox': 286, 'n_words': 67}