freesunshine0316 / nary-grn

Code regarding to our paper "N-ary Relation Extraction using Graph State LSTM"
96 stars 27 forks source link

how to run it #14

Open smartcatdog opened 5 years ago

smartcatdog commented 5 years ago

after modifying the train and test which should point to peng-data-file, and any else should be modifying? when i run train.sh , "AttributeError: 'Bunch' object has no attribute 'word_format'" happend. thx

freesunshine0316 commented 5 years ago

Hi,

You can add

"word_format": "lemma"

or

"word_format": "morph"

to the config.json file.

This switch indicates using lemma or morphological form of words.

smartcatdog commented 5 years ago

OK,thanks,it is ok. is word_format must be relatively with word_vec_path which is in config.json, for example, if "word_format" is "morph" and "word_vec_path" should be "vocab_morph.wordvec.st" while "word_format" is "lemma" and "word_vec_path" should be "vocab_lemma.wordvec.st"? thx for your answering, and another question is that what is the input meaning, a part of input is like this: " {"paragraph":12,"paragraphSentence":4,"sentence":33,"type":"gene","id":"DDR2","mention":"DDR2","indices":[42]},{"paragraph":12,"paragraphSentence":4,"sentence":33,"type":"variant","id":"S768R","mention":"S768R","indices":[38]}],"relationLabel":"response"} " thanks,

freesunshine0316 commented 5 years ago

For your first question, the answer is yes! For your second question, please refer our data loading function https://github.com/freesunshine0316/nary-grn/blob/master/gs_lstm/G2S_data_stream.py#L43

leslie991123 commented 4 months ago

对于您的第一个问题,答案是肯定的!对于您的第二个问题,请参阅我们的数据加载功能 https://github.com/freesunshine0316/nary-grn/blob/master/gs_lstm/G2S_data_stream.py#L43

FileNotFoundError: [Errno 2] No such file or directory: './data/data_list'