更新分类题号字典生成功能, 并修复一个bug
This commit is contained in:
parent
284535e6fc
commit
310b5ecee3
|
|
@ -1,13 +1,12 @@
|
|||
original_id_list = "1:50000"
|
||||
|
||||
import re,json
|
||||
suffix_words = ["试题"]
|
||||
suffix_words = ["试题",r"第[\d]*题"]
|
||||
|
||||
def strip_suffix(problem, suf_words):
|
||||
origin = problem["origin"]
|
||||
for sw in suf_words:
|
||||
if sw in origin:
|
||||
origin = re.sub(sw+r"[\d]*$","",origin)
|
||||
origin = re.sub(sw+r"[\S]*$","",origin)
|
||||
return(origin)
|
||||
|
||||
def generate_number_set(string):
|
||||
|
|
|
|||
Reference in New Issue