微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CompletedSubTask'对象没有属性'aspect_representation

如何解决CompletedSubTask'对象没有属性'aspect_representation

我正在研究基于方面的情感。 我只是想让代码正常工作,例如模块博客中的示例。 但是我有这个错误

html = absa.probing.explain(slack)
display(html)

AttributeError                            Traceback (most recent call last)
<ipython-input-20-98b6fe874b12> in <module>
----> 1 html = absa.probing.explain(slack)
      2 display(html)

~/Library/Python/3.8/lib/python/site-packages/aspect_based_sentiment_analysis/probing/plots.py in explain(example)
     47 
     48 def explain(example: PredictedExample):
---> 49     aspect = example.aspect_representation
     50     texts = [f'Words connected with the "{example.aspect}" aspect: <br>']
     51     texts.extend(highlight_sequence(aspect.tokens,aspect.look_at))

AttributeError: 'CompletedSubTask' object has no attribute 'aspect_representation'

更多内容https://pypi.org/project/aspect-based-sentiment-analysis/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。