Code Monkey home page Code Monkey logo

document_retrieval's Introduction

Document Retrieval

Python implementation of Document Retrieval System

Created by Gerardo Roa Dabike

Oct 2015

USE: python (options)

OPTIONS: Help : -h : print this help message and exit

PARAMETERS/BEHAVIOURS:

-c FILE : FILE as a COLLECTION_FILE. 
-q FILE : FILE as a QUERIE_FILE
-p INT : INT is the id of one query inside the QUERIE_FILE. This is a filter of "-q" option, and works together.
-t STRING : STRING is a string of query words separated each by full stop ".". This option cannot be together with "-q" option. 
-i FILE : FILE as a name of INDEX_FILE. If it is not specify one, the system will assume "index.txt" by default. This option only work with "-c" option declared.
-I : the file INDEX_FILE must be created before use it.
-r FILE : FILE as a RESULT_FILE. If not present but option "B" or "-F" or "-D" are declared, result is printed in screen. 
-a INT : INT as a length of output ranking. By default the value is 10.
-s FILE : FILE as a STOPLIST_FILE
-S : use PorterStemmer. 
-L : use LancasterStemmer.

If none options, "-S" or "-L", are declared, system will not use stemmed process.

If both options, "-S" and "-L", are declared, system use PorterStemmer.

-T : apply TreebankWordTokenizer. The system work with WordPunctTokenizer by default. 
-B : term weight in vector are BINARY.
-F : term weight in vector are TERM FREQUENCY.
-D : term weight in vector are TF.IDF.

Only one of the options "-B", "-F" and "-D" can be declared.

EXAMPLES:

  1. Create default index of collection COLLECTIONFILE without stop list, using PorterStemmer and WordPunctTokenizer python -c COLLECTIONFILE -I -S

  2. Create index INDEXFILE without stop list, using LancasterStemmer and WordPunctTokenizer python -c COLLECTIONFILE -i INDEXFILE -I -L

  3. Retrieve Document using QUERIEFILE, a exist INDEXFILE, saving in OUTPUTFILE using STOPLISTFILE, PorterStemmer, TreebankWordTokenizer and Term Frequency Aproach python -q QUERIEFILE -i INDEXFILE -r OUTPUTFILE -s STOPLISTFILE -S -T -F

document_retrieval's People

Contributors

groadabike avatar

Stargazers

 avatar

Watchers

James Cloos 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.