ProjectSearch
A pseudo-search engine which goes through notes and gives answers to questions.
This project is work in progress (the code works).
We expect to make a Python program which takes notes in .txt
format and asks for questions to answer them.
Instructions to run the code
- Make a python virtual environment by running this command in the terminal.
python -m venv venv
- Activate the virtual environment by running this command
source venv/Scripts/activate
- Install all the required packages by running this command
pip install -r requirements.txt
- Run the code by running this command.
python main.py corpus
Directory Structure
📦src
┣ 📂data
┃ ┣ 📂corpus
┃ ┃ ┣ 📜artificial_intelligence.txt
┃ ┃ ┣ 📜machine_learning.txt
┃ ┃ ┣ 📜natural_language_processing.txt
┃ ┃ ┣ 📜neural_network.txt
┃ ┃ ┣ 📜probability.txt
┃ ┃ ┗ 📜python.txt
┃ ┗ 📜loadData.py
┣ 📂process
┃ ┣ 📜qprocess.py
┃ ┗ 📜tfidf.py
┣ 📂tests
┃ ┗ 📜tests.py
┣ 📜main.py
┗ 📜requirements.txt
src/
directory
src/
directory hasmain.py
and two other directoriesdata/
andprocess/
data/
directory
- It has
data.py
and thecorpus/
directory
process/
directory
- It has two files
tfidf.py
andqprocess.py
files
We have 4 scripts as of now
main.py
data.py
tifidf.py
qprocess.py
main.py
- It is the main script which links all other files
data.py
- It has functions to curate the data , to search from
tfidf.py
- It has the functions to find the results.
qprocess.py
- It has the funtions to filter the questions to provide better answers.