我在Python下的NLTK,尤其是.generate()方法有问题。 生成(个体,长度= 100) 打印随机文本,使用三元语言模型生成。 参数: * length (int) - The length of text to generate (default=100)
这里是我在尝试的简化版本。 import nltk
words = 'The quick brown fox jumps
我期待从文本例子很短的突发中提取人名和地名
"cardinals vs jays in toronto"
" Daniel Nestor and Nenad Zimonjic play Jonas Bjorkman w/ Kevin Ullyett, paris time to be announced"
"jenson button - pole position, brawn-merc