Skip to content

Python Library v1.0.0: terraphim-automata

Choose a tag to compare

@AlexMikhalev AlexMikhalev released this 16 Nov 18:17
efa794d

🐍 terraphim-automata Python Library v1.0.0

The first Python release of Terraphim AI's high-performance autocomplete and text processing library!

✨ What's Included

  • Fast Autocomplete: FST-based prefix search with configurable results
  • Fuzzy Search: Jaro-Winkler and Levenshtein similarity algorithms
  • Text Processing: Term matching, link replacement, paragraph extraction
  • Knowledge Graph: Thesaurus management and graph operations
  • TypeScript Support: Comprehensive type definitions for IDE integration

πŸš€ Installation

pip install terraphim-automata

πŸ“š Quick Start

from terraphim_automata import build_index, AutocompleteIndex

# Create a thesaurus
thesaurus_json = '''
{
    "name": "Engineering",
    "data": {
        "machine learning": {
            "id": 1,
            "nterm": "machine learning",
            "url": "https://example.com/ml"
        }
    }
}
'''

# Build autocomplete index
index = build_index(thesaurus_json)

# Search for completions
results = index.search("mach")
for result in results:
    print(f"{result.term} (score: {result.score})")

πŸ”§ Features

  • High Performance: Rust-backed implementation with FST for O(1) prefix searches
  • Comprehensive API: 59 passing tests with full functionality coverage
  • Multiple Search Types: Exact prefix, fuzzy search, and text processing
  • Knowledge Graph Support: Complete thesaurus and graph operations
  • Cross-Platform: Python 3.9+ support on all major platforms

πŸ“Š Test Coverage

  • 59/59 tests passing (100% for core functionality)
  • 3 working examples included
  • TypeScript definitions for IDE support
  • Comprehensive documentation

🎯 Use Cases

  • Autocomplete systems for applications
  • Text processing and search engines
  • Knowledge graph navigation
  • Content management systems
  • NLP and semantic search applications

Built with ❀️ using PyO3 and maturin


This release includes all the functionality from terraphim_automata v1.0.0 (Rust) with Python bindings.