请老师查阅我们组更新的vocabulary.py #198

Open
chenjia wants to merge 1 commits from Bug585-ChenJia into Alpha-snapshot20240618

陈佳组的大作业提交

陈佳组的大作业提交
chenjia added 1 commit 2025-05-29 15:02:12 +08:00
chenjia changed title from 请老师查阅我们组更新的vocabulary.py to 请老师查阅我们组更新的vocabulary.py 2025-05-29 15:07:45 +08:00
chenjia changed title from 请老师查阅我们组更新的vocabulary.py to WIP: 请老师查阅我们组更新的vocabulary.py 2025-05-29 16:24:28 +08:00
chenjia changed title from WIP: 请老师查阅我们组更新的vocabulary.py to 请老师查阅我们组更新的vocabulary.py 2025-05-29 16:31:32 +08:00
chenjia reviewed 2025-06-02 22:43:22 +08:00
chenjia reviewed 2025-06-02 22:44:42 +08:00
@ -0,0 +3,4 @@
import os
def read_pickle(file_name):

直接加载pickle文件可能存在安全风险,建议添加对pickle内容的验证或使用更安全的序列化格式。

直接加载pickle文件可能存在安全风险,建议添加对pickle内容的验证或使用更安全的序列化格式。
chenjia reviewed 2025-06-02 22:46:28 +08:00
@ -0,0 +12,4 @@
return pickle.load(f)
class VocabularyLevelEstimator:

VocabularyLevelEstimator作为基类的设计合理,但可以考虑使用抽象基类(ABC)来明确接口。

VocabularyLevelEstimator作为基类的设计合理,但可以考虑使用抽象基类(ABC)来明确接口。
chenjia reviewed 2025-06-02 22:47:55 +08:00
@ -0,0 +80,4 @@
self.article_text = article_text
# Extract valid words and strip punctuation.
self.words = [
word.strip(string.punctuation)

文章水平处理时对每个单词都调用strip(string.punctuation),可以考虑预编译punctuation模式。

文章水平处理时对每个单词都调用strip(string.punctuation),可以考虑预编译punctuation模式。
liyuanyi scheduled this pull request to auto merge when all checks succeed 2025-06-24 15:04:23 +08:00
This Pull Request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrlan/EnglishPal#198
There is no content yet.