violetpeng / graphlstm_release Goto Github PK
View Code? Open in Web Editor NEWImplementation of TACL 2017 paper: Cross-Sentence N-ary Relation Extraction with Graph LSTMs. Nanyun Peng, Hoifung Poon, Chris Quirk, Kristina Toutanova and Wen-tau Yih.
Implementation of TACL 2017 paper: Cross-Sentence N-ary Relation Extraction with Graph LSTMs. Nanyun Peng, Hoifung Poon, Chris Quirk, Kristina Toutanova and Wen-tau Yih.
Hi, I've got a question regarding theano_src/train_util.py
line 495.
I was trying to replicate the results in the paper with batch_run_lstm.sh
. It returned that str object is not callable
. Here's the traceback:
File "theano_src/lstm_RE.py", line 707, in <module>
eval(args.setting)(args)
File "theano_src/lstm_RE.py", line 604, in run_single_corpus
run_epochs(_args)
File "theano_src/lstm_RE.py", line 297, in run_epochs
cargs = compile_circuit(_args)
File "theano_src/lstm_RE.py", line 248, in compile_circuit
(_args.f_cost, _args.f_update, _args.f_classify, cargs) = create_relation_circuit(_args, StackConfig)
File "/home/julia/Desktop/GraphLSTM_release/theano_src/train_util.py", line 495, in create_relation_circuit
x_w, mask, idx_arr, y, y_pred, cost, grads, regularizable_params = _args.circuit(cargs)
TypeError: 'str' object is not callable
Command exited with non-zero status 1```
I suspect that the argument `Relation` for `run_lstm.sh` is passed as string. I am wondering if you could elaborate this? Thank you!
Hi, I found in the "sentences_2nd" files that there are multiple labels (e.g., resistance or non-response, sensitivity, response, none). My first question is, did you do binary classifications? If so, then which labels are considered as positive and which ones are considered as negative?
@VioletPeng
Hi,
Thanks for sharing! Is the discourse relation used in the code? If so, what is the markup? Since both the dependency relation and the discourse relation are dependencies in the data_graph, it is a little confusing about the discourse relation.
Hi, I have a question about the PubMed datasets.
For example, there is a sentence, "Preclinical data have demonstrated that afatinib is a potent irreversible inhibitor of EGFR receptors including the T790M variant. And .... it is the T790M." and in this sentence, there are two relations, (resistance_nonrespose, afatinib, egfr, t790M) and (resistance_nonrespose, afatinib, egfr, t790M).
In this situation, the two instances are only used for the training(or test)? or is it possible that one is used for the training, the other one is used for the test?
Actually, in your research, if there are two relations in a sentence, the relations are used as individual instances. Thus, I think it is possible that one is used for training and the other one is used for the test. is it correct?
Noticed that the test sets are different for single-sentence and cross-sentence.
(1) How did you determine the single-sentence instances? Did you select the instances with only one "." as single-sentence? Can you provide that partial test datasets?
(2) Did you use the same training data for these two settings?
(3) How did you split the dataset into train/dev/test? Do you mind sharing the train/dev/test set?
Thanks a lot!
@VioletPeng
Hi,
I want to convert a file with sentences to the format of data_graph
, sentences_2nd
& graph_arcs
. Can you please share the code that you have used to do that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.