PYTHON QUESTION! Stemming is a process of converting any given words to its root form (whatever that may be). There are

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

PYTHON QUESTION! Stemming is a process of converting any given words to its root form (whatever that may be). There are

Post by answerhappygod »

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:
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply