Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category labeling mechanism API implementation #143

Closed
3 of 5 tasks
MrOrz opened this issue Feb 5, 2020 · 1 comment · Fixed by #155
Closed
3 of 5 tasks

Category labeling mechanism API implementation #143

MrOrz opened this issue Feb 5, 2020 · 1 comment · Fixed by #155

Comments

@MrOrz
Copy link
Member

MrOrz commented Feb 5, 2020

完成 Cofacts crowd-source label mechanism API(含 unit test、DB migration)。

  • 與 AI module 對接 AI 自動分類與 confidence level,在新文章送入時(CreateArticle API),取得 AI 自動分類,加進文章中。
  • 修改現有 ListArticle 參數,支援 filter by category
  • 修改 Article object type 的 field 與新增 Category object type,提供:(1) AI 自動分類、群眾協作分類 (2) 各個 AI 自動分類的 confidence level (3) 群眾的 upvote / downvote rate
  • 新增 category 相關的 mutation API,功能為讓編輯可以標記 category (CreateArticleCategory)、針對 article-category 關係 upvote / downvote (CreateOrUpdateArticleCategoryFeedback)、刪除或恢復自己標記的 category(UpdateArticleCategoryStatus
  • RSS API 支援 filter by category

Related

Full discussion: https://hackmd.io/SR5H5bYVRUGCYXF8ch7doQ
Past discussions on meeting notes:

@MrOrz
Copy link
Member Author

MrOrz commented Feb 29, 2020

紀錄討論

遇到一個使用者加分類的問題,就是:如果使用者 A 把訊息加上 category C 然後又刪掉,這樣資料庫裡會有一個 articleCategory 是 C 然後 status 是 DELETED
那 A 還可以把 C 加回來嗎?直接把原本的 DELETED 變回來?那相對應的 articleCategoryFeedback 也持續存在囉?
在 A 還沒復原 C 的狀況下,如果使用者 B 也要來把同一篇訊息加上 category C,這樣要插入一個新的 articleCategory 還是把原本被刪除的 articleCategory 搶過來給 B 然後改 status?如果是新的 articleCategory,那 articleCategoryFeedback 要重新計算嗎?

如果我們不要有 status 呢?刪掉就刪掉了

有 status 的好處是
如果走「復原」或是「把原本被刪除的 articleCategory 搶過來給 B 然後改 status」的路
那 feedback 也可以適用
想像一篇訊息如果被標農業相關
但被 5 個人覺得無關
標記人自刪之後
另一個人如果又跑來標成農業,然後 downvote 又全部重算
之前那 5 個 downvote 的人一定很幹

嗯這樣的話,我覺得我們這樣定義 articleCategory 的裡面的屬性,status 是紀錄這個 category 是 on/off (NORMAL/DELETED),userId 則表示最後一次「更改」的人是誰

articleCategoryFeedback 不會因為這個 category 是 on/off 有所變動,而消失,> articleCategoryFeedback 是使用者針對這個 category 有沒有用而給的,即使後來被關掉它還是個 feedback
所以 articleCategoryFeedback 會持續存在,articleCategory 的 userId 會被最後一個「更改」的人搶走

@MrOrz MrOrz linked a pull request Mar 24, 2020 that will close this issue
[Cofacts Next] Category labeling mechanism / 自動與協作議題標記 automation moved this from In progress to Done (Staging) Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants