cntext更新至1.1 版本

本次更新了共现矩阵的计算函数。

更新方法

pip3 install cntext --upgrade

或指定版本安装

pip3 install cntext==1.1

co_occurrence_matrix

词共现矩阵

from cntext.dictionary import co_occurrence_matrix

documents = ["I go to school every day by bus .",
         "i go to theatre every night by bus"]

co_occurrence_matrix(documents, window_size=2, lang='english')
documents2 = ["编程很好玩",
             "Python是最好学的编程"]

co_occurrence_matrix(documents2, window_size=2, lang='chinese')

广而告之