Skip to content

IgorAugust0/information-retrieval

Repository files navigation

Information Retrieval (IR)

License Python NLTK PrettyTable Matplotlib TQDM

This repository contains three Python scripts implementing different models for Information Retrieval: Boolean Model, Vector Space Model, and an Evaluation script. Each script represents a different approach to Information Retrieval and they can be used to understand the basics of this field. They were made during the Information Retrieval "Organização e Recuperação da Informação (ORI)" course at the Federal University of Uberlândia (UFU).

Programs

Program Description
Boolean Model (Instructions) Implements a Boolean Model for Information Retrieval, representing documents as sets of terms and queries as Boolean expressions of terms.
Vector Space Model (Instructions) Implements a Vector Space Model for Information Retrieval, representing documents and queries as vectors in a high-dimensional space.
Evaluation (Instructions) This script is used to evaluate the performance of an Information Retrieval system. It calculates precision and recall scores for each query and generates plots for individual query results and the average scores of all queries.

Dependencies

These scripts require Python 3 and the following Python libraries installed:

  • nltk (for both Boolean Model and Vector Space Model)
  • prettytable (for the Boolean Model)
  • matplotlib (for the Evaluation script)
  • tqdm (for all scripts, but it's likely that you already have it installed)

You can install these dependencies using pip:

pip install -r requirements.txt

you can use the command pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_} to update all packages on Windows

How to Run

To run the scripts, you need to pass the necessary files as command line arguments. Please refer to the individual scripts for more details.

License

This program is provided under the MIT License. Feel free to use, modify, and distribute it.