Skip to content

Python SDK

The SDK path is designed for notebooks, scripts, small evaluations, and future bot-driven dictionary checks.

from skeinrank import load_dictionary
dictionary = load_dictionary("company_dictionary.json")
from skeinrank import extract_terms
result = extract_terms(
"This runbook describes a k8s rollout backed by pg.",
dictionary=dictionary,
)
print(result.canonical_values)
from skeinrank import canonicalize_text
canonicalized = canonicalize_text(
"k8s rollout uses pg database",
dictionary=dictionary,
)
print(canonicalized.text)
from skeinrank import extract_terms_from_document
result = extract_terms_from_document(
"incident-runbook.md",
dictionary=dictionary,
)
print(result.document.file_name)
print(result.extraction.canonical_values)

The stable local SDK surface is expected to include:

  • Dictionary, DictionaryTerm, DictionaryAlias, DictionaryStopListEntry
  • load_dictionary(...)
  • validate_dictionary(...)
  • extract_terms(...)
  • canonicalize_text(...)
  • load_document_text(...)
  • extract_terms_from_document(...)
  • ExtractionResult, TermMatch, CanonicalizedText

Design direction

The SDK should stay deterministic, local, and easy to test. The platform can manage terminology, but runtime extraction should not require a live database query for every request.