

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Retrieval Augmented Generation
incomplete
2: What Is Search?
incomplete
3: Project Overview
incomplete
4: Keyword Search
incomplete
5: Text Processing
incomplete
6: Punctuation
incomplete
7: Tokenization
incomplete
8: Stop Words
incomplete
9: Stemming
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Tokenization means splitting text into smaller pieces, called tokens. Simple word-based tokenization looks like this:
"The Matrix is a great movie!"["the", "matrix", "is", "a", "great", "movie"]Many tokenization methods exist, but we'll use word-based tokenization for keyword search. We already handled case insensitivity and punctuation removal in the previous steps.
You might hear that "tokens" in the context of LLMs don't map one-to-one with words, and that's true, so don't let that trip you up here.
We want Webflyx users to be able to search for partial matches, not just exact full-query substrings. For example, the query "Great Bear" should match the title "Big Bear" because the bear token appears in both.
Wrap this logic in a helper function! You'll need to apply the exact same processing throughout the course.
.split() on whitespaceCall .split() without an argument. Passing " " only splits literal spaces, not all whitespace.
Run and submit the CLI tests.