inputs¶
topic_segmentation.data.mimic.inputs
Build sentence-level MIMIC inputs for block and subheading segmentation.
python -m topic_segmentation.data.mimic.inputs --segments SEGMENTS.json --out-dir DIR
Write one note per JSONL row to mimic_<table>_<level>.jsonl. Label 1 marks the
last sentence of a block, or of a prelude or heading section at subheading level.
add_unit(sentences, labels, unit)
¶
Append non-empty sentences and mark the last as a boundary.
Source code in src/topic_segmentation/data/mimic/inputs.py
15 16 17 18 19 20 | |
flatten_note(note, level)
¶
Source code in src/topic_segmentation/data/mimic/inputs.py
23 24 25 26 27 28 29 30 31 32 33 | |
rows(notes, level)
¶
Source code in src/topic_segmentation/data/mimic/inputs.py
36 37 38 39 40 41 42 43 | |
main()
¶
Source code in src/topic_segmentation/data/mimic/inputs.py
46 47 48 49 50 51 52 53 54 55 56 57 58 | |