ij.converters.enhanced_text

Enhanced text to DiagramIR converter with better NLP.

Provides more sophisticated text parsing with support for: - Conditional branches - Parallel flows - Loop detection - Better natural language understanding

class ij.converters.enhanced_text.EnhancedTextConverter[source]

Enhanced text-to-diagram converter with NLP capabilities.

Supports: - Conditional branches (if/else) - Parallel flows (parallel keyword) - Loops (while, repeat) - Better keyword detection - Multiple sentence formats

convert(text: str, title: str | None = None) DiagramIR[source]

Convert enhanced text to DiagramIR.

Parameters:
  • text – Input text describing a process/flow

  • title – Optional diagram title

Returns:

DiagramIR representation

Examples

>>> converter = EnhancedTextConverter()
>>> # Conditional
>>> diagram = converter.convert("Start -> Check user. If authenticated: Show dashboard, else: Show login")
>>> # Parallel
>>> diagram = converter.convert("Start -> [parallel: Process A, Process B] -> End")