PYTHON QUESTION! Stemming is a process of converting any given words to its root form (whatever that may be). There are
Posted: Wed Apr 27, 2022 3:39 pm
PYTHON QUESTION!
Stemming is a process of converting any given words to its root
form (whatever that may be). There are many good stemmers out
there, but here, we will write our own stemmer.
Write a function pos(sentence) (no, it stands
for pretty okay stemmer as titled) which takes
an input parameter sentence (type string),
and returns a string that stemmed all words from the
given sentence. Each word should be stemmed as much as possible.
The following stemming rules are implemented (list is quite long
with exceptions, so take time to digest):
Note1: vowels contain letter 'y'.
Note2: As you can see, not all stemming rules would actually
result in proper root word (e.g., cutt, supposedly -> suppos
etc.), but this will do for this assignment.
Note3: Use the 'POS Checker' on Moodle to check various cases to
see if your function output matches the expected output (Try think
of as many cases as you need!).
For example:
Stemming is a process of converting any given words to its root
form (whatever that may be). There are many good stemmers out
there, but here, we will write our own stemmer.
Write a function pos(sentence) (no, it stands
for pretty okay stemmer as titled) which takes
an input parameter sentence (type string),
and returns a string that stemmed all words from the
given sentence. Each word should be stemmed as much as possible.
The following stemming rules are implemented (list is quite long
with exceptions, so take time to digest):
Note1: vowels contain letter 'y'.
Note2: As you can see, not all stemming rules would actually
result in proper root word (e.g., cutt, supposedly -> suppos
etc.), but this will do for this assignment.
Note3: Use the 'POS Checker' on Moodle to check various cases to
see if your function output matches the expected output (Try think
of as many cases as you need!).
For example: