How can I change this ngrams_practice function to return any n gram not just bigrams?

前端 未结 0 528
夕颜
夕颜 2021-01-22 06:59
import nltk
from nltk.tokenize import word_tokenize
from nltk.util import ngrams 
from nltk.lm.preprocessing import pad_both_ends
from nltk.util import bigrams

input1 =         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题