本文整理匯總了Python中LongBow.scoreBuilder方法的典型用法代碼示例。如果您正苦於以下問題:Python LongBow.scoreBuilder方法的具體用法?Python LongBow.scoreBuilder怎麽用?Python LongBow.scoreBuilder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類LongBow
的用法示例。
在下文中一共展示了LongBow.scoreBuilder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: tuplesListToPrettyText
# 需要導入模塊: import LongBow [as 別名]
# 或者: from LongBow import scoreBuilder [as 別名]
def tuplesListToPrettyText(points, distribution = [99, 90]):
'''
Convert a list of tuples -- data points -- to a list of colorized strings based
on the provided distribution.
'''
lines = []
for point in points:
line = ""
for i in range(len(point) - 1):
line = line + str(point[i]) + " "
line = line + str(point[-1])
lines.append(LongBow.scoreBuilder(distribution, point[-1], line))
return lines