// If a fasttext pretrained embedding file is specified
if(fscanf(fd,"Fasttext : %s\n",b1)==1)
{
static_assert(std::is_same<float,fasttext::real>::value,"ERROR : fasttext::real is not float on this machine, it needs to be. Aborting.\n");
ftEmbeddings.reset(newfasttext::FastText);
ftEmbeddings->loadModel(b1);
ftFilename=b1;
if(ftEmbeddings->getDimension()!=dimension)
{
fprintf(stderr,"ERROR (%s) : tried to load fasttext embeddings of dimension %d into dict \'%s\' of dimension %d. Aborting.\n",ERRINFO,ftEmbeddings->getDimension(),name.c_str(),dimension);
exit(1);
}
ftVector.reset(newfasttext::Vector(dimension));
}
// If policy is FromZero, we don't need to read the current entries
// If policy is FromZero, we don't need to read the current entries