-
Notifications
You must be signed in to change notification settings - Fork 2
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
단어가 없는 발음을 기준으로 단어를 추가하는 테스크 추가하기 #44
Conversation
de81b1f
to
c3e862b
Compare
c3e862b
to
0d0874a
Compare
리뷰 전부 반영했습니다~ |
0d0874a
to
5d482d3
Compare
word_way/scrapping/word.py
Outdated
).all() | ||
for pronunciation in pronunciations: | ||
pronunciation_id = save_word(pronunciation.pronunciation, session) | ||
if pronunciation.id != pronunciation_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이상한 단어인 경우 저장할 단어가 없어서 삭제하는 건가요?
맞다면 row를 삭제한는 것보다 컬럼을 추가해서 이미 저장하려고 시도해봤지만 저장할 것이 없었다는 플래그를 주는게 더 좋지 않을까요?
이유는 삭제했는데 그 발음이 문장을 파싱하면서 다시 추가 될 것이고 그럼 다시 단어 정보가 없어서 삭제할 것이고 이것을 반복할텐데 리소스 낭비일 것 같아서요.
다만 걱정되는 것은 과거에는 특정 발음에 대한 정보가 없었지만, 나중에는 생기는 경우
한번 플래그가 바뀌어서 다시 의미를 추가하지 않으려고 할 수 도 있을 것 같아요.
근데 아래 문제는 나중에 주기적으로 플래그를 지운다거나 하는 식으로 해결 할 수 있을 것 같아서 큰 문제는 되지 않을 것 같아서 컬럼으로 구분하는것이 어떨까합니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다음이 변경되었습니다.
- Pronunciation에 scrapped_at 컬럼 추가
- 스크래핑할 때 해당 컬럼 업데이트
- 없는 단어 검색할 때 scrapped_at이 null인 조건 추가
저번에는 떠오르지 않았지만 다시보니 떠오르는 코멘트,,, 쏘 쏘리,, |
쏘 새드... 담주에 반영할게욥!! |
5d482d3
to
5905362
Compare
5905362
to
1c4abc1
Compare
tldr;
단어가 없는 발음을 기준으로 단어를 추가하는 테스크 추가하기
주요 변경 사항
단어가 없는 발음을 가져와서 단어를 추가하는 save_words_task 테스크를 추가합니다.