여기서 문서를 나타내는 벡터의 각 원소들은 단어 토큰이 문서에 몇 번 나타나는지 세어 계산
되지만 마지막에는 해당 토큰이 포함된 문서의 수로 나눈다.
이 아이디어는 어떤 문서에서 특정 단어가 많이 나타나고 다른 문서에서는 그렇지 않은 경우
특정 단어가 해당 문서에서 중요한 것이어야 하며 이 문서를 나타내는 벡터에서 해당 원소가
더 높은 값을 가져야 한다는 것에서 출발했다.
만약 특정 단어가 어떤 문서에도 나타나지 않을 경우
0
으로 나누는 것을 피하기 위해 분모
에
1
을 더하는 것이 일반적이다. 예를 들어 ‘고양이’라는 토큰의 역문서 빈도
inverse
document
frequency
(
IDF
)는 다음과 같다.
IDF
for
고양이
=
number
of
documents
in
corpus
number
of
documents
containing
고양이
+
1
TF
-
IDF
표현을 사용하면 문서 벡터의 원소는 음수가 아닌 유리수가 되고 각 원소는 문서에서
특정 토큰의 중요도로 볼 수 있다. 마지막으로 이전 섹션들에서 설명한 것과 같은 이유로 이 벡
터의 각 원소에 로그를 취한다.
정보 검색 시스템과 관련하여
Okapi
BM25
141
와
Molino ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.