python выдает ошибку при попытке загрузить spacy - PullRequest
0 голосов
/ 09 марта 2020
import pandas as pd
from ast import literal_eval
from nltk.corpus import stopwords
import string


stops = stopwords.words('english')
stops.extend(['none'])

import nltk

import re
import numpy as np
from pprint import pprint

import gensim
import gensim.corpora as corpora
from gensim.utils import simple_preprocess # for tokenizing
from gensim.models import CoherenceModel
from sklearn.feature_extraction import stop_words

import spacy

Ошибка:


AttributeError Traceback (последний последний вызов) в 20 из sklearn.feature_extraction import stop_words 21 ---> 22 import spacy 23 24 import pyLDAvis

~ \ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ spacy__init __. Py в 10 из тонких c .neural.util import please_gpu, require_gpu 11 ---> 12 from. импортировать конвейер 13 из .cli.info импортировать информацию как cli_info 14 из .glossary import объяснять

~ \ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ spacy \ pipeline__init __. py in 2 из __future__ import unicode_literals 3 ----> 4 из .pipes импорта Tagger, DependencyParser, EntityRecognizer, EntityLinker 5 из .pipes импорта TextCategorizer, Tensorizer, Pipe, Sentencizer 6 из .morphologizer импорта Morphologizer

pipe.pyx в init spacy. pipe.pipes ()

~ \ AppData \ Local \ Continuum \ anaconda3 \ lib \ site-packages \ spacy \ syntax \ nn_parser.cp37-win_amd64.pyd в init spacy.syntax.nn_parser ()

AttributeError: тип объекта 'spacy.syntax.nn_parser.array' не имеет атрибута __reduce_cython __ '

...