Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

πŸ” LSI Search System

A web application that enables semantic document search using Latent Semantic Indexing (LSI). The system preprocesses text, computes TF-IDF, applies Singular Value Decomposition (SVD) for dimensionality reduction, and retrieves documents based on cosine similarity.


πŸš€ Features

  • Preprocessing: Removes stopwords and applies stemming/lemmatization.
  • TF-IDF Computation: Converts documents into numerical vectors.
  • SVD Decomposition: Reduces dimensionality to enhance semantic search.
  • Cosine Similarity: Ranks documents by relevance to the search query.
  • Flask API: Handles search requests and retrieves relevant documents.
  • React Frontend: Provides a user-friendly interface for searching.

πŸ“‚ Project Structure

πŸ“ vwm
β”‚
β”œβ”€β”€ πŸ“ backend
β”‚ β”œβ”€β”€ server.py # πŸ—οΈ Flask backend API
β”‚ β”œβ”€β”€ db.py # πŸƒ MongoDB database connection
β”‚ β”œβ”€β”€ preprocess.py # βœ‚οΈ Text preprocessing
β”‚ β”œβ”€β”€ TF-IDF.py # πŸ”’ TF-IDF computation
β”‚ β”œβ”€β”€ SVD.py # πŸ” Singular Value Decomposition
β”‚ └── cosineSimilarity.py # πŸ“ Cosine similarity computation
β”‚
β”œβ”€β”€ πŸ“ frontend
β”‚ └── πŸ“ src
β”‚ β”œβ”€β”€ pages/Home.js # πŸ” Search input and results display
β”‚ β”œβ”€β”€ App.js # βš›οΈ React app configuration
β”‚ β”œβ”€β”€ pages/home.css # 🎨 Styling for UI β”‚ └── App.css' # 🎨 Styling for UI β”‚
β”œβ”€β”€ app.py # πŸš€ Runs both frontend & backend
└── README.md # πŸ“– Project documentation


πŸ›  Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/FirstOne96/LSI-Search-System.git
cd vwm

2️⃣ Setup Backend (Flask)

cd backend
python -m venv venv # Create a virtual environment
source venv/bin/activate # Activate virtual environment (Mac/Linux)
venv\bin\activate # Activate virtual environment (Windows)
pip install -r requirements.txt # Install dependencies

3️⃣ Setup Frontend (React)

cd ../frontend
rm -rf node_modules package-lock.json
npm cache clean --force
npm install
npm install --save-dev eslint-config-react-app eslint@latest
npm install eslint@^8.0.0 --save-dev
npm install eslint-config-react-app@latest --save-dev
npm start

4️⃣ Start the Project

cd ..
python app.py # Runs both backend & frontend

πŸ–₯️ Technologies Used

Backend

  • 🐍 Flask – Web framework
  • πŸƒ MongoDB – NoSQL database
  • βœ‚ NLTK – Text processing
  • πŸ”’ Scikit-learn – TF-IDF, SVD

Frontend

  • βš› React – UI framework
  • 🎨 Tailwind CSS – Styling

🀝 Contributing

Feel free to fork this repository and submit a pull request with improvements!

About

A web application that enables semantic document search using Latent Semantic Indexing (LSI). The system preprocesses text, computes TF-IDF, applies Singular Value Decomposition (SVD) for dimensionality reduction, and retrieves documents based on cosine similarity.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /