修复分母为 0 的问题,增加适当的异常处理

使用正则表达式处理标点符号
改进变量命名,提高代码可读性
定义常量替代魔术数字
添加输入验证和错误处理
移除冗余代码
优化性能
pull/208/head
Desuver 2025-06-04 23:06:26 +08:00
parent 4839c45414
commit f7fd0a0271
1 changed files with 0 additions and 1 deletions

View File

@ -150,4 +150,3 @@ if __name__ == '__main__':
article_estimator = ArticleVocabularyLevel(article_content)
article_level = article_estimator.level
print(f"文章难度等级:{article_level:.2f}")
# 从错误分支feature/temp-vocab获取 vocabulary.py 的修改