テキスト分類のレポートライブラリについて

よくわからないが、テキストデータの分類のしやすさについてレポートを出してくれる。

github.com

gensim.models.KeyedVectors.load_word2vec_forma は、crawl-300d-2M.vec (fasttext) のEmbeded を ロードしてくれる。

glove = '../../glove/glove.840B.300d.txt'

def load_embed(file):
    def get_coefs(word,*arr): 
        return word, np.asarray(arr, dtype='float32')
    if file == '../../glove/crawl-300d-2M.vec':
        embeddings_index = gensim.models.KeyedVectors.load_word2vec_format(crawl)
    else:
        embeddings_index = dict(get_coefs(*o.split(" ")) for o in open(file, encoding='latin'))
    return embeddings_index

print("Extracting GloVe embedding")
embed_glove = load_embed(glove)

github.com