ValueError Traceback (most recent call last)
Cell In[5], line 1
----> 1 import cntext as ct
2 help(ct)
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/cntext/init.py:3
1 version = "1.8.4"
----> 3 from cntext.dictionary import SoPmi, W2VModels, co_occurrence_matrix, Glove
4 from cntext.similarity import jaccard_sim, minedit_sim, simple_sim, cosine_sim
5 from cntext.stats import load_pkl_dict, dict_pkl_list, term_freq, readability, sentiment, sentiment_by_valence, sentiment_by_weight
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/cntext/dictionary.py:3
1 import jieba.posseg as pseg
2 import math,time
----> 3 from gensim.models import word2vec
4 from pathlib import Path
5 from nltk.tokenize import word_tokenize
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/init.py:11
7 version = '4.3.1'
9 import logging
---> 11 from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils # noqa:F401
14 logger = logging.getLogger('gensim')
15 if not logger.handlers: # To ensure reload() doesn't add another one
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/corpora/init.py:6
1 """
2 This package contains implementations of various streaming corpus I/O format.
3 """
5 # bring corpus classes directly into package namespace, to save some typing
----> 6 from .indexedcorpus import IndexedCorpus # noqa:F401 must appear before the other classes
8 from .mmcorpus import MmCorpus # noqa:F401
9 from .bleicorpus import BleiCorpus # noqa:F401
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/interfaces.py:19
7 """Basic interfaces used across the whole Gensim package.
8
9 These interfaces are used for building corpora, model transformation and similarity queries.
(...)
14
15 """
17 import logging
---> 19 from gensim import utils, matutils
22 logger = logging.getLogger(name)
25 class CorpusABC(utils.SaveLoad):
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/matutils.py:1030
1025 return 1. - float(len(set1 & set2)) / float(union_cardinality)
1028 try:
1029 # try to load fast, cythonized code if possible
-> 1030 from gensim._matutils import logsumexp, mean_absolute_difference, dirichlet_expectation
1032 except ImportError:
1033 def logsumexp(x):
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/_matutils.pyx:1, in init gensim._matutils()
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
ValueError Traceback (most recent call last) Cell In[5], line 1 ----> 1 import cntext as ct 2 help(ct)
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/cntext/init.py:3 1 version = "1.8.4" ----> 3 from cntext.dictionary import SoPmi, W2VModels, co_occurrence_matrix, Glove 4 from cntext.similarity import jaccard_sim, minedit_sim, simple_sim, cosine_sim 5 from cntext.stats import load_pkl_dict, dict_pkl_list, term_freq, readability, sentiment, sentiment_by_valence, sentiment_by_weight
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/cntext/dictionary.py:3 1 import jieba.posseg as pseg 2 import math,time ----> 3 from gensim.models import word2vec 4 from pathlib import Path 5 from nltk.tokenize import word_tokenize
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/init.py:11 7 version = '4.3.1' 9 import logging ---> 11 from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils # noqa:F401 14 logger = logging.getLogger('gensim') 15 if not logger.handlers: # To ensure reload() doesn't add another one
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/corpora/init.py:6 1 """ 2 This package contains implementations of various streaming corpus I/O format. 3 """ 5 # bring corpus classes directly into package namespace, to save some typing ----> 6 from .indexedcorpus import IndexedCorpus # noqa:F401 must appear before the other classes 8 from .mmcorpus import MmCorpus # noqa:F401 9 from .bleicorpus import BleiCorpus # noqa:F401
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/corpora/indexedcorpus.py:14 10 import logging 12 import numpy ---> 14 from gensim import interfaces, utils 16 logger = logging.getLogger(name) 19 class IndexedCorpus(interfaces.CorpusABC):
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/interfaces.py:19 7 """Basic interfaces used across the whole Gensim package. 8 9 These interfaces are used for building corpora, model transformation and similarity queries. (...) 14 15 """ 17 import logging ---> 19 from gensim import utils, matutils 22 logger = logging.getLogger(name) 25 class CorpusABC(utils.SaveLoad):
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/matutils.py:1030 1025 return 1. - float(len(set1 & set2)) / float(union_cardinality) 1028 try: 1029 # try to load fast, cythonized code if possible -> 1030 from gensim._matutils import logsumexp, mean_absolute_difference, dirichlet_expectation 1032 except ImportError: 1033 def logsumexp(x):
File ~/anaconda3/envs/dadeng/lib/python3.8/site-packages/gensim/_matutils.pyx:1, in init gensim._matutils()
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject