0% found this document useful (0 votes)
7 views3 pages

IR Assignment3

The document is an assignment from the Walchand Institute of Technology focusing on the implementation of an Information Retrieval (IR) system using the Boolean model. It discusses the theoretical aspects of retrieval models and includes a program code that demonstrates how to implement a Boolean model for document relevance. The assignment is submitted by Ayush Pande, a final year BTech IT student, and includes a program for querying keywords against a set of documents.

Uploaded by

vinayostwal707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

IR Assignment3

The document is an assignment from the Walchand Institute of Technology focusing on the implementation of an Information Retrieval (IR) system using the Boolean model. It discusses the theoretical aspects of retrieval models and includes a program code that demonstrates how to implement a Boolean model for document relevance. The assignment is submitted by Ayush Pande, a final year BTech IT student, and includes a program for querying keywords against a set of documents.

Uploaded by

vinayostwal707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

WALCHAND INSTITUTE OF TECHNOLOGY, SOLAPUR

INFORMATION TECHNOLOGY
2021-22 SEMESTER - II
ASSIGNMENT – 3
Subject: Information Retrieval

Name: Ayush pande Roll no: 74 Class: Final Year Btech IT

Title: Implementation of IR system using Boolean model

Theory: Model is an idealization or abstraction of an actual process


• Mathematical models are used to study the properties of the process, draw conclusions,

make predictions

• Conclusions derived from a model depend on whether the model is a good


approximation of the actual situation

• Statistical models represent repetitive processes, make predictions about frequencies


of interesting events

• Retrieval models can describe the computational process– e.g. how documents are

ranked– Note that how documents or indexes are stored is implementation

• Retrieval models can attempt to describe the human process– e.g. the information
need, interaction– Few do so meaningfully

• Retrieval models have an explicit or implicit definition of relevance

Program Code:
dic_bool = {i:[] for i in range(1,11)}
for i in keywords :
for k in range(10):
dic_bool[k+1].append(1) if i in allNouns_separate[k] else dic_bool[k+1].append(0)
print(dic_bool)
#boolean model
def boolean_model():
try:
query = input('Enter Query, keywords are: {}\nQuery: '.format(keywords))
list_query=[]
for i in query.split():
if i in keywords:
list_query.append(keywords.index(i))
else:
list_query.append(i)
for i in dic_bool:
temp_query = ''
for j in list_query:
if type(j) == int:
temp_query += str(dic_bool[i][j])+' '
else:
temp_query += j+' '
#print(temp_query.strip())
if bool(eval(temp_query.strip())):
print('Document {} is relevant'.format(i))
except:
print('Some Error Occured')
for i in range(4):
boolean_model()

Screenshots/Output:

2
3

You might also like