v0.14.0 -- Reliability, Analysis Tools & New APIs
New API Functions
humanize_sentences()-- per-sentence AI scoring with graduated intensity; only rewrites sentences above a configurable AI probability thresholdhumanize_variants()-- generates 1-10 humanization variants with different random seeds, sorted by qualityhumanize_stream()-- generator that yields humanized text chunk-by-chunk with progress tracking
New Analysis Modules (zero-dependency, offline)
perplexity_v2-- character-level trigram cross-entropy model withcross_entropy()andperplexity_score()returning naturalness score (0-100) and verdictdict_trainer-- corpus analysis for custom dictionary building withtrain_from_corpus()andexport_custom_dict()plagiarism-- offline originality detection via n-gram fingerprinting withcheck_originality()andcompare_originality()
Pipeline Improvements
- Error isolation -- each processing stage wrapped in
_safe_stage()with try/except; failing stages are skipped gracefully instead of crashing the pipeline - Partial rollback -- pipeline records checkpoints after each stage; on validation failure, rolls back stage-by-stage to find the last valid state
- Pipeline profiling --
stage_timingsdict andtotal_timeincluded inmetrics_afterfor performance analysis
Bug Fixes & Code Quality
- Fixed
adversarial_calibrateintensity parameter (float 0-1 changed to int 0-100 to match API) - Added input sanitization: TypeError for non-str, ValueError for >500K chars, early return for empty text
- Thread-safe lazy loading with double-checked locking on all module loaders
- Instance-level plugins preventing cross-instance interference
- Fixed
humanize_sentencescrash (detect_ai_sentences returns list, not dict)
Tests
- 1,604 tests -- up from 1,560 (44 new tests for all v0.14.0 features)
- 100% pass rate