Article.py: remove debug statement.

Bug509-XieQiuHan-WangZiming
Hui Lan 2023-03-30 16:10:22 +08:00
parent 0c16a4dc6f
commit 4417cf7017
1 changed files with 1 additions and 2 deletions

View File

@ -59,7 +59,6 @@ def get_today_article(user_word_list, existing_articles):
text_level = text_difficulty_level(reading['text'], d3) text_level = text_difficulty_level(reading['text'], d3)
factor = random.gauss(0.8, factor = random.gauss(0.8,
0.1) # a number drawn from Gaussian distribution with a mean of 0.8 and a stand deviation of 1 0.1) # a number drawn from Gaussian distribution with a mean of 0.8 and a stand deviation of 1
print("factor:{}, text_level:{}, user_level:{}, range:{}".format(factor, text_level, user_level, (8.0 - user_level) * factor))
if reading['article_id'] not in existing_articles[1] and within_range(text_level, user_level, (8.0 - user_level) * factor): # 新的文章之前没有出现过且符合一定范围的水平 if reading['article_id'] not in existing_articles[1] and within_range(text_level, user_level, (8.0 - user_level) * factor): # 新的文章之前没有出现过且符合一定范围的水平
d = reading d = reading
existing_articles[1].append(d['article_id']) # 列表添加新的文章id下面进行 existing_articles[1].append(d['article_id']) # 列表添加新的文章id下面进行
@ -125,4 +124,4 @@ def get_answer_part(s):
flag = 1 flag = 1
elif flag == 1: elif flag == 1:
result.append(line) result.append(line)
return '\n'.join(result) return '\n'.join(result)