kanyun-inc / commonsense-rc Goto Github PK
View Code? Open in Web Editor NEWCode for Yuanfudao at SemEval-2018 Task 11: Three-way Attention and Relational Knowledge for Commonsense Machine Comprehension
License: MIT License
Code for Yuanfudao at SemEval-2018 Task 11: Three-way Attention and Relational Knowledge for Commonsense Machine Comprehension
License: MIT License
This is awesome work here, for QA type solution.
I got one question on input of 5 features, especially for TF.
tf = [0.1 * math.log(wikiwords.N * wikiwords.freq(w.lower()) + 10) for w in d_dict['words']]
what's basic idea for this feature input to doc_rnn ?? Theory is ??
Hi YuanFuDao team, thanks for sharing this wonderful work!
I have one question about preprocessing. It seems that:
1- when preprocess dataset, it needs to compute the relation (via compute_feature) from a preprocessed conceptnet
2- when preprocess conceptnet, it needs the vocab (via build_vocab) built from a preprocessed dataset.
This becomes the "egg comes first or chicken comes first" problem... Is there anything I'm missing here? It would be great if you could point out my mistake or give a more detailed description about how to preprocess.
Thanks!
run.sh only gives how to train, but no hint that how to predict and get the predict json
Thanks for your nice work!
I have a question about dropout on the output layer. In the paper, you saied you used dropout 0.4 on both embedding layer and output layer.
Howeve, after reading your code carefully, I find that:
In trian.py: You defined dropout_rate = 0
, and dropout_output = dropout_rnn_output = 0.4
However, in layers.py: You only use dropout_output as statements and use **dropout_rate = 0 ** for dropout.
For example:
if self.dropout_output and self.dropout_rate > 0: output = F.dropout(output, p=self.dropout_rate, training=self.training)
I think this code will not apply dropout on output since the dropout_rate is zero, right?
Did I miss anything?
作者你好,
能问问在Ablation Study这一步,是否需要在去掉相应模块后重新训练一个模型?
还是直接在完整的已经训练好的模型上,修改或者删除 train.py 文件中各个模块的代码?
data = None, so 'NoneType' object is not iterable,i think shouild be a parameter passed into build_vocab.
Thank you!
Hi, I really appreciate your job! Could you give some instructions on how to process and train model on RACE dataset?
您好!我想问一下,如何用自己的数据集做预处理呢?您说的run ./download.sh指的是您在论文中给出的数据集吧?
ub16hp@UB16HP:~/ub16_prj/commonsense-rc$ python3.5 src/preprocess.py conceptnet
self.annotators is {'ner', 'pos', 'lemma'}
Traceback (most recent call last):
File "src/preprocess.py", line 381, in
init_tokenizer()
File "src/preprocess.py", line 186, in init_tokenizer
TOK = SpacyTokenizer(annotators={'pos', 'lemma', 'ner'})
File "src/preprocess.py", line 145, in init
self.nlp = spacy.load(model, **nlp_kwargs)
File "/usr/local/lib/python3.5/dist-packages/spacy/init.py", line 19, in load
return util.load_model(name, **overrides)
File "/usr/local/lib/python3.5/dist-packages/spacy/util.py", line 111, in load_model
return load_model_from_link(name, **overrides)
File "/usr/local/lib/python3.5/dist-packages/spacy/util.py", line 130, in load_model_from_link
return cls.load(**overrides)
AttributeError: module 'en' has no attribute 'load'
ub16hp@UB16HP:~/ub16_prj/commonsense-rc$
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.