Open Balabala0792 opened 2 years ago
This is just to detect whether the embedding file you downloaded is binary or .txt. I would recommend using a binary file since it loads faster.
But if it doesn't work, you can use the .txt format.
Ok, thank you. But there are problems. "WARNING: Config setting: '/enwiki_20180420_300d.txt' not found. Returning None! INFO: Loading word vectors from: None... AttributeError: 'NoneType' object has no attribute 'endswith'" I don't know how to do it and I'm pretty sure it's not a path problem. Hope you can help me. Thanks!
This problem occurs when I run 'run_open_world.py'. And the first thing that went wrong was the following line of code in the 'data.py' file. "return KeyedVectors.load_word2vec_format(embedding_file, binary=not embedding_file.endswith(".txt")) " I woule like to know what this line of code means and what the endswith function means. Thank you!