From 534af3eb08cd44badef11f49d585eb908946267c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=80=80=E9=A3=9E?= Date: Thu, 8 Jul 2021 16:28:26 +0800 Subject: [PATCH] bump version to 0.9.10 bugfix for doc_extractor --- nlpir/__init__.py | 2 +- nlpir/doc_extractor.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nlpir/__init__.py b/nlpir/__init__.py index 1cf6b1f..f14df4e 100644 --- a/nlpir/__init__.py +++ b/nlpir/__init__.py @@ -7,7 +7,7 @@ import functools from .exception import NLPIRException -__version__ = "0.9.9" +__version__ = "0.9.10" PACKAGE_DIR = os.path.abspath(os.path.dirname(__file__)) logger = logging.getLogger("nlpir") diff --git a/nlpir/doc_extractor.py b/nlpir/doc_extractor.py index 678fe90..5b2e376 100644 --- a/nlpir/doc_extractor.py +++ b/nlpir/doc_extractor.py @@ -72,8 +72,8 @@ def __init__(self, handle: int, user_retrieve_type: typing.List[str]): } self.re_sharp_split = re.compile(r"([^#]+)#"), lambda _: {0: _} - self.re_key_words = re.compile(r"(.+?)/([a-z0-9A-Z]+?)/([.\d]+?)/(\d+)?#"), lambda _: {0: _[0], 1: _[1], - 2: _[2], 3: _[3]} + self.re_key_words = re.compile(r"([^/^#]+)/([^/^#]+)/([.\d]+?)/(\d+)?#"), lambda _: {0: _[0], 1: _[1], + 2: _[2], 3: _[3]} self.re_weight = re.compile(r"(.+?)/(\d+)#"), lambda _: {0: _[0], 2: _[1]} self.re_none = re.compile("(.+)"), lambda _: {0: _} self.re_result_map = {