Python Library v1.0.0: terraphim-automata
π 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.