Skip to content

AttributeError: 'Lang' object has no attribute 'ix2word' #1

@pouryas7

Description

@pouryas7

Hi,

I am trying to run the code on SICK dataset. I don't know what I should put for vocab.pkl.

BTW, I put a similar file in data folder. Now, I am facing with following error:

Traceback (most recent call last):
  File "run_rte.py", line 124, in <module>
    rte_model = RTE(l_en, options)
  File "/home/pourya/Programs/NLP/Recognizing-Textual-Entailment-master/rte_model.py", line 26, in __init__
    self.embedding = nn.Embedding(len(l_en) + 1, self.n_embed).type(dtype)
  File "/home/pourya/Programs/NLP/Recognizing-Textual-Entailment-master/Lang.py", line 66, in __len__
    assert len(self.ix2word) == len(self.word2ix), "Index not built using generate_vocab and add_word"
AttributeError: 'Lang' object has no attribute 'ix2word'

I don't know how to solve this issue

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions