conf.py 600 Bytes
import os

from gensim.models.word2vec import Word2Vec

from corneferencer.utils import initialize_neural_model


CONTEXT = 5
THRESHOLD = 0.5
RANDOM_WORD_VECTORS = True
W2V_SIZE = 50
W2V_MODEL_NAME = 'w2v_allwiki_nkjpfull_50.model'

NUMBER_OF_FEATURES = 1126
NEURAL_MODEL_NAME = 'weights_2017_05_10.h5'


# do not change that
W2V_MODEL_PATH = os.path.join(os.path.dirname(__file__), 'models', W2V_MODEL_NAME)
W2V_MODEL = Word2Vec.load(W2V_MODEL_PATH)

NEURAL_MODEL_PATH = os.path.join(os.path.dirname(__file__), 'models', NEURAL_MODEL_NAME)
NEURAL_MODEL = initialize_neural_model(NUMBER_OF_FEATURES)