クラス ParagraphPdfDocumentReader
java.lang.ObjectSE
org.springframework.ai.reader.pdf.ParagraphPdfDocumentReader
- 実装されたすべてのインターフェース:
SupplierSE<ListSE<Document>>
,DocumentReader
PDF カタログ (TOC など) 情報を使用して、入力 PDF をテキスト段落に分割し、段落ごとに 1 つの
Document
を出力します。このクラスは、PDF ドキュメントの読み取りと処理のためのメソッドを提供します。PDF コンテンツを解析し、テキスト段落に変換するために Apache PDFBox ライブラリを使用します。段落は Document
オブジェクトにグループ化されます。- 作成者:
- Christian Tzolov
フィールドのサマリー
フィールドコンストラクターの概要
コンストラクターコンストラクター説明ParagraphPdfDocumentReader
(StringSE resourceUrl) リソース URL を使用して ParagraphPdfDocumentReader を構築します。ParagraphPdfDocumentReader
(StringSE resourceUrl, PdfDocumentReaderConfig config) リソース URL と構成を使用して ParagraphPdfDocumentReader を構築します。ParagraphPdfDocumentReader
(org.springframework.core.io.Resource pdfResource) リソースを使用して ParagraphPdfDocumentReader を構築します。ParagraphPdfDocumentReader
(org.springframework.core.io.Resource pdfResource, PdfDocumentReaderConfig config) リソースと構成を使用して ParagraphPdfDocumentReader を構築します。メソッドのサマリー
修飾子と型メソッド説明protected void
addMetadata
(ParagraphManager.Paragraph from, ParagraphManager.Paragraph to, Document document) get()
PDF ドキュメントを読み取って処理し、段落を抽出します。getTextBetweenParagraphs
(ParagraphManager.Paragraph fromParagraph, ParagraphManager.Paragraph toParagraph) protected Document
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.ai.document.DocumentReader から継承されたメソッド
read
フィールドの詳細
document
protected final org.apache.pdfbox.pdmodel.PDDocument documentresourceFileName
コンストラクターの詳細
ParagraphPdfDocumentReader
リソース URL を使用して ParagraphPdfDocumentReader を構築します。- パラメーター:
resourceUrl
- PDF リソースの URL。
ParagraphPdfDocumentReader
public ParagraphPdfDocumentReader(org.springframework.core.io.Resource pdfResource) リソースを使用して ParagraphPdfDocumentReader を構築します。- パラメーター:
pdfResource
- PDF リソース。
ParagraphPdfDocumentReader
リソース URL と構成を使用して ParagraphPdfDocumentReader を構築します。- パラメーター:
resourceUrl
- PDF リソースの URL。config
- PDF ドキュメント処理の構成。
ParagraphPdfDocumentReader
public ParagraphPdfDocumentReader(org.springframework.core.io.Resource pdfResource, PdfDocumentReaderConfig config) リソースと構成を使用して ParagraphPdfDocumentReader を構築します。- パラメーター:
pdfResource
- PDF リソース。config
- PDF ドキュメント処理の構成。
メソッドの詳細
get
PDF ドキュメントを読み取って処理し、段落を抽出します。- 次で指定:
- インターフェース
SupplierSE<ListSE<Document>>
のget
- 戻り値:
- 段落を表す
Document
オブジェクトのリスト。
toDocument
addMetadata
protected void addMetadata(ParagraphManager.Paragraph from, ParagraphManager.Paragraph to, Document document) getTextBetweenParagraphs
public StringSE getTextBetweenParagraphs(ParagraphManager.Paragraph fromParagraph, ParagraphManager.Paragraph toParagraph)