1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! Temporal text mining and event extraction.
//!
//! This module provides a comprehensive, rule-based pipeline for extracting
//! temporal information from English text, aligning events on a timeline, and
//! generating narrative summaries.
//!
//! # Sub-modules
//!
//! | Sub-module | Purpose |
//! |---|---|
//! | [`temporal_patterns`] | Compiled regex patterns for temporal expressions |
//! | [`temporal_relations`] | TIMEX3-style extraction, normalisation, relation classification |
//! | [`event_extraction`] | ACE-style event detection with trigger/argument extraction |
//! | [`timeline`] | Timeline construction, constraint propagation, narrative generation |
//!
//! # Quick-start Example
//!
//! ```rust
//! use scirs2_text::temporal::{
//! event_extraction::extract_events,
//! temporal_relations::extract_time_expressions,
//! timeline::{build_timeline, timeline_to_narrative},
//! temporal_patterns::all_patterns,
//! };
//!
//! let text = "The merger was announced in March 2019. The deal closed on 2019-09-01.";
//!
//! // 1. Extract temporal patterns.
//! let patterns = all_patterns(text);
//! assert!(!patterns.is_empty());
//!
//! // 2. Extract TIMEX3-like time expressions.
//! let timex = extract_time_expressions(text);
//! assert!(!timex.is_empty());
//!
//! // 3. Extract events.
//! let events = extract_events(text);
//!
//! // 4. Build and narrate timeline.
//! let timeline = build_timeline(events, &[]);
//! let narrative = timeline_to_narrative(&timeline);
//! println!("{}", narrative);
//! ```
// ---------------------------------------------------------------------------
// Top-level re-exports for ergonomic access
// ---------------------------------------------------------------------------
// Temporal patterns
pub use ;
// Temporal relations
pub use ;
// Event extraction
pub use ;
// Timeline
pub use ;