Class SmartDocumentSegmenter
java.lang.Object
com.tnsai.intelligence.rag.segment.SmartDocumentSegmenter
Heading-aware splitter for long-document analysis.
Markdown is read as UTF-8. PDF and DOCX go through the installed
ContentExtractorRegistry; missing backends fail loud. Each
section keeps figure captions that sit next to it, resolves
Section X.Y references against later headings, and carries a
cumulative first-sentence digest of the preceding sections.
- Since:
- 0.14.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSegments already-extracted text (Markdown or plain extracted prose).Reads a file and segments it.
-
Constructor Details
-
SmartDocumentSegmenter
public SmartDocumentSegmenter()Uses the discovered extractor registry.
-
-
Method Details
-
segment
Segments already-extracted text (Markdown or plain extracted prose).- Parameters:
text- document text- Returns:
- ordered sections; never empty for non-blank input
-
segment
Reads a file and segments it..mdis UTF-8; PDF/DOCX use the installed extractors.- Parameters:
file- source path- Returns:
- ordered sections
-