

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
Now that we have a list of tokens, we need to decide which ones are actually useful for search. Not all tokens are created equal...
These are examples of stop words: common words that usually don't add much meaning. In short, we're going to remove them.
Our goal is to match words from the user's input to words in our dataset. If we don't remove stop words, we can get some pretty misleading results. Here's an example:
User query: "the bear"
Results:
Oof! Both movies match, but "Jungle Bear" is clearly more relevant. "The Terminator" matches only on a low-value stop word.
Remove stop word tokens from both the user query and the title tokens.
.read() the file.splitlines() to split it into a list of wordsaren't should become arent before you compare tokens against it!Run and submit the CLI tests.
a
about
above
after
again
against
ain
all
am
an
and
any
are
aren
aren't
as
at
be
because
been
before
being
below
between
both
but
by
can
couldn
couldn't
d
did
didn
didn't
do
does
doesn
doesn't
doing
don
don't
down
during
each
few
for
from
further
had
hadn
hadn't
has
hasn
hasn't
have
haven
haven't
having
he
he'd
he'll
he's
her
here
hers
herself
him
himself
his
how
i
i'd
i'll
i'm
i've
if
in
into
is
isn
isn't
it
it'd
it'll
it's
its
itself
just
ll
m
ma
me
mightn
mightn't
more
most
mustn
mustn't
my
myself
needn
needn't
no
nor
not
now
o
of
off
on
once
only
or
other
our
ours
ourselves
out
over
own
re
s
same
shan
shan't
she
she'd
she'll
she's
should
should've
shouldn
shouldn't
so
some
such
t
than
that
that'll
the
their
theirs
them
themselves
then
there
these
they
they'd
they'll
they're
they've
this
those
through
to
too
under
until
up
ve
very
was
wasn
wasn't
we
we'd
we'll
we're
we've
were
weren
weren't
what
when
where
which
while
who
whom
why
will
with
won
won't
wouldn
wouldn't
y
you
you'd
you'll
you're
you've
your
yours
yourself
yourselves