Page 305 - AI Ver 1.0 Class 10
P. 305
They are best suited for straightforward interactions like Virtual assistants like Google Assistant, Alexa, Cortana,
making life easy at home or companies at customer care Siri, etc. are best examples of Smart bots.
services.
2. Following is the corpus:
Document 1: This is my first experience of Text Mining.
Document 2: I have learnt new techniques in this.
Perform the following functions on the above corpus:
a. Sentence Segmentation
b. Tokenization
c. Stop words removal
d. Lowercase conversion
Ans. a. This is my first experience of Text Mining.
I have learnt new techniques in this.
b.
This is my first experience of Text
Mining . I have learnt new techniques
in this .
c.
my first experience Text Mining
learnt new techniques
d. this is my first experience of text mining. i have learnt new techniques in this
3. Document 1: Amit and Amita are twins.
Document 2: Amit lives with his grandparents in Shimla.
Document 3: Amita lives with her parents in Delhi.
Create a step by step approach to implement a bag of words algorithm.
Ans. Step 1: Text Normalisation
Document 1: [Amit, and, Amita, are, twins]
Document 2: [Amit, lives, with, his, grandparents, in Shimla]
Document 3: [Amita, lives, with, her, parents, in Delhi]
Step 2: Create Dictionary
Amit and Amita are twins lives
with his grandparents in Shimla her
parents Delhi
Step 3: Create a Document Vector
Amit and Amita are twins lives with his grandparents in Shimla her parents Delhi
1 1 1 1 1 0 0 0 0 0 0 0 0 0
1 0 0 0 0 1 1 1 1 1 1 0 0 0
0 0 1 0 0 1 1 0 0 1 0 1 1 1
Natural Language Processing 303

