Latent Search Library

Developed as a Node.js Library reads sentences from a PDF file and identifies the closest match to a given input sentence through TF-IDF (Term Frequency - Inverse Document Frequency) and Cosine Similarity measures.

Description

Developed as a Node.js library that reads sentences from a PDF file and identifies the closest match to a given input sentence using TF-IDF (Term Frequency - Inverse Document Frequency) and Cosine Similarity measures. This approach aims to reduce reliance on embedding models for semantic search by focusing on token-level distance scores. The library preprocesses text by tokenizing sentences, computing TF-IDF vectors, and calculating cosine similarity to determine the most relevant match. It is designed for efficient and lightweight text retrieval, making it suitable for applications where deep learning-based embeddings are impractical or unnecessary.

Issues & Pull Requests Thread
No issues or pull requests added.