Skip to main content

High-performance Rust search engine for RAG systems

Project description

son-logic-engine

High-performance search filter for RAG systems written in Rust, designed for speed and accuracy with Vietnamese text.

🚀 Features

  • Rust Core: Blazing fast processing for large datasets.
  • Polymorphic Input: Supports List[str], Dict, or nested List[Dict].
  • Field Filtering: Optimize search speed by targeting specific columns.
  • Unicode Support: Native handling of Vietnamese characters and custom character mappings.

🛠 Installation

pip install son-logic-engine

📖 API Reference

1. load_mapping(path: str)

Loads the character weight mapping from a JSON file. This is required for the search logic to compute character-based relevance.

import son_logic_engine as slg
mapping = slg.load_mapping('path/to/mapping.json')

2. loc(query: str, database: Any, mapping: dict, field_name: str = None)

The core search function. Returns a list of records (as JSON strings) ranked by relevance to the query.

  • query: The search term.
  • database: Your data (List of strings or List of Dictionaries).
  • mapping: The mapping object from load_mapping.
  • field_name: (Optional) The specific key in your dictionary to search within.

3. print(raw_results: list)

A utility function to decode and pretty-print the JSON results returned by loc.

results = slg.loc("search term", data, mapping)
slg.print(results)

🔒 Security & Contact

The underlying search algorithm and character weight logic are proprietary. For access to standard mapping files or custom integration, please contact:

📩 Email: sonbuwin@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

son_logic_engine-0.2.4.tar.gz (7.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

son_logic_engine-0.2.4-cp312-cp312-manylinux_2_34_x86_64.whl (317.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

Details for the file son_logic_engine-0.2.4.tar.gz.

File metadata

  • Download URL: son_logic_engine-0.2.4.tar.gz
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for son_logic_engine-0.2.4.tar.gz
Algorithm Hash digest
SHA256 13f01aa84350aec8e8c073c5384843d5be904a41a607391841d34f3d80478665
MD5 c36f01fee8a2779ccd1d32d6f2f5adb7
BLAKE2b-256 66ad29259c1c341b9fd340c6ada984eff9f0722c7ccfa297f823b5e9e42a16f4

See more details on using hashes here.

File details

Details for the file son_logic_engine-0.2.4-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for son_logic_engine-0.2.4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bf96c54d37ae48001a965863d4835a992dbf36386dd39169331803e518e63706
MD5 702ec0be357dce9942b1940035c82e1e
BLAKE2b-256 9bab5b902c6957b917796abfd0f95f238fbab668646d0c50d366b8608c26dafe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page