Question
Use the following corpus for the following questions: D1: A man a plan a canal Panama D2: Go hang a salami; I'm a lasagna hog
Use the following corpus for the following questions:
D1: "A man a plan a canal Panama"
D2: "Go hang a salami; I'm a lasagna hog"
D3: "Able was I ere I saw Elba"
D4: "Resume so pacific a pose, muser"
Assume we normalize this corpus by converting everything to lower case, but we do NOT use any stopwords and NO stemming or lemmatization is carried out.
1.) Using the corpus above, what is idf('lasagna')? Compute idf as the preferred way we saw in class: idf = log N/df where N is the number of documents in the corpus, df is the integer df score, and the log is base 2.
Group of answer choices:
2
1
0.25
0
2.) Using the corpus above, what is tf-idf('a',D1)? Compute tf-idf as we saw in class using the normalized idf score as per the previous question and the tf value as 1 + log tf where tf is the integer count for the term frequency in a particular document and the log is base 2.
Group of answer choices:
2/3or 0.666666...
1.07
2.58
None of these
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started