1

我正在尝试计算文档中的搭配。是否有可能在 NLTK 函数中为其定义窗口大小(就像函数“from_words”一样)?还是用句子或整个文档的边框代替窗口大小?任何提示表示赞赏!或者有没有可以替代 NLTK 的库?

finder = BigramCollocationFinder.from_words(str(sentences).split(), window_size = 5)

finder = BigramCollocationFinder.from_documents(documents)
4

0 回答 0