diff --git a/train_geocoder.py b/train_geocoder.py index c2c15e881ebef7c084305077229d1c9d1385671d..da47f1c0bba5c6399803a34d9e730140ec4b7478 100644 --- a/train_geocoder.py +++ b/train_geocoder.py @@ -130,7 +130,7 @@ if os.path.exists(EMBEDDING_FN): logging.info("Embedding loaded ! ") else: logging.info("Generating N-GRAM Embedding...") - embedding_weights = index.get_embedding_layer([index.encode(p) for p in np.concatenate((pairs_of_toponym.toponym.unique(),pairs_of_toponym.toponym_context.unique()))],dim= EMBEDDING_DIM,iter=WORDVEC_ITER) + embedding_weights = index.get_embedding_layer(np.concatenate((pairs_of_toponym.toponym.unique(),pairs_of_toponym.toponym_context.unique())),dim= EMBEDDING_DIM,iter=WORDVEC_ITER) np.save(EMBEDDING_FN,embedding_weights) logging.info("Embedding generated !")