Giter Site home page Giter Site logo

kanyun-inc / commonsense-rc Goto Github PK

View Code? Open in Web Editor NEW
118.0 118.0 34.0 2.83 MB

Code for Yuanfudao at SemEval-2018 Task 11: Three-way Attention and Relational Knowledge for Commonsense Machine Comprehension

License: MIT License

Python 99.10% Shell 0.90%
deep-learning machine-comprehension natural-language-processing

commonsense-rc's People

Contributors

intfloat 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

commonsense-rc's Issues

Questions on 5 features

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 ??

first preprocess dataset or conceptnet?

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!

How to predict?

run.sh only gives how to train, but no hint that how to predict and get the predict json

Dropout on output?

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 相关问题

作者你好,
能问问在Ablation Study这一步,是否需要在去掉相应模块后重新训练一个模型?
还是直接在完整的已经训练好的模型上,修改或者删除 train.py 文件中各个模块的代码?

Train on rice

Hi, I really appreciate your job! Could you give some instructions on how to process and train model on RACE dataset?

预处理

您好!我想问一下,如何用自己的数据集做预处理呢?您说的run ./download.sh指的是您在论文中给出的数据集吧?

AttributeError: module 'en' has no attribute 'load'

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$

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.