***PYTHON CHALLENGING CODING QUESTION*** Stemming is a process of converting any given words to its root form (whatever
Posted: Fri Apr 29, 2022 6:42 am
***PYTHON CHALLENGING CODING 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!).
>>>>>>>>>>>Bit of a tough
question, I would greatly appreciate some guidance!
Here are the test cases:
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!).
>>>>>>>>>>>Bit of a tough
question, I would greatly appreciate some guidance!
Here are the test cases: