(storage, indexname, word2nums, num2words)
return ix
Creates a Whoosh index in the given storage object containing
    synonyms taken from word2nums and num2words. Returns the Index
    object.
Creates a Whoosh index in the given storage object containing
    synonyms taken from word2nums and num2words. Returns the Index
    object.
Creates a Whoosh index in the given storage object containing synonyms taken from word2nums and num2words . Returns the Index object .
def make_index(storage, indexname, word2nums, num2words):
    """Creates a Whoosh index in the given storage object containing
    synonyms taken from word2nums and num2words. Returns the Index
    object.
    """

    schema = Schema(word=ID, syns=STORED)
    ix = storage.create_index(schema, indexname=indexname)
    w = ix.writer()
    for word in iterkeys(word2nums):
        syns = synonyms(word2nums, num2words, word)
        w.add_document(word=text_type(word), syns=syns)
    w.commit()
    return ix
def make_index ( storage , indexname , word2nums , num2words ) : schema = Schema ( word = ID , syns = STORED ) ix = storage . create_index ( schema , indexname = indexname ) w = ix . writer ( ) for word in iterkeys ( word2nums ) : syns = synonyms ( word2nums , num2words , word ) w . add_document ( word = text_type ( word ) , syns = syns ) w . commit ( ) return ix