Tokens
Introduction to Information Retrieval
Introduction to
Information Retrieval
Tokenization
Sec. 2.2.1
Introduction to Information Retrieval
Tokenization
Finland AND s? Finlands? Finland’s?
Sec. 2.2.1
Introduction to Information Retrieval
Numbers
Sec. 2.2.1
Introduction to Information Retrieval
Tokenization: language issues
Sec. 2.2.1
Introduction to Information Retrieval
Tokenization: language issues
フォーチュン500社は情報不足のため時間あた$500K(約6,000万円)
Katakana
Hiragana
Kanji
Romaji
End-user can express query entirely in hiragana!
Sec. 2.2.1
Introduction to Information Retrieval
Tokenization: language issues
Sec. 2.2.1
Introduction to Information Retrieval
Document ingestion
Introduction to Information Retrieval
Introduction to
Information Retrieval
Recall the basic indexing pipeline
Tokenizer
Token stream
Friends
Romans
Countrymen
Linguistic modules
Modified tokens
friend
roman
countryman
Indexer
Inverted index
friend
roman
countryman
2
4
2
13
16
1
Documents to
be indexed
Friends, Romans, countrymen.
Introduction to Information Retrieval
Parsing a document
Each of these is a classification problem, which we will study later in the course.
But these tasks are often done heuristically …
Sec. 2.1
Introduction to Information Retrieval
Complications: Format/language
Sec. 2.1
Introduction to Information Retrieval
Complications: What is a document?
We return from our query “documents” but there are often interesting questions of grain size:
What is a unit document?
Sec. 2.1
Introduction to Information Retrieval
Terms
The things indexed in an IR system
Introduction to Information Retrieval
Introduction to
Information Retrieval
Stop words
Sec. 2.2.2
Introduction to Information Retrieval
Normalization to terms
Sec. 2.2.3
Introduction to Information Retrieval
Normalization: other languages
Sec. 2.2.3
Introduction to Information Retrieval
Normalization: other languages
Morgen will ich in MIT …
Is this
German “mit”?
Sec. 2.2.3
Introduction to Information Retrieval
Case folding
Sec. 2.2.3
Introduction to Information Retrieval
Normalization to terms
Sec. 2.2.3
Introduction to Information Retrieval
Thesauri and soundex
Introduction to Information Retrieval
Stemming and Lemmatization
Introduction to Information Retrieval
Introduction to
Information Retrieval
Lemmatization
Sec. 2.2.4
Introduction to Information Retrieval
Stemming
for example compressed
and compression are both
accepted as equivalent to
compress.
for exampl compress and
compress ar both accept
as equival to compress
Sec. 2.2.4
Introduction to Information Retrieval
Porter’s algorithm
Sec. 2.2.4
Introduction to Information Retrieval
Typical rules in Porter
Sec. 2.2.4
Introduction to Information Retrieval
Other stemmers
Sec. 2.2.4
Introduction to Information Retrieval
Language-specificity
Sec. 2.2.4
Introduction to Information Retrieval
Does stemming help?
Sec. 2.2.4
Introduction to Information Retrieval
Faster postings merges:�Skip pointers/Skip lists
Introduction to Information Retrieval
Introduction to
Information Retrieval
Recall basic merge
128
31
2
4
8
41
48
64
1
2
3
8
11
17
21
Brutus
Caesar
2
8
If the list lengths are m and n, the merge takes O(m+n)
operations.
Can we do better?
Yes (if the index isn’t changing too fast).
Sec. 2.3
Introduction to Information Retrieval
Augment postings with skip pointers (at indexing time)
128
2
4
8
41
48
64
31
1
2
3
8
11
17
21
31
11
41
128
Sec. 2.3
Introduction to Information Retrieval
Query processing with skip pointers
128
2
4
8
41
48
64
31
1
2
3
8
11
17
21
31
11
41
128
Suppose we’ve stepped through the lists until we process 8 on each list. We match it and advance.
We then have 41 and 11 on the lower. 11 is smaller.
But the skip successor of 11 on the lower list is 31, so
we can skip ahead past the intervening postings.
Sec. 2.3
Introduction to Information Retrieval
Where do we place skips?
Sec. 2.3
Introduction to Information Retrieval
Placing skips
Sec. 2.3
Introduction to Information Retrieval