lanwuwei / SPM_toolkit

Neural network toolkit for sentence pair modeling.
302 stars 70 forks source link

What is quora_vocab_cased.pkl that ESIM/main_batch_quora.py needs #11

Closed vikotse closed 5 years ago

vikotse commented 5 years ago

I found that quora_vocab_cased.pkl would be loaded in line 155 in ESIM/main_batch_quora.py, in the beginning of that program.

When I try to run ESIM code, I got stuck in that file(quora_vocab_cased.pkl) I found this file in the drive folder you share in DecAtt/README.

But currently I have a sentence matching task, how could I generate a file like quora_vocab_cased.pkl? I have not found any code about generating that file.

image

lanwuwei commented 5 years ago

Hi Weijian, quora_vocab_cased.pkl is actually a vocabulary, where each word is mapped into an integer to index the corresponding word vector in nn.Embedding: image

vikotse commented 5 years ago

Issue solved, thanks to @lanwuwei 's reply.