改进评级用户level #44

Closed
zhangweihao wants to merge 6 commits from Bug476-ZhangWeiHao into master

增加一个功能,使生词表中的单词的变形例如复数被识别为同一个单词,准确评级用户的level(使其在判定单词时不受单词的变形影响而错判为高等级词汇)。 把同一个单词的不同形式看作是同一个单词。

增加一个功能,使生词表中的单词的变形例如复数被识别为同一个单词,准确评级用户的level(使其在判定单词时不受单词的变形影响而错判为高等级词汇)。 把同一个单词的不同形式看作是同一个单词。
zhangweihao added 1 commit 2022-06-13 19:59:20 +08:00
zhangweihao added 1 commit 2022-06-13 20:40:00 +08:00
wangzhihao reviewed 2022-12-06 18:07:59 +08:00
@ -81,3 +103,4 @@
geometric = 1
for date in sorted(d_user2.keys(), reverse=True): # most recently added words are more important while determining user's level
lst = d_user2[date] # a list of words
#print(lst)

注释掉的代码应该及时删掉,不要在提交的时候还留着。

注释掉的代码应该及时删掉,不要在提交的时候还留着。
wangzhihao reviewed 2022-12-06 18:47:00 +08:00
@ -78,0 +87,4 @@
change_word=word[:-1]
elif word.endswith('ed'):
change_word=word[:-2]
elif word.endswith('en'):

英文单词很多很复杂,简单地根据后缀特征来判断是否为同一个单词是不严谨的,例如:
对been这个单词执行操作,change_word=bean,那么在94行的循环中,如果d中含有bean这个单词,lst1[index]就会存储bean,就无法把been加入生词库。

英文单词很多很复杂,简单地根据后缀特征来判断是否为同一个单词是不严谨的,例如: 对been这个单词执行操作,change_word=bean,那么在94行的循环中,如果d中含有bean这个单词,lst1[index]就会存储bean,就无法把been加入生词库。
xuxuan reviewed 2022-12-13 21:05:25 +08:00
@ -78,0 +95,4 @@
if change_word==word2:
lst1[index]=change_word
break
return lst1

在英语中,一个单词可能会存在多种形式,有些是规则的,有些是不规则的,这样简单的来判断是不够值得信任的,比如说leaf的复数是leaves,通过上述规则是无法判断的。可以通过python的一些库来实现把一个词汇还原为一般形式。

在英语中,一个单词可能会存在多种形式,有些是规则的,有些是不规则的,这样简单的来判断是不够值得信任的,比如说leaf的复数是leaves,通过上述规则是无法判断的。可以通过python的一些库来实现把一个词汇还原为一般形式。
zenovio added 141 commits 2023-05-10 00:14:26 +08:00
9d420acd8b [REFACTOR] user_service.py: Added id to user name, word and frequency for click to execute AJAX request in JS (#30)
1. Add jquery.js and word_operation.js to the static folder.

2. Changed the return type of the familiar, unfamiliar and deleteword methods of user_service.py.
    ```
    original: return redirect(url_for('userpage', username=username))
    now: return "success"
    ```
3. In order to get elements in JS to make ajax requests we add ids in userpage_get.html for familiar, unfamiliar, delete buttons and so on.

4. When the user's word book was retrieved, the list returned was already sorted in descending order of frequency, so redundant code was removed in userpage_get.html.

Co-authored-by: PeterQiu <www.1392993990@qq.com>
Co-authored-by: Lan Hui <1348141770@qq.com>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/30
Co-authored-by: 邱忠辉 <1392993990@qq.com>
Co-committed-by: 邱忠辉 <1392993990@qq.com>
c21659ba7e Bug477 重构 and 增加功能 (#48)
Co-authored-by: cjybyjk <cjybyjk@zjnu.edu.cn>
Co-authored-by: Lan Hui <1348141770@qq.com>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/48
Co-authored-by: 陈靖毅 <cjybyjk@zjnu.edu.cn>
Co-committed-by: 陈靖毅 <cjybyjk@zjnu.edu.cn>
2c1bc98833 Bug422-XuXing (#46)
增加了返回上一篇的按钮及相关功能的实现,当点击下一篇文章跳转至下一篇时,页面中会增加一个返回上一篇按钮,点击返回上一篇按钮后可以回到上一篇。

Co-authored-by: Lan Hui <1348141770@qq.com>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/46
Co-authored-by: 徐幸 <2567198082@qq.com>
Co-committed-by: 徐幸 <2567198082@qq.com>
ab01b8e19b Hui-Build (#55)
Make English Pal docker run automatically each time after Ubuntu reboot.

Hui

Co-authored-by: Hui Lan <lanhui@zjnu.edu.cn>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/55
Co-authored-by: mrlan <mrlan@noreply.121.4.94.30>
Co-committed-by: mrlan <mrlan@noreply.121.4.94.30>
671df67723 Bug487-WuYuhan-Refactor (#58)
将所有用于用户名验证的逻辑放入到 `UserName` 类中。

Hui

Co-authored-by: Lan Hui <1348141770@qq.com>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/58
Co-authored-by: mrlan <mrlan@noreply.121.4.94.30>
Co-committed-by: mrlan <mrlan@noreply.121.4.94.30>
5c85041135 Bug 512 - 文章朗读问题
在fillwowrd.js中添加了stopRead()函数,将其添加给对应按钮或超链接以终止朗读。
e74f1ff477 Bug505-ZhangYiteng (#61)
bug修改只涉及到account_service.py中新增的5行。
其他增删都是重写reset.html(页面样式和login、signup页面相一致),并将reset、signup、login三个页面的共同样式抽离出独立的css文件。

Co-authored-by: Q_yt <2483750517@qq.com>
Co-authored-by: Hui Lan <lanhui@zjnu.edu.cn>
Reviewed-on: http://121.4.94.30:3000/mrlan/EnglishPal/pulls/61
Co-authored-by: 张艺腾 <2483750517@qq.com>
Co-committed-by: 张艺腾 <2483750517@qq.com>

Thanks.

Please ask your teammates to do code review.

Hui

Thanks. Please ask your teammates to do code review. Hui

Thanks.

Please ask your teammates to do code review.

Hui

Thank you.

Code review already done

> Thanks. > > Please ask your teammates to do code review. > > Hui Thank you. Code review already done
mrlan reviewed 2023-05-22 17:01:27 +08:00
@ -78,0 +79,4 @@
def stem_words(list_of_words): # It reduces words to the root word (eg. ate, eaten -> eat; leaves, leaf -> leaf)
wnl = WordNetLemmatizer()
lst1 = [wnl.lemmatize(w) for w in list_of_words]
return [wnl.lemmatize(w, pos='v') for w in lst1] # stem by verb: 'v' represents verb

@zenovio

Thanks. What if a word is not a verb? Does adding the extra Part of Speech option 'v' affect the outcome?

Hui

@zenovio Thanks. What if a word is not a verb? Does adding the extra Part of Speech option 'v' affect the outcome? Hui

We have a much better solution (see pull request 85).

We have a much better solution (see pull request 85).
mrlan closed this pull request 2023-07-08 17:33:47 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
6 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#44
There is no content yet.