semantra-python  by freedmand

Local semantic search engine for deep document analysis

Created 3 years ago
2,710 stars

Top 16.8% on SourcePulse

GitHubView on GitHub
Project Summary

Semantra is a command-line tool and local web application designed for private, semantic document search. It empowers individuals like journalists, researchers, and students to query collections of text and PDF files based on meaning rather than exact keyword matches. By running entirely locally, Semantra offers a secure and user-friendly alternative to cloud-based search solutions, enabling deep insights from large document sets without data sharing.

How It Works

Semantra processes local documents by converting their content into numerical embeddings using configurable machine learning models. These embeddings capture semantic meaning, allowing for queries that understand context and nuance. The tool then launches a local web interface where users can interactively search these documents, view relevance scores, and highlight key passages. This approach prioritizes user privacy and data security by avoiding external services and generative AI, ensuring primary source material remains the sole source of truth.

Quick Start & Requirements

Installation requires Python 3.9+ and is recommended via pipx. After installing pipx, run python3 -m pipx install semantra. Alternatively, it can be installed in a Python virtual environment. Initial setup involves processing documents (e.g., semantra document.pdf), which may take several minutes and download a local ML model requiring several hundred megabytes of disk space. Subsequent searches are near-instantaneous. The web interface runs on localhost:8080 by default.

Highlighted Details

  • Fully local execution ensures data privacy and security.
  • Supports multiple pre-defined embedding models (e.g., minilm, mpnet) and custom Hugging Face transformers models.
  • Interactive web UI provides relevance scoring, result highlighting, and query sculpting via positive/negative weighting.
  • Handles both plain text and PDF document formats.

Maintenance & Community

The project is described as being in its "early stages," with contributions welcomed via issues for bugs and feature requests. No specific community channels (like Discord/Slack), roadmaps, or notable contributors/sponsorships are detailed in the provided documentation.

Licensing & Compatibility

The software's license is not explicitly stated in the provided documentation. Users should verify licensing terms before commercial use or integration into proprietary systems.

Limitations & Caveats

As an early-stage project, Semantra may have evolving features and stability. Its semantic search nature means results are always returned, requiring user judgment to discern relevance based on scores, and it does not offer generative summarization or synthesis capabilities.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.