Page 259 - Ai_C10_Flipbook
P. 259
Document Frequency
i love programming is fun coding Awesome
2 2 2 2 1 2 1
0 0 0 1 0 1 1
Inverse Document Frequency
Total Number of Documents
IDF =
Document Frequency
i love programming is fun coding Awesome
4 4 4 4 4 4 4
2 2 2 2 1 2 2
Term Frequency-Inverse Document Frequency (TF-IDF)
TFIDF(W) = TF(W) × log(IDF(W))
Document i love programming is fun coding awesome
1* 1* 1* 0* 0* 0* 0*
Doc-1 log 4 log 4 log 4 log 4 log 4 log 4 log 4
2 2 2 2 2 2 2
0* 0* 1* 1* 1* 0* 0*
Doc-2 log 4 log 4 log 4 log 4 log 4 log 4 log 4
2 2 2 2 1 2 2
1* 1* 0* 0* 0* 1* 0*
Doc-3 log 4 log 4 log 4 log 4 log 4 log 4 log 4
2 2 2 2 2 2 2
0* 0* 0* 1* 0* 1* 1*
Doc-4 log 4 log 4 log 4 log 4 log 4 log 4 log 4
2 2 2 2 2 2 1
Document i love programming is fun coding awesome
Doc-1 0.3010 0.3010 0.3010 0 0 0 0
Doc-2 0 0 0.3010 0.3010 0.6020 0 0
Doc-3 0.3010 0.3010 0 0 0 0.3010 0
Doc-4 0 0 00.3010 0.3010 0 0.3010 0.6020
Assertion and Reasoning Questions.
Direction: Questions 3-4, consist of two statements – Assertion (A) and Reasoning (R). Answer these questions by
selecting the appropriate option given below:
a. Both A and R are correct and R is the correct explanation of A.
b. Both A and R are correct but R is NOT the correct explanation of A.
c. A is correct but R is incorrect.
d. A is incorrect but R is correct.
3. Assertion (A): Syntax refers to the rules that govern sentence structure in a language.
Reasoning (R): Syntax dictates the arrangement of words and phrases in a sentence to ensure it is grammatically
correct.
Ans. a.
4. Assertion (A): AI chatbots are more efficient than rule-based ones because they learn and adapt to user behaviour.
Reasoning (R): AI chatbots analyse and learn from interactions, allowing them to improve and offer more personalised
responses, whereas rule-based systems are restricted to predefined rules.
Ans. a.
Natural Language Processing 257

