Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arrays Textblob将单词标记化为数组_Arrays_Tokenize_Textblob - Fatal编程技术网

Arrays Textblob将单词标记化为数组

Arrays Textblob将单词标记化为数组,arrays,tokenize,textblob,Arrays,Tokenize,Textblob,打印出的结果将是: [WordList(['i','have','a','bunch','of','grapes']),WordList(['i','like','to','eat','apple']),WordList(['this','is','a','laptop'])] 如何从单词列表中提取,以便将我的array2打印为: 这是一台笔记本电脑 在附加到阵列2之前,您可以list() array2.append(c.words._collection) 通常,最好解释一个解决方案,而不是

打印出的结果将是:

[WordList(['i','have','a','bunch','of','grapes']),WordList(['i','like','to','eat','apple']),WordList(['this','is','a','laptop'])]

如何从单词列表中提取,以便将我的array2打印为:

这是一台笔记本电脑

在附加到阵列2之前,您可以list()

array2.append(c.words._collection)

通常,最好解释一个解决方案,而不是仅仅发布几行匿名代码。你可以阅读,也可以阅读
array2.append(c.words._collection)
for i in array:
    c=TextBlob(i)
    array2.append(list(c.words))