localminimum / QANet

A Tensorflow implementation of QANet for machine reading comprehension
MIT License
983 stars 310 forks source link

Is this snippet in prepro.py correct #46

Closed saxenarohit closed 5 years ago

saxenarohit commented 5 years ago
 for token in context_tokens:
                    word_counter[token] += len(para["qas"])
                    for char in token:
                        char_counter[char] += len(para["qas"])

Should it be +=1?

localminimum commented 5 years ago

Hi, thanks for your question! We don't actually use the value of the key in the counters so it's a bit of a redundancy that I should remove. But for consistency it should be +=1 you are correct!