https://github.com/igoraugust0/information-retrieval
ℹ️ Information Retrieval models implemented in Python
https://github.com/igoraugust0/information-retrieval
boolean-model information-retrieval inverted-index matplotlib nltk pickle precision-recall prettytable python stemming tf-idf tokenization vector-space-model
Last synced: 10 months ago
JSON representation
ℹ️ Information Retrieval models implemented in Python
- Host: GitHub
- URL: https://github.com/igoraugust0/information-retrieval
- Owner: IgorAugust0
- License: mit
- Created: 2024-01-11T13:05:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-03T19:51:03.000Z (almost 2 years ago)
- Last Synced: 2025-03-13T09:19:14.378Z (about 1 year ago)
- Topics: boolean-model, information-retrieval, inverted-index, matplotlib, nltk, pickle, precision-recall, prettytable, python, stemming, tf-idf, tokenization, vector-space-model
- Language: Python
- Homepage:
- Size: 8.74 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Information Retrieval (IR)
[](LICENSE)
[](https://www.python.org/downloads/)
[](https://www.nltk.org/)
[](https://pypi.org/project/prettytable/)
[](https://matplotlib.org/)
[](https://tqdm.github.io/)
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](https://github.com/IgorAugust0/ORI) at the Federal University of Uberlândia (UFU).
## Programs
| Program | Description |
| --- | --- |
| [Boolean Model](1_boolean_model/base_samba/boolean_model.py) [(Instructions)](1_boolean_model/README.md) | Implements a Boolean Model for Information Retrieval, representing documents as sets of terms and queries as Boolean expressions of terms. |
| [Vector Space Model](2_vector_space_model/base_samba/vsm.py) [(Instructions)](2_vector_space_model/README.md)| Implements a Vector Space Model for Information Retrieval, representing documents and queries as vectors in a high-dimensional space. |
| [Evaluation](3_evaluation/evaluation.py) [(Instructions)](3_evaluation/README.md)| 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**](https://www.nltk.org/install.html) (for both Boolean Model and Vector Space Model)
- [**prettytable**](https://pypi.org/project/prettytable/) (for the Boolean Model)
- [**matplotlib**](https://matplotlib.org/stable/install/index.html) (for the Evaluation script)
- [**tqdm**](https://tqdm.github.io/) (for all scripts, but it's likely that you already have it installed)
You can install these dependencies using pip:
```bash
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](LICENSE). Feel free to use, modify, and distribute it.