Skip to content

muki119/InformationSystem_SearchEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Search Engine

By Mugagga Kimera

Install

clone repository into a file

git clone https://github.com/muki119/informationSystemsCoursework.git

Unix / Macos

Run these commands

python3 -m venv .venv
python3 -m pip install -r requirements.txt 
source .venv/bin/activate

Windows

Run these commands

py -m venv .venv
py -m pip install -r requirements.txt 
.venv/bin/activate

Usage

By default - stemming will be used and no query expansion will be used

Unix / Macos

python src/main.py

Windows

py src/main.py

Turning on Lemmatization or Query expansion

In the "main.py" file there will be code as follows

def main():
    SearchEngineIns = SearchEngine(True)
    SearchEngineIns.search()

To change to Lemmatization , set the true value to false.

def main():
    SearchEngineIns = SearchEngine(False)
    SearchEngineIns.search()

Then delete the data folder and run the program.

Query Expansion

To enable query expansion go the the main function in main.py

def main():
    SearchEngineIns = SearchEngine(True)
    SearchEngineIns.search()

Add another paramter with the value of true to the Search engine initiatior

def main():
    SearchEngineIns = SearchEngine(True,True)
    SearchEngineIns.search()

Then re-run the program