Available on crate feature
analysis only.Expand description
Utility functions for dialogue event analysis
Provides common operations for collections of dialogue events including sorting, duration calculations, and overlap detection. Optimized for performance with large event collections.
§Features
- Efficient sorting by timing with stable ordering
- Total duration calculation across event collections
- Overlap detection delegation to efficient algorithms
- Zero-allocation operations where possible
§Performance
- Sorting: O(n log n) with optimized comparison
- Duration: O(n) single pass with min/max tracking
- Overlap detection: O(n log n) via sweep-line algorithm
Functions§
- calculate_
average_ duration - Calculate average event duration
- calculate_
total_ duration - Calculate total duration spanning all events
- count_
overlapping_ dialogue_ events - Count overlapping dialogue events efficiently
- find_
events_ in_ range - Find events within a specific time range
- find_
overlapping_ dialogue_ events - Find overlapping dialogue events using efficient timing analysis
- sort_
events_ by_ time - Sort events by timing with stable ordering