fixing relative filepath search of doc2vec model in naive approach
This commit is contained in:
		| @ -43,7 +43,8 @@ def stemming(message): | ||||
| # * compare words to emoji descriptions | ||||
| def evaluate_sentence(sentence, description_key = 'description', lang = 'eng', emojis_to_consider="all", stem=True): | ||||
|     # assumes there is a trained w2v model stored in the same directory! | ||||
|     wv = KeyedVectors.load("word2vec.model", mmap='r') | ||||
|     __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) | ||||
|     wv = KeyedVectors.load(str(__location__)+"/word2vec.model", mmap='r') | ||||
|      | ||||
|     if (stem): | ||||
|         sentence = stemming(sentence) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user