Git Product home page Git Product logo

information-retrieval's Introduction

Assignment 2

A document indexer, consisting of a corpus reader, document processor, tokenizer, a weighted (tf-idf) indexer and a ranked retrieval method

1 - Installing dependencies

In order to install the required dependencies, run the following command.

pip install -r requirements.txt

2 - Running the indexer and generating weights

To run the indexer execute the following command. If no filepath is provided the indexer will try to open the file 'datasets/metadata_2020-03-27.csv'

cd assignment
python3 indexer.py [filepath]

Two files will be generated: outputs/bmc_weights.csv and outputs/tf_idf_weights.csv. These files will be loaded by the ranking entities

3 - Vector space ranking with tf-idf weights

To run the vector space ranking execute the following command. If no input_filepath is provided, then the weights will be loaded from 'outputs/tf_idf_weights.csv'

python3 vector_space_ranking.py [input_filepath]

The results will be generated to 'outputs/vector_space_results.csv'

4 - BM25 ranking

To run the bm25 ranking execute the following command. If no input_filepath is providedIf no input_filepath is provided, then the weights will be loaded from 'outputs/bmc_weights.csv'

python3 bmc_ranking.py [input_filepath]

The results will be generated to 'outputs/bmc_results.csv'

information-retrieval's People

Contributors

andremourato avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.