Giter Club home page Giter Club logo

Comments (8)

yangheng95 avatar yangheng95 commented on June 12, 2024

情感极性转换失败了,请检查数据集里面情感极性没有缺失的情况

from lcf-atepc.

liu-21 avatar liu-21 commented on June 12, 2024

做实验验证了不是数据集的问题,请问您跑代码除了对数据集进行格式上的转化,是不是还对数据集做了别的特殊处理?

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

这个工作将近两年了,细节记不大清了。数据集有没有特殊处理也只涉及后面features的处理,应该是不会影响数据集读取。你可以把出错的部分数据发给我,我帮你看一下

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

另外,中文数据集的极性是0,2分别代表正负,没有中性的情感(1)。数据在建模前会吧0,2转换成0,1。而-1则是情感标签的填充,不参与极性的学习

from lcf-atepc.

liu-21 avatar liu-21 commented on June 12, 2024

根据您的描述,我的数据集中只有积极和消极两种极性,没有中性,感觉这样不会影响数据集的读取吧?而且我看您代码里中文只分成两类,似乎没有中性的极性判断。英文数据集是分成三类的。
我的数据集例:
这 O -1
里 O -1
发 B-ASP 2
展 I-ASP 2
肯 O -1
定 O -1
好 O -1
是 O -1
一 O -1
块 O -1
宝 O -1
地 O -1

这 O -1
么 O -1
高 O -1
的 O -1
房 B-ASP 0
价 I-ASP 0
自 O -1
己 O -1
留 O -1
手 O -1
里 O -1
吧 O -1
永 O -1
远 O -1
也 O -1
别 O -1
想 O -1
卖 O -1
出 O -1
去 O -1

实 B-ASP 0
物 I-ASP 0
图 I-ASP 0
无 O -1
语 O -1
这 O -1
全 O -1
是 O -1
售 O -1
楼 O -1
处 O -1
的 O -1
照 O -1
片 O -1
… O -1
根 O -1
本 O -1
不 O -1
是 O -1
小 O -1
区 O -1
里 O -1
的 O -1
照 O -1
片 O -1
好 O -1
吧 O -1
… O -1

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

这个数据看起来是没有问题的,我有时间帮你看一下。你可以先尝试一下https://github.com/yangheng95/PyABSA ,这里面的代码鲁棒性更好,不过一些地方与原始的实现不同。

from lcf-atepc.

yangheng95 avatar yangheng95 commented on June 12, 2024

需要注意的是PyABSA是自动根据极性的种类初始化模型的,需要极性从0开始并且连续。例如如果你的极性只有两种,那么就使用0,1标注

from lcf-atepc.

liu-21 avatar liu-21 commented on June 12, 2024

好的,谢谢您!

from lcf-atepc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.