Skip to content

Commit

Permalink
fix bug of visualization using ddparser
Browse files Browse the repository at this point in the history
  • Loading branch information
linjieccc committed Sep 9, 2021
1 parent 714ca2c commit 1ceaa81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paddlenlp/taskflow/dependency_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def __init__(self,
rel_vocab_path = download_file(
self._task_path, self.model + os.path.sep + "rel_vocab.json",
URLS[self.model][0], URLS[self.model][1])
font_file_path = download_file(
self.font_file_path = download_file(
self._task_path,
self.model + os.path.sep + "SourceHanSansCN-Regular.ttf",
URLS[self.model][0], URLS[self.model][1])
Expand Down Expand Up @@ -314,7 +314,7 @@ def _visualize(self, data):
)

self.plt = plt
self.font = font_manager.FontProperties(fname=font_file_path)
self.font = font_manager.FontProperties(fname=self.font_file_path)
word, head, deprel = data['word'], data['head'], data['deprel']

nodes = ['ROOT'] + word
Expand Down

0 comments on commit 1ceaa81

Please sign in to comment.