bigrams(['more', 'is', 'said', 'than', 'done'])

Python 自然语言处理 P39

bigrams(['more', 'is', 'said', 'than', 'done'])

Out[81]: <generator object bigrams at 0x000001F7161AC4F8>

改为

list(bigrams(['more', 'is', 'said', 'than', 'done']))

Out[82]: [('more', 'is'), ('is', 'said'), ('said', 'than'), ('than', 'done')]
发布了44 篇原创文章 · 获赞 0 · 访问量 1314

猜你喜欢

转载自blog.csdn.net/qq_41664688/article/details/104248927