PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Natural Language Processing (NLP): Tokenization, Stopwords, Stemming (NLP बेसिक्स: टोकनाइज़ेशन, स्टॉपवर्ड्स हटाना और स्टेमिंग) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Natural Language Processing (NLP) preprocessing transforms unstructured raw text into clean, normalized linguistic units using tokenization, stopword filtering, stemming, and lemmatization. Choosing between rule-based stemming, dictionary-aware lemmatization, and subword tokenization (like BPE) directly shapes downstream vocabulary size, OOV resilience, and semantic accuracy.
अध्याय सार: नेचुरल लैंग्वेज प्रोसेसिंग (NLP) प्रीप्रोसेसिंग टोकनाइज़ेशन, स्टॉपवर्ड्स हटाने, स्टेमिंग और लेमेटाइजेशन द्वारा अनस्ट्रक्चर्ड टेक्स्ट को स्वच्छ और मानकीकृत इकाइयों में बदलती है। रूल-आधारित स्टेमिंग, डिक्शनरी-आधारित लेमेटाइजेशन और सबवर्ड टोकनाइज़ेशन (जैसे BPE) का चुनाव मॉडल के शब्दकोश आकार, OOV प्रबंधन और सटीकता को सीधे प्रभावित करता है।
Natural Language Processing (NLP): Tokenization, Stopwords, Stemming: Detailed Notes & Architecture (NLP बेसिक्स: टोकनाइज़ेशन, स्टॉपवर्ड्स हटाना और स्टेमिंग)
1. Text Normalization and Tokenization Strategies (टेक्स्ट नॉर्मलाइजेशन और टोकनाइज़ेशन रणनीतियाँ)
[EN] Tokenization splits raw character streams into discrete chunks called tokens—at sentence, word, character, or subword granularity. Basic whitespace/punctuation splitting works poorly on contractions ('don't'), hyphenated words, or agglutinative languages and creates huge vocabularies plagued by Out-Of-Vocabulary (OOV) unknown tokens at test time. Modern NLP solves OOV cleanly using subword algorithms: Byte-Pair Encoding (BPE, used in GPT) iteratively merges the most frequent adjacent symbol pairs, WordPiece (used in BERT) maximizes language-model likelihood, and SentencePiece handles raw text without pre-tokenizing spaces. Alongside tokenization, case folding (lowercasing), Unicode normalization (NFC/NFKC), and noise removal standardize surface variations.
[HI] टोकनाइज़ेशन कच्चे टेक्स्ट को वाक्य, शब्द, अक्षर या सबवर्ड स्तर पर अलग-अलग इकाइयों (tokens) में तोड़ता है। केवल स्पेस से विभाजन संक्षिप्त शब्दों ('don't') में विफल रहता है और टेस्टिंग में Out-Of-Vocabulary (OOV) समस्या पैदा करता है। आधुनिक NLP इसके लिए सबवर्ड टोकनाइज़र्स का उपयोग करता है: Byte-Pair Encoding (BPE, GPT में प्रयुक्त) सबसे आम अक्षर जोड़ों को मर्ज करता है, WordPiece (BERT में) संभावना अधिकतम करता है और SentencePiece बिना स्पेस प्री-टोकनाइज़ेशन के काम करता है। इसके साथ लोअरकेसिंग और यूनिकोड नॉर्मलाइजेशन टेक्स्ट को एकरूप बनाते हैं।
2. Stopword Removal and Task-Specific Caveats (स्टॉपवर्ड्स हटाना और कार्य-विशेष सावधानियाँ)
[EN] Stopwords are high-frequency closed-class function words—such as 'the', 'is', 'in', 'at', 'of', and 'and'—that appear across nearly all documents while contributing minimal topical discrimination. Removing stopwords shrinks index size and improves speed/signal in Information Retrieval, Topic Modeling (LDA), and keyword extraction. However, blind removal can severely damage context-sensitive tasks: dropping negation words like 'not', 'no', or 'never' flips 'not good' directly into 'good', inverting Sentiment Analysis predictions. Similarly, Question Answering, Machine Translation, and LLM prompting retain all stopwords because grammatical structure carries vital meaning.
[HI] स्टॉपवर्ड्स वे अत्यंत सामान्य शब्द हैं—जैसे 'the', 'is', 'in', 'at', 'of', 'and'—जो लगभग हर दस्तावेज़ में आते हैं और विषय-वस्तु की पहचान में कम योगदान देते हैं। इन्हें हटाने से सर्च इंडेक्स का आकार घटता है और टॉपिक मॉडलिंग व कीवर्ड खोज की गति बढ़ती है। परंतु भावना विश्लेषण (Sentiment Analysis) में 'not', 'no', 'never' जैसे निषेधात्मक शब्द हटा देने पर 'not good' बदलकर 'good' हो जाता है और अर्थ उलट जाता है। इसी तरह मशीन अनुवाद और प्रश्न-उत्तर प्रणाली में व्याकरण बनाए रखने हेतु स्टॉपवर्ड्स नहीं हटाए जाते।
3. Rule-Based Stemming: Porter and Snowball Stemmers (रूल-आधारित स्टेमिंग: पोर्टर और स्नोबॉल स्टेमर्स)
[EN] Stemming reduces inflected or derived words to a crude root stem by heuristically stripping suffixes without consulting a dictionary or Part-of-Speech (POS) tags. Martin Porter's classic Porter Stemmer (1980) applies five sequential rule phases (e.g., mapping 'caresses' -> 'caress', 'ponies' -> 'poni', 'studies' -> 'studi'), while Snowball (Porter2) refines those rules across multiple European languages. Because stems need not be real English words ('computational' -> 'comput'), stemming is extremely fast and compact. Two classic errors arise: Over-stemming merges unrelated meanings ('universal', 'universe', 'university' -> 'univers'), whereas Under-stemming fails to unify true morphological variants ('alumnus' vs 'alumni').
[HI] स्टेमिंग बिना किसी शब्दकोश या POS टैग की जांच किए, नियम-आधारित प्रत्यय काटकर (suffix stripping) शब्दों को उनके मूल रूप (stem) में लाती है। मार्टिन पोर्टर का पोर्टर स्टेमर (1980) क्रमिक नियमों से 'studies' को 'studi' या 'ponies' को 'poni' में बदलता है, जबकि स्नोबॉल (Porter2) कई भाषाओं के लिए इसका उन्नत रूप है। चूंकि प्राप्त स्टेम का वास्तविक शब्द होना आवश्यक नहीं है, यह बहुत तेज़ होता है, लेकिन दो त्रुटियाँ संभव हैं: Over-stemming अलग अर्थ वाले शब्दों ('universe', 'university' -> 'univers') को मिला देती है, और Under-stemming समान मूल शब्दों ('alumnus', 'alumni') को अलग छोड़ देती है।
4. Lemmatization and Part-of-Speech Disambiguation (लेमेटाइजेशन और पार्ट-ऑफ-स्पीच (POS) विभेदीकरण)
[EN] Lemmatization performs full morphological vocabulary lookup—such as using Princeton's WordNet lexical database—to return a valid dictionary headword called a lemma. Unlike stemming, lemmatization maps irregular inflections accurately ('better' -> 'good', 'was'/'were' -> 'be', 'geese' -> 'goose', 'studies' -> 'study'). Crucially, accurate lemmatization depends on Part-of-Speech (POS) tags: 'meeting' as a Noun stays 'meeting', whereas 'meeting' as a Verb becomes 'meet'; 'saw' as Noun remains 'saw', as Verb becomes 'see'. While computationally slower and heavier than Porter stemming, lemmatization preserves human readability and semantic fidelity.
[HI] लेमेटाइजेशन पूर्ण रूपवैज्ञानिक विश्लेषण और शब्दकोश (जैसे WordNet) का उपयोग करके शब्द को उसके सार्थक वैध मूल शब्द (lemma) में बदलता है। स्टेमिंग के विपरीत यह अनियमित रूपों को भी सही जोड़ता है—जैसे 'better' -> 'good', 'was'/'were' -> 'be', 'mice' -> 'mouse' और 'studies' -> 'study'। सटीक लेमेटाइजेशन पार्ट-ऑफ-स्पीच (POS) टैग पर निर्भर करता है: संज्ञा के रूप में 'meeting' वही रहता है, पर क्रिया के रूप में 'meet' बन जाता है। यह स्टेमिंग से धीमा होने के बावजूद उच्च अर्थ-सटीकता और पठनीयता सुनिश्चित करता है।
Syntax, Formula & Technical Example (Natural Language Processing (NLP): Tokenization, Stopwords, Stemming)
# Pure Python NLP Preprocessing: Tokenization, Stopword Filter (Keep Negation), Suffix Stem
text = 'The runners were NOT running faster than expected!'
clean = ''.join(ch.lower() if ch.isalnum() or ch.isspace() else ' ' for ch in text)
tokens = clean.split()
stops = {'the', 'were', 'than'} # Keep 'not' to preserve sentiment polarity
filtered = [t for t in tokens if t not in stops]
def simple_stem(w):
for sfx in ('ing', 'ers', 'er', 'ed'):
if len(w) > len(sfx) + 2 and w.endswith(sfx): return w[:-len(sfx)]
return w
stems = [simple_stem(t) for t in filtered]
# Result: ['runn', 'not', 'runn', 'fast', 'expect']
Natural Language Processing (NLP): Tokenization, Stopwords, Stemming Quick Reference & Comparison Table
| NLP Technique | Linguistic / Algorithmic Behavior | Key Exam Fact |
|---|---|---|
| Subword Tokenization (BPE) | Merges frequent adjacent char pairs into subwords | Eliminates OOV problem in modern LLMs |
| Stopword Filtering | Drops high-frequency closed words (the, is, of) | Must preserve negations ('not') for sentiment |
| Porter Stemming | Heuristic suffix chopping; may output non-words | Very fast; prone to over- & under-stemming |
| Lemmatization | WordNet dictionary lookup using POS context | Returns valid lemma ('better' -> 'good') |
Natural Language Processing (NLP): Tokenization, Stopwords, Stemming Top 20 Bilingual MCQs with Answers
Q1. Which algorithm reduces 'better' to 'good' and 'was' to 'be' using vocabulary and morphological rules?
(कौन-सा एल्गोरिथ्म शब्दकोश और रूपवैज्ञानिक नियमों का उपयोग करके 'better' को 'good' तथा 'was' को 'be' में बदलता है?)
(A) Porter Stemming
(B) Lemmatization
(C) Stopword Removal
(D) Whitespace Tokenization
Correct Answer: (B)
[EN] Lemmatization consults a lexicon like WordNet to map irregular inflections to their valid dictionary lemma.
[HI] लेमेटाइजेशन WordNet जैसे शब्दकोश की सहायता से अनियमित शब्दों को भी उनके वैध मूल शब्द (lemma) में बदलता है।
Q2. Why can stemming produce non-dictionary strings such as 'studi' from 'studies' or 'comput' from 'computing'?
(स्टेमिंग से 'studies' का 'studi' या 'computing' का 'comput' जैसे गैर-शब्दकोश शब्द क्यों बन जाते हैं?)
(A) Stemmers convert English into binary bytes
(B) Stemmers chop suffixes using heuristic string rules without consulting a lexicon
(C) Stemmers require GPU backpropagation
(D) Stemmers randomly delete vowels
Correct Answer: (B)
[EN] Rule-based stemmers strip trailing characters sequentially without verifying whether the remainder is a valid word.
[HI] रूल-आधारित स्टेमर बिना शब्दकोश जांचे अंत के अक्षर काट देते हैं, चाहे शेष शब्द वैध हो या न हो।
Q3. Collapsing distinct words 'universe', 'universal', and 'university' into the single stem 'univers' is an example of:
('universe', 'universal' और 'university' जैसे भिन्न अर्थ वाले शब्दों को एक ही स्टेम 'univers' में मिलाना किसका उदाहरण है?)
(A) Under-stemming
(B) Over-stemming
(C) Lemmatization
(D) Subword Merging
Correct Answer: (B)
[EN] Over-stemming aggressively strips too much of a word, conflating semantically unrelated concepts.
[HI] Over-stemming में अत्यधिक प्रत्यय काटने के कारण अलग-अलग अर्थ वाले शब्द एक ही स्टेम में मिल जाते हैं।
Q4. Failing to reduce morphological variants 'alumnus' and 'alumni' to a shared root is known as:
('alumnus' और 'alumni' जैसे एक ही मूल के शब्दों को एक समान रूप में न ला पाना क्या कहलाता है?)
(A) Under-stemming
(B) Overfitting
(C) BPE Merging
(D) Over-stemming
Correct Answer: (A)
[EN] Under-stemming fails to merge words that genuinely share the same linguistic root, harming recall.
[HI] Under-stemming में समान मूल वाले शब्द अलग ही रह जाते हैं जिससे सर्च रिकॉल कम हो जाता है।
Q5. Why is Part-of-Speech (POS) tagging important before running Lemmatization on the word 'saw' or 'meeting'?
('saw' या 'meeting' जैसे शब्दों पर लेमेटाइजेशन चलाने से पहले पार्ट-ऑफ-स्पीच (POS) टैगिंग क्यों महत्वपूर्ण है?)
(A) Because the true lemma depends on grammatical role (Noun 'saw' -> 'saw', Verb 'saw' -> 'see')
(B) Because Lemmatization only works on numbers
(C) Because POS tags delete all nouns
(D) Because POS tagging encrypts text data
Correct Answer: (A)
[EN] Ambiguous words map to different lemmas depending on whether they act as Noun, Verb, or Adjective.
[HI] एक ही शब्द संज्ञा या क्रिया होने के आधार पर अलग मूल शब्द देता है (जैसे Verb 'saw' -> 'see', Noun 'saw' -> 'saw')।
Q6. In Sentiment Analysis, why should negation words like 'not', 'no', and 'never' be excluded from the stopword removal list?
(सेंटिमेंट विश्लेषण में 'not', 'no' और 'never' जैसे निषेधात्मक शब्दों को स्टॉपवर्ड हटाने की सूची से बाहर क्यों रखना चाहिए?)
(A) Removing 'not' reverses polarity (e.g., turning 'not happy' into 'happy')
(B) Negation words double file compression size
(C) Negation words are always capitalized
(D) Negation words appear only once in English
Correct Answer: (A)
[EN] Default stopword lists in some libraries include 'not'/'no', which flips negative reviews into false positives.
[HI] स्टॉपवर्ड सूची से 'not' हटाने पर 'not happy' बदलकर 'happy' हो जाता है, जिससे भावना का अर्थ बिल्कुल उलट जाता है।
Q7. How do modern Transformer LLMs solve the Out-Of-Vocabulary (OOV) problem for rare or newly coined words?
(आधुनिक ट्रांसफॉर्मर LLMs दुर्लभ या नए शब्दों के लिए Out-Of-Vocabulary (OOV) समस्या को कैसे हल करते हैं?)
(A) By running Porter Stemming twice
(B) By discarding every sentence containing an unknown word
(C) Subword tokenization (such as BPE, WordPiece, or SentencePiece) breaks unknown words into known subword pieces
(D) By increasing stopword list to 100,000 words
Correct Answer: (C)
[EN] Subword tokenizers compose any unseen word from frequent subword chunks down to individual bytes/characters.
[HI] सबवर्ड टोकनाइज़ेशन (BPE/WordPiece) किसी भी नए शब्द को ज्ञात छोटे टुकड़ों (subwords) में तोड़कर प्रोसेस कर लेता है।
Q8. How does Byte-Pair Encoding (BPE) construct its vocabulary during tokenizer training?
(टोकनाइज़र प्रशिक्षण के दौरान Byte-Pair Encoding (BPE) अपना शब्दकोश (vocabulary) कैसे बनाता है?)
(A) Assigns random hash IDs to whole paragraphs
(B) Removes all consonants before merging vowels
(C) Starts with base characters/bytes and iteratively merges the most frequently occurring adjacent pair
(D) Splits sentences strictly on commas only
Correct Answer: (C)
[EN] BPE greedily merges the highest-frequency adjacent pair until reaching the target vocabulary size (e.g., 50,257 in GPT-2).
[HI] BPE आधार अक्षरों से शुरू करके सबसे अधिक बार एक साथ आने वाले अक्षर जोड़ों को क्रमिक रूप से मर्ज करता है।
Q9. How many word-level bigrams are generated from the 4-token sentence ['natural', 'language', 'processing', 'rocks']?
(4-टोकन वाक्य ['natural', 'language', 'processing', 'rocks'] से शब्द-स्तर के कितने बाइग्राम (bigrams) बनेंगे?)
(A) 6 bigrams
(B) 4 bigrams
(C) 2 bigrams
(D) 3 bigrams
Correct Answer: (D)
[EN] For N tokens, the number of contiguous k-grams is N - k + 1; for N=4, k=2: 4 - 2 + 1 = 3 bigrams.
[HI] N टोकन वाले वाक्य में k-ग्राम की संख्या N - k + 1 होती है; अतः 4 - 2 + 1 = 3 बाइग्राम बनेंगे।
Q10. Which Python NLP library is most famous for classic educational tokenization, Porter/Snowball stemmers, and WordNet lemmatizers?
(क्लासिक टोकनाइज़ेशन, पोर्टर/स्नोबॉल स्टेमर और WordNet लेमेटाइजर के लिए कौन-सी पायथन NLP लाइब्रेरी सबसे प्रसिद्ध है?)
(A) Pillow
(B) NLTK (Natural Language Toolkit)
(C) SQLAlchemy
(D) Matplotlib
Correct Answer: (B)
[EN] NLTK provides classic PorterStemmer, SnowballStemmer, WordNetLemmatizer, and standard stopword corpora (alongside spaCy for production pipelines).
[HI] NLTK शैक्षिक और क्लासिक NLP में पोर्टर स्टेमर, स्नोबॉल स्टेमर, स्टॉपवर्ड्स और WordNet लेमेटाइजर प्रदान करती है।
Q11. In NLP terminology, what is the distinction between a 'Corpus' and a 'Vocabulary'?
(NLP शब्दावली में 'कॉर्पस' (Corpus) और 'वोकैबुलरी' (Vocabulary) के बीच क्या अंतर है?)
(A) A Corpus is the entire collection of text documents; Vocabulary is the set of unique tokens across that corpus
(B) Corpus is a single punctuation mark; Vocabulary is a single paragraph
(C) They are strictly identical synonyms
(D) Corpus contains only stopwords; Vocabulary contains only digits
Correct Answer: (A)
[EN] If 1,000 documents contain 100,000 total running words made of 8,500 distinct words, corpus length is 100,000 and vocabulary size |V| is 8,500.
[HI] कॉर्पस सभी दस्तावेज़ों का पूरा संग्रह है, जबकि वोकैबुलरी उस कॉर्पस में मौजूद अद्वितीय (unique) शब्दों का समूह है।
Q12. When comparing Stemming vs Lemmatization on computation speed and memory footprint, which is true?
(गणना गति और मेमोरी उपयोग के संदर्भ में स्टेमिंग बनाम लेमेटाइजेशन की तुलना में क्या सत्य है?)
(A) Stemming is significantly faster and lighter because it applies simple string suffix rules without dictionary lookup
(B) Lemmatization is 10x faster because it uses deep neural networks
(C) Stemming requires a 50GB SQL database at runtime
(D) Both run at identical O(N^3) complexity
Correct Answer: (A)
[EN] String suffix matching runs in microseconds per word, whereas POS tagging + WordNet lookup has higher overhead.
[HI] स्टेमिंग साधारण स्ट्रिंग नियमों पर चलने के कारण लेमेटाइजेशन (जो POS टैगिंग व डिक्शनरी लुकअप करता है) की तुलना में बहुत तेज़ और हल्की होती है।
Q13. Which tokenizer variant is used in Google's BERT models to split unknown words like 'playing' into 'play' + '##ing'?
(गूगल के BERT मॉडल्स में 'playing' जैसे शब्दों को 'play' + '##ing' में तोड़ने के लिए किस टोकनाइज़र का उपयोग होता है?)
(A) WordPiece
(B) Soundex Phonetic Encoder
(C) ASCII Whitespace Splitter
(D) Snowball Stemmer
Correct Answer: (A)
[EN] BERT employs WordPiece, marking continuation subwords with the '##' prefix.
[HI] BERT WordPiece टोकनाइज़र का उपयोग करता है, जो बाद वाले सबवर्ड टुकड़ों के आगे '##' उपसर्ग लगाता है।
Q14. Which preprocessing step should be avoided when building a Named Entity Recognition (NER) model that relies on capitalization clues (e.g., 'Apple' vs 'apple')?
(नेम्ड एंटिटी रिकग्निशन (NER) मॉडल बनाते समय, जो कैपिटलाइज़ेशन ('Apple' बनाम 'apple') पर निर्भर करता है, किस प्रीप्रोसेसिंग चरण से बचना चाहिए?)
(A) Removing trailing extra whitespace
(B) Sentence boundary splitting
(C) UTF-8 character decoding
(D) Aggressive lowercasing of all text
Correct Answer: (D)
[EN] Lowercasing destroys proper-noun capitalization signals that distinguish company 'Apple' from fruit 'apple'.
[HI] सभी अक्षरों को लोअरकेस करने से प्रॉपर नाउन का कैपिटलाइज़ेशन संकेत ('Apple' कंपनी बनाम 'apple' फल) नष्ट हो जाता है।
Q15. In the Python code snippet, why does 'simple_stem' check 'len(w) > len(sfx) + 2' before stripping suffix 'ing'?
(पायथन कोड में 'simple_stem' फंक्शन 'ing' प्रत्यय हटाने से पहले 'len(w) > len(sfx) + 2' की जांच क्यों करता है?)
(A) To force every word to be at least 20 characters long
(B) To convert lowercase letters into uppercase
(C) To remove stopwords automatically
(D) To avoid destroying short root words like 'king', 'ring', or 'sing' into single letters
Correct Answer: (D)
[EN] Checking minimum stem length prevents stripping 'ing' from 'ring' (which would leave just 'r').
[HI] यह जांच 'king', 'ring' या 'sing' जैसे छोटे मूल शब्दों से 'ing' काटकर उन्हें अर्थहीन बनने से रोकती है।
Q16. Which statement is NOT true about NLP text preprocessing?
(NLP टेक्स्ट प्रीप्रोसेसिंग के संबंध में निम्न में से कौन-सा कथन सत्य नहीं है?)
(A) Subword tokenization reduces Out-Of-Vocabulary errors
(B) Stopword removal shrinks feature dimensionality in Bag of Words
(C) Porter Stemmer guarantees every stemmed output is a valid English dictionary word
(D) Lemmatization considers Part-of-Speech context for accuracy
Correct Answer: (C)
[EN] Porter Stemmer frequently outputs non-dictionary stems like 'studi', 'poni', or 'happi'; valid words are guaranteed by Lemmatization.
[HI] पोर्टर स्टेमर वैध शब्दकोश शब्द की गारंटी नहीं देता (यह 'studi' या 'poni' जैसे अपूर्ण शब्द दे सकता है); वैध शब्द लेमेटाइजेशन देता है।
Q17. Within Natural Language Processing (NLP): Tokenization, Stopwords, Stemming, which nlp technique directly maps to: "Merges frequent adjacent char pairs into subwords"?
(Natural Language Processing (NLP): Tokenization, Stopwords, Stemming में कौन सा NLP Technique सीधे "Merges frequent adjacent char pairs into subwords" से संबंधित है?)
(A) Stopword Filtering
(B) Lemmatization
(C) Porter Stemming
(D) Subword Tokenization (BPE)
Correct Answer: (D)
[EN] In Natural Language Processing (NLP): Tokenization, Stopwords, Stemming, 'Subword Tokenization (BPE)' handles 'Merges frequent adjacent char pairs into subwords' (Eliminates OOV problem in modern LLMs).
[HI] Natural Language Processing (NLP): Tokenization, Stopwords, Stemming में 'Subword Tokenization (BPE)' का कार्य/विवरण 'Merges frequent adjacent char pairs into subwords' (Eliminates OOV problem in modern LLMs) है।
Q18. Which option accurately describes 'Stopword Filtering' in Natural Language Processing (NLP): Tokenization, Stopwords, Stemming?
(Natural Language Processing (NLP): Tokenization, Stopwords, Stemming के संदर्भ में 'Stopword Filtering' की सही विशेषता कौन सी है?)
(A) Drops high-frequency closed words (the, is, of)
(B) Heuristic suffix chopping; may output non-words
(C) Merges frequent adjacent char pairs into subwords
(D) WordNet dictionary lookup using POS context
Correct Answer: (A)
[EN] 'Stopword Filtering' provides 'Drops high-frequency closed words (the, is, of)' — key point: Must preserve negations ('not') for sentiment.
[HI] 'Stopword Filtering' का मुख्य विवरण 'Drops high-frequency closed words (the, is, of)' है (Must preserve negations ('not') for sentiment)।
Q19. In Natural Language Processing (NLP): Tokenization, Stopwords, Stemming, identify the correct parameter for the specification: "Heuristic suffix chopping; may output non-words".
(Natural Language Processing (NLP): Tokenization, Stopwords, Stemming में "Heuristic suffix chopping; may output non-words" विवरण किस विकल्प के लिए सही है?)
(A) Stopword Filtering
(B) Lemmatization
(C) Porter Stemming
(D) Subword Tokenization (BPE)
Correct Answer: (C)
[EN] 'Porter Stemming' corresponds to 'Heuristic suffix chopping; may output non-words' (Very fast; prone to over- & under-stemming).
[HI] 'Porter Stemming' का संबंध 'Heuristic suffix chopping; may output non-words' (Very fast; prone to over- & under-stemming) से है।
Q20. Considering Natural Language Processing (NLP): Tokenization, Stopwords, Stemming, what key behavior defines 'Lemmatization'?
(Natural Language Processing (NLP): Tokenization, Stopwords, Stemming में 'Lemmatization' की मुख्य भूमिका या मान क्या है?)
(A) WordNet dictionary lookup using POS context
(B) Heuristic suffix chopping; may output non-words
(C) Drops high-frequency closed words (the, is, of)
(D) Merges frequent adjacent char pairs into subwords
Correct Answer: (A)
[EN] 'Lemmatization' represents 'WordNet dictionary lookup using POS context' (Returns valid lemma ('better' -> 'good')).
[HI] 'Lemmatization' का अर्थ/मान 'WordNet dictionary lookup using POS context' है (Returns valid lemma ('better' -> 'good'))।
Natural Language Processing (NLP): Tokenization, Stopwords, Stemming — Exam FAQs
Q1: What is the key difference between Stemming and Lemmatization?
स्टेमिंग और लेमेटाइजेशन के बीच मुख्य अंतर क्या है?
[EN] Stemming crudely chops word endings using heuristic rules and may produce invalid strings ('studies' -> 'studi'), while Lemmatization uses vocabulary and POS context to return the exact dictionary root word ('better' -> 'good', 'studies' -> 'study').
[HI] स्टेमिंग नियमों से शब्द का अंतिम हिस्सा काटती है जिससे गैर-शब्दकोश रूप ('studies' -> 'studi') बन सकता है, जबकि लेमेटाइजेशन शब्दकोश व POS संदर्भ से सटीक वैध मूल शब्द ('better' -> 'good') देता है।
Q2: Do modern Large Language Models (LLMs) still use stopword removal and stemming?
क्या आधुनिक लार्ज लैंग्वेज मॉडल्स (LLMs) अभी भी स्टॉपवर्ड हटाने और स्टेमिंग का उपयोग करते हैं?
[EN] No; modern Transformer LLMs rely on subword tokenizers (BPE/SentencePiece) and retain all stopwords, punctuation, and grammatical inflections because attention layers depend on complete syntactic context.
[HI] नहीं; आधुनिक ट्रांसफॉर्मर LLMs सबवर्ड टोकनाइज़ेशन (BPE/SentencePiece) का उपयोग करते हैं और सभी स्टॉपवर्ड्स व विराम चिह्नों को बनाए रखते हैं क्योंकि अटेंशन को पूर्ण व्याकरणिक संदर्भ की आवश्यकता होती है।
Q3: Why is subword tokenization preferred over pure character or pure word tokenization?
शुद्ध अक्षर (character) या शुद्ध शब्द (word) टोकनाइज़ेशन की तुलना में सबवर्ड टोकनाइज़ेशन को प्राथमिकता क्यों दी जाती है?
[EN] Pure word tokenization creates massive vocabularies and fails on OOV words, while pure character tokenization produces overly long sequences lacking semantic units; subword tokenization strikes an optimal balance between vocabulary compactness and zero OOV failures.
[HI] शुद्ध शब्द टोकनाइज़ेशन में शब्दकोश विशाल हो जाता है और नए शब्द (OOV) छूट जाते हैं, जबकि अक्षर स्तर पर सीक्वेंस बहुत लंबा हो जाता है; सबवर्ड इन दोनों के बीच सर्वोत्तम संतुलन देता है।
Post a Comment
Post a Comment