摘要将与列表一起使用属性
我使用python中的管道来概述评论
此代码有效,并给了我摘要:
article = 'Everything is good and clean, but the swimming pool does not work at this time, according to their words, they say maintenance and God knows Parking needs umbrellas Breakfast is good and the bed is excellent and comfortable and the view of the room is great.'
text = summarizer(article)[0]['summary_text']
但这不起作用:
text = summarizer(chunks[0])[0]['summary_text']
尽管块[0]
包含与actial> acrets
的文本相同的文本
为什么它不起作用?我应该怎么办?我需要在循环
编辑中总结块
的所有项目:
我通过减小块[0]
的大小来解决它,以便摘要器可以接受。
I use the pipeline in python to summarize reviews
This code works and gives me the summary:
article = 'Everything is good and clean, but the swimming pool does not work at this time, according to their words, they say maintenance and God knows Parking needs umbrellas Breakfast is good and the bed is excellent and comfortable and the view of the room is great.'
text = summarizer(article)[0]['summary_text']
But this doesn't work:
text = summarizer(chunks[0])[0]['summary_text']
despite chunks[0]
containing the same text as article
Why won't it work? what should I do? I need to summarize all items of chunks
in a loop
Edit:
I solve it by reducing the size of chunks[0]
so the summarizer could accept it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论