GithubHelp home page GithubHelp logo

zhixiuye / intra-bag-and-inter-bag-attentions Goto Github PK

View Code? Open in Web Editor NEW
113.0 113.0 29.0 82.45 MB

Code for NAACL 2019 paper: Distant Supervision Relation Extraction with Intra-Bag and Inter-Bag Attentions

Python 79.23% C++ 20.49% Shell 0.28%
deeplearning distant-supervision nlp pytorch relation-extraction

intra-bag-and-inter-bag-attentions's People

Contributors

zhixiuye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intra-bag-and-inter-bag-attentions's Issues

About the PR curve data points

Could you please also publish your PR curve data points . I think that will make the successors easy to compare their new models with yours when they want to plot both their and your results. Thanks~

Using a different dataset

Hello

I am trying to use a different dataset as input to the model.

What are the things I need to do?

I was trying to replicate the files that you have in the NYT_data directory but am confused with vec.bin and the first two columns in train.txt and test.txt.

Thank you in advance for any feedback you can give me

关于P@N问题

您好,我想请问一下关于P@N评测,按照代码中评测P@100应该是个整数,请问您论文中是实验多次取平均数吗?table 4中Lin2016的p@300数据好像打印错了

输入自己的数据集问题

您好,我用自己的数据集做成您的模型需要输入的格式,训练后召回率和精确率是非法的,为什么呢?是因为我的数据集太小了吗?或者是batch_size不合适?
image
image

code wrong

I think your codes has a little mistake. in the train.py.

if args.use_RA and args.sent_encoding == "pcnn": loss = model.PCNN_ATTRA(total_word, total_pos1, total_pos2, total_pcnnmask, total_shape, y_batch) if args.use_RA and args.sent_encoding == "cnn": loss = model.CNN_ATTRA(total_word, total_pos1, total_pos2, total_pcnnmask, total_shape, y_batch) if not args.use_RA and args.sent_encoding == "pcnn": loss = model.PCNN_ATT**RA**(total_word, total_pos1, total_pos2, total_pcnnmask, total_shape, y_batch) if not args.use_RA and args.sent_encoding == "cnn": loss = model.CNN_ATTBL(total_word, total_pos1, total_pos2, total_pcnnmask, total_shape, y_batch)

line 278should be "model.PCNN_ATTBL"

why word_id + 1 in data2pkl.py?

In preprocess/data2pkl.py line 43, 44:

sent = f.readline().strip().split(",")
sentences.append([(x+1) for x in list(map(int, sent))])

sent should be the word id list of current sentence. But why x+1 (instead of x)?

Is it because a new token '' is added to vocaburary?

Thanks.

请教一下,有部分没看懂

请问extract.cpp里面的word2vec.txt,bags_train.txt,bags_test.txt 数据集里怎么没有这些文件? 还有我要换数据集的话,是不是还得处理成train.txt里面的格式?代码里好像没有处理成train.txt格式的过程。谢谢解答!

Issue about data

I found that the instance number of train data of Lin2016(and many other papers) is about 520000, but that of yours is about 570000. So, where do you get your data from? Thank you.

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.