📜  计算词频python代码示例

📅  最后修改于: 2022-03-11 14:45:47.642000             🧑  作者: Mango

代码示例1
from collections import Counter

# Counter token frequency from a sentence
sentence = "Texas A&M University is located in Texas"

term_frequencies = Counter(sentence.split())