elit icon indicating copy to clipboard operation
elit copied to clipboard

elit/nlp/dep/parser/common/data.py

Open imgarylai opened this issue 6 years ago • 5 comments

https://github.com/elitcloud/elit/blob/fd959c505f6a5cf0bb94b8291db308f0036b51d1/elit/nlp/dep/parser/common/data.py#L174

...
elit_dep_biaffine_en_mixed.load('{}/data/model/dep/jumbo-fasttext100'.format(ELIT_PATH))
  File "/usr/local/lib/python3.5/dist-packages/elit/nlp/dep/parser/parser.py", line 168, in load
    self._parser = self._create_parser(self._config, self._vocab)
  File "/usr/local/lib/python3.5/dist-packages/elit/nlp/dep/parser/parser.py", line 209, in _create_parser
    config.mlp_rel_size, config.dropout_mlp, config.debug)
  File "/usr/local/lib/python3.5/dist-packages/elit/nlp/dep/parser/biaffine_parser.py", line 55, in __init__
    trainable=False) if vocab.has_pret_embs() else None
  File "/usr/local/lib/python3.5/dist-packages/elit/nlp/dep/parser/common/data.py", line 174, in get_pret_embs
    word_dims = len(data)
UnboundLocalError: local variable 'data' referenced before assignment

imgarylai avatar Nov 28 '18 06:11 imgarylai