Я запускаю задачу классификации / извлечения функций на сервере Windows с 64 ГБ ОЗУ, и почему-то Python считает, что мне не хватает памяти:
misiti@fff /cygdrive/c/NaiveBayes
$ python run_classify_comments.py > tenfoldcrossvalidation.txt
Traceback (most recent call last):
File "run_classify_comments.py", line 70, in <module>
run_classify_comments()
File "run_classify_comments.py", line 51, in run_classify_comments
NWORDS = get_all_words("./data/HUGETEXTFILE.txt")
File "run_classify_comments.py", line 16, in get_all_words
def get_all_words(path): return words(file(path).read())
File "run_classify_comments.py", line 15, in words
def words(text): return re.findall('[a-z]+', text.lower())
File "C:\Program Files (x86)\Python26\lib\re.py", line 175, in findall
return _compile(pattern, flags).findall(string)
MemoryError
То есть модуль re падает с 64 ГБ ОЗУ ... Я так не думаю ...
Почему это происходит, и как я могу настроить python для использования всей доступной оперативной памяти на моей машине?