/Foogle

Simple search engine with TF-IDF ranking.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Foogle

The foogle is search engine with TF-IDF ranking written in Python.

Requirements

Install requirements:

python -m pip install -r requirements.txt

Usage

python foogle.py --help

Compile data base

First you need do this:

python foogle.py compile my_path

Will create and fill in sqlite data base and needful files.

Find files

python foogle.py find "some text"

Show what files contain phrases similar to some text. Work with set theory operations: and, or and not (or C-like syntax &, | and !)

python foogle.py find "!(Bob and Allice & Bacel) or def"

Show file without 'Bob', 'Allice' and 'Bacel' and files with word 'def'

Ranking

Use typical TF-IDF ranking. Where:

TF:

ref

IDF:

ref

ref

Configuration file

foogle:
  logging_file_name: mylog.log  
  types:
    - text*
    - application/j
  date_base_name: mydb.db
  extention_types:
    - .h
    - .sh
    - .doc
  general_path:

Support types from mimetypes lib, watch this.