Git Product home page Git Product logo

Comments (4)

Heart-beatsss avatar Heart-beatsss commented on June 3, 2024

我好像找到了。就是第一阶段是不管aspect-opinion对的事情,把所有的aspect和opinion组合后,丢给第二阶段去做。并且在第二阶段中,实际训练过程中,无效的aspect-opinion对的target为[0]len(类别情感种类);有效对的target则为[0]len(类别情感种类-1)+[1],当然这个1的位置是视目标位置而定的,我这么写只是为了区分。
如果我的想法有错误的话,还麻烦指正。期待你的回复!

from acos.

Heart-beatsss avatar Heart-beatsss commented on June 3, 2024

上述的×号丢失了。
我好像找到了。就是第一阶段是不管aspect-opinion对的事情,把所有的aspect和opinion组合后,丢给第二阶段去做。并且在第二阶段中,实际训练过程中,无效的aspect-opinion对的target为[0]×len(category×情感种类);有效对的target则为[0]×len(category×情感种类-1)+[1],当然这个1的位置是视目标位置而定的,我这么写只是为了区分。
如果我的想法有错误的话,还麻烦指正。期待你的回复!

from acos.

blhoy avatar blhoy commented on June 3, 2024

是这样的。一阶段得到aspect集合和opinion集合,对两个集合做笛卡尔积处理:

for pa in asp:
ast, aed = int(pa.split(',')[0]), int(pa.split(',')[1])
for po in opi:
ost, oed = int(po.split(',')[0]), int(po.split(',')[1])
pred.append([pa, po])

二阶段判断aspect和opinion是否构成合法配对(全0为无效配对),并为每个合法的匹配做category-sentiment的分类(对应位置为1)。

from acos.

Heart-beatsss avatar Heart-beatsss commented on June 3, 2024

是这样的。一阶段得到aspect集合和opinion集合,对两个集合做笛卡尔积处理:

for pa in asp:
ast, aed = int(pa.split(',')[0]), int(pa.split(',')[1])
for po in opi:
ost, oed = int(po.split(',')[0]), int(po.split(',')[1])
pred.append([pa, po])

二阶段判断aspect和opinion是否构成合法配对(全0为无效配对),并为每个合法的匹配做category-sentiment的分类(对应位置为1)。

好的,非常感谢!

from acos.

Related Issues (17)

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.