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 = {