0
我正在使用Python包字袋,bow.py
(https://github.com/dmiro/bagofwords/blob/master/bow.py)。PyStemmer:ImportError:DLL加載失敗:動態鏈接庫(DLL)初始化例程失敗
基本上我運行以下命令:
dc = bow.DefaultDocument()
dc.read_text("paragraph string here")
我得到以下跟蹤:
Traceback (most recent call last):
File "bag_of_words.py", line 93, in <module>
if __name__ == "__main__": main()
File "bag_of_words.py", line 27, in main
bag_of_words_classifier_test("item", "category_1", "category_2")
File "bag_of_words.py", line 73, in bag_of_words_classifier_test
dc.read_text("paragraph string here")
File "C:\Users\User Name\Anaconda3\lib\site-packages\bow.py", line 339, in read_text
self._read(None, text)
File "C:\Users\User Name\Anaconda3\lib\site-packages\bow.py", line 326, in _read
words = self.tokenizer(text)
File "C:\Users\User Name\Anaconda3\lib\site-packages\bow.py", line 306, in tokenizer
words = self.after_tokenizer(WordFilters, words)
File "C:\Users\User Name\Anaconda3\lib\site-packages\bow.py", line 517, in after_tokenizer
words = wordfilters.stemming(self.lang, self.stemming, words)
File "C:\Users\User Name\Anaconda3\lib\site-packages\bow.py", line 250, in stemming
import Stemmer as stemmer
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
我想這可能是與PyStemmer一個問題,所以我試圖迫使PIP3重裝/升級但得到相同的錯誤。有什麼想法嗎?