From 579a575087fb0aa38151df252a5b1d6bca7f94ad Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Fri, 19 Dec 2025 12:15:03 +0800 Subject: [PATCH] 0.1.194 --- PyPI/setup.cfg | 2 +- PyPI/src/guan/data_processing.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index d5c6354..f68adc5 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.1.193 +version = 0.1.194 author = guanjihuan author_email = guanjihuan@163.com description = An open source python package diff --git a/PyPI/src/guan/data_processing.py b/PyPI/src/guan/data_processing.py index 3d378e9..56c1716 100644 --- a/PyPI/src/guan/data_processing.py +++ b/PyPI/src/guan/data_processing.py @@ -88,7 +88,7 @@ def word_diff(a, b, print_show=1): jieba.setLogLevel(logging.ERROR) a_words = jieba.lcut(a) b_words = jieba.lcut(b) - sm = difflib.SequenceMatcher(None, a_words, b_words) + sm = difflib.SequenceMatcher(None, a_words, b_words, autojunk=False) result = [] for tag, i1, i2, j1, j2 in sm.get_opcodes(): if tag == "equal": @@ -115,7 +115,7 @@ def word_diff_to_html(a, b, filename='diff_result', write_file=1): jieba.setLogLevel(logging.ERROR) a_words = jieba.lcut(a) b_words = jieba.lcut(b) - sm = difflib.SequenceMatcher(None, a_words, b_words) + sm = difflib.SequenceMatcher(None, a_words, b_words, autojunk=False) html_parts = [] for tag, i1, i2, j1, j2 in sm.get_opcodes(): if tag == "equal":