error_handling

 1from intelli3text import PipelineBuilder, Intelli3Config
 2from intelli3text.errors import Intelli3Error, ModelNotFoundError
 3
 4cfg = Intelli3Config(export=None)
 5pipeline = PipelineBuilder(cfg).build()
 6
 7try:
 8    res = pipeline.process("https://example.invalid/nonexistent")
 9    print("Paragraphs:", len(res.get("paragraphs", [])))
10except ModelNotFoundError as e:
11    print("Model/resource missing:", e)
12except Intelli3Error as e:
13    print("intelli3text error:", e)
14except Exception as e:
15    print("Generic error:", e)
cfg = Intelli3Config(cleaners=['ftfy', 'ocr_tilde_fix', 'pdf_breaks', 'pt_diacritics_repair', 'clean_text', 'strip_accents'], lid_primary='fasttext', lid_fallback=None, languages_supported={'es', 'pt', 'en'}, nlp_model_pref='lg', paragraph_min_chars=30, lid_min_chars=60, lid_threshold=0.65, lid_max_chars=2500, lid_use_cld3=True, lid_cld3_weight=0.4, export=None)
pipeline = <intelli3text.pipeline.Pipeline object>