from gensim.models import FastText


class FastTextModel:
    def __init__(self, pretrained_embeddings_path, binary=True):
        self.model = FastText.load_fasttext_format(pretrained_embeddings_path).wv

    def predict(self, target):
        return self.model.word_vec(target)

    def predict_and_word(self, target):
        return self.model.word_vec(target), target