本文整理汇总了Python中post.Post.bigrams方法的典型用法代码示例。如果您正苦于以下问题:Python Post.bigrams方法的具体用法?Python Post.bigrams怎么用?Python Post.bigrams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类post.Post
的用法示例。
在下文中一共展示了Post.bigrams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from post import Post [as 别名]
# 或者: from post.Post import bigrams [as 别名]
count_fourgrams.update(terms_fourgram)
count_fivegrams.update(terms_fivegram)
count_sixgrams.update(terms_sixgram)
count_sevengrams.update(terms_sevengram)
count_eightgrams.update(terms_eightgram)
count_ninegrams.update(terms_ninegram)
#Progress Bar:
counter = counter + 1
percentage = int((counter*100/limit))
percentageBar = int(percentage/5)
missingPercentageBar = 20 - percentageBar
post.features = terms_all
post.hashtags = terms_hashtags
post.bigrams = terms_bigram
#sys.stdout.write("\r %d %d %d %d " % (counter,limit,percentage,missingPercentage))
sys.stderr.write("\r¦|%s|¦%d%%. Examinated %d of %d" % (("░")*percentageBar+" "*missingPercentageBar, percentage, counter, limit) )
sys.stderr.flush()
print("\n")
wordsTopNum = minValue(opts.wordsTopNum,4000)
hashtagTopNum = minValue(opts.hashtagTopNum,3000)
ngramsTopNum = minValue(opts.ngramsTopNum,2000)
#sys.exit(0)
com_max = []
# For each term, look for the most common co-occurrent terms