Flairで自前のELMoモデルを読み込む方法[Flair]

    from flair.embeddings import ELMoEmbeddings
from flair.data import Sentence
sentence = Sentence(phrase)
# Preparating ELMo
options = './elmo_options.json'
weights = './elmo_weights.hdf5'
embedding = ELMoEmbeddings('custom', options_file = options, weight_file = weights)
embedding.embed(sentence)
Pocket