File size: 886 Bytes
7dcc17b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""Minimal usage example for hv-fold."""
from hv_fold import HVFold


TEXT = (
    "As noted above, the effect is small. The mechanism remains unclear. "
    "The data suggest a confound, as discussed below."
)


def main() -> None:
    model = HVFold()

    report = model.analyze(TEXT)

    print("=" * 60)
    print("hv-fold")
    print("=" * 60)
    print(model.render(report))
    print()

    print("=" * 60)
    print("Numeric summary")
    print("=" * 60)
    print(f"  fold         : {report.fold:.4f}")
    print(f"  tier         : {report.fold_tier}")
    print(f"  total load   : {report.total_load:.4f}")
    print(f"  sentences    : {report.n_sentences}")
    print(f"  anchors      : {report.anchor_sentences}")
    print(f"  reentry pts  : {report.reentry_points}")
    print(f"  plan         : {report.reading_plan}")
    print()


if __name__ == "__main__":
    main()