Code Monkey home page Code Monkey logo

Comments (3)

Spico197 avatar Spico197 commented on July 22, 2024

嗨您好,感谢您对我们工作的关注~

由于组合中的某个伪触发词可能缺失,因此在BK算法解码后,还可能会残留只有一个伪触发词的组合。这部分组合是一种特殊情况,需要单独纳入考量。可以结合代码进一步理解:

left_triggers = triggers - used_triggers
if with_left_trigger:
for v in left_triggers:
comb = set()
if len(connections[v]) > 0:
comb.add(v)
comb.update(connections[v])
if len(comb) > 0 and comb not in combs:
combs.append(comb)

from docee.

ylxwan avatar ylxwan commented on July 22, 2024

好的,谢谢您,我先自己阅读理解一下

from docee.

ylxwan avatar ylxwan commented on July 22, 2024

老师,您好,请问这里为什么self_loop是false的时候,会将邻接矩阵的对角线置为1。这里是不是弄反了?还是我理解错了。
if self.config.self_loop:
rel_adj_mat = (
doc_arg_rel_info.whole_arg_rel_mat.reveal_adj_mat(
masked_diagonal=None, tolist=False
)
.to(scores.device)
.float()
)
else:
rel_adj_mat = (
doc_arg_rel_info.whole_arg_rel_mat.reveal_adj_mat(
masked_diagonal=1, tolist=False
)
.to(scores.device)
.float()#给whole_arg_rel_mat主对角线置为1
)

from docee.

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.