From 3bafb2cf11b0f2780b01c5a49db32940c8ed3c2f Mon Sep 17 00:00:00 2001 From: hankcs Date: Fri, 6 Dec 2024 21:03:25 -0800 Subject: [PATCH] Fix `dep` key of `to_pretty` --- plugins/hanlp_common/hanlp_common/document.py | 2 +- plugins/hanlp_common/setup.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/hanlp_common/hanlp_common/document.py b/plugins/hanlp_common/hanlp_common/document.py index c23113f79..a088874ca 100644 --- a/plugins/hanlp_common/hanlp_common/document.py +++ b/plugins/hanlp_common/hanlp_common/document.py @@ -208,7 +208,7 @@ def to_pretty(self, tok='tok', lem='lem', pos='pos', dep='dep', sdp='sdp', ner=' tok = prefix_match(tok, self) pos = prefix_match(pos, self) ner = prefix_match(ner, self) - conlls = self.to_conll(tok, lem, pos, dep, sdp) + conlls = self.to_conll(tok=tok, lem=lem, pos=pos, dep=dep, sdp=sdp) flat = isinstance(conlls, CoNLLSentence) if flat: conlls: List[CoNLLSentence] = [conlls] diff --git a/plugins/hanlp_common/setup.py b/plugins/hanlp_common/setup.py index c11f26d01..bfddc9658 100644 --- a/plugins/hanlp_common/setup.py +++ b/plugins/hanlp_common/setup.py @@ -10,7 +10,7 @@ setup( name='hanlp_common', - version='0.0.21', + version='0.0.22', description='HanLP: Han Language Processing', long_description=long_description, long_description_content_type="text/markdown", diff --git a/setup.py b/setup.py index 426336f94..9344cd9fc 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ 'transformers>=4.1.1', 'sentencepiece>=0.1.91', # Essential for tokenization_bert_japanese 'torch>=1.6.0', - 'hanlp-common>=0.0.21', + 'hanlp-common>=0.0.22', 'hanlp-trie>=0.0.4', 'hanlp-downloader', *TOKENIZERS,