Skip to content

Commit

Permalink
enable path redirection when loading parser model fix #31
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed Nov 27, 2018
1 parent 62ad35d commit fd959c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions elit/nlp/dep/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def load(self, model_path: str, **kwargs):
if self._parser: # already loaded, ignore
return self
self._config = ParserConfig(os.path.join(model_path, 'config.ini'))
self._config.save_dir = model_path
self._vocab = ParserVocabulary.load(self._config.save_vocab_path)
with self.context:
self._parser = self._create_parser(self._config, self._vocab)
Expand Down

0 comments on commit fd959c5

Please sign in to comment.