. Stemming is a process of converting any given words to its root form (whatever that may be). There are many good stemm

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

. Stemming is a process of converting any given words to its root form (whatever that may be). There are many good stemm

Post by answerhappygod »

Stemming Is A Process Of Converting Any Given Words To Its Root Form Whatever That May Be There Are Many Good Stemm 1
Stemming Is A Process Of Converting Any Given Words To Its Root Form Whatever That May Be There Are Many Good Stemm 1 (45.33 KiB) Viewed 26 times
. 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): Remove all ownerships • Singular ownerships (e.g, it's -> it) o Plural ownerships (e.g, theirs' -> their) • Remove plurals • Any words ending with 's' should remove it (e.g., gaps' -> 'gap', 'runs' -> "run") • Any words ending with a vowel after removing 's' are excepted (e.g., 'gas', 'this', 'has") Any words that has no vowels are excepted (e.g., 'CMPS, 'BTS") Any words ending with 'us' or 'ss' are excepted (e.g., 'census', 'chess") Any words ending with 'sses' should be converted to 'ss' (e.g., presses' -> 'press) • Any words ending with 'ies' should be converted to 'i' unless the length of the stemmed word is less than or equal to 2 (e.g., 'cries' -> 'cri', 'ties' -> 'tie') Any words ending with 'ves' should be removed and converted to 'f unless the length of the stemmed word is less than or equal to 2, in which case instead convert to 'fe' (e.g., "leaves' => 'leaf, 'wives' => 'wife") • Remove past tense Any words ending with 'ed' should remove it (e.g., "burned' -> 'burn', 'owned' -> 'own') Any words ending with 'ied' should be converted to i unless the length of the stemmed word is less than or equal to 2 (e.g., 'cried' -> 'cri', 'tied' => 'tie") Remove adjectives Any words ending with 'er' should remove it (e.g., "fuller' -> 'full', 'hanger' -> 'hang) • Remove verbs Any words ending with 'ing' should remove it (e.g., 'singing' -> 'sing', 'cutting' -> 'cuit') If the stemmed word length is less than 3 after removing 'ing, it should retain it (e.g., "bring') • Remove adverbs Any words ending with 'ly should remove it (e.g., 'greatly' -> 'great", "fully' -> 'ful") Note1: vowels contain lettery.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply