我想使用三元组和双元组,因为我不想只使用单数字。在
bigramer = gensim.models.Phrases(sentences)
model = Word2Vec(bigramer[sentences], workers=num_workers, \
size=num_features, min_count = min_word_count, \
window = context, sample = downsampling)
from nltk import bigrams
from nltk import trigrams
from gensim.models import Phrases
from gensim.models.phrases import Phraser
trigrams = Phrases(bigrams[sentence_stream])
但是,我有这个错误。在
^{pr2}$
我通过将代码重写为:
相关问题 更多 >
编程相关推荐