JP7041103B2 - Structured document creation device and its method - Google Patents
Structured document creation device and its method Download PDFInfo
- Publication number
- JP7041103B2 JP7041103B2 JP2019155289A JP2019155289A JP7041103B2 JP 7041103 B2 JP7041103 B2 JP 7041103B2 JP 2019155289 A JP2019155289 A JP 2019155289A JP 2019155289 A JP2019155289 A JP 2019155289A JP 7041103 B2 JP7041103 B2 JP 7041103B2
- Authority
- JP
- Japan
- Prior art keywords
- text
- structured document
- frame element
- management list
- document
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、非構造化文書から構造化文書を作成する構造化文書作成装置とその方法に関する。 The present invention relates to a structured document creating apparatus for creating a structured document from an unstructured document and a method thereof.
マニュアル等のナレッジ・文書から情報を抽出する技術がある。又抽出した情報を元に機械学習を用いた情報処理を行い質問に対する回答を生成する技術がある。効果的な機械学習を行うには、情報を構造化(タグ付け)する必要がある。 There is a technology to extract information from knowledge and documents such as manuals. There is also a technology that processes information using machine learning based on the extracted information and generates answers to questions. Information needs to be structured (tagged) for effective machine learning.
ただし、例えば製品マニュアル等の文書形式は、非構造化文書(タグなしPDF)であることが多い。したがって、機械学習を用いた情報処理を行うためには、非構造化文書を構造化する事前処理が必要である。 However, the document format such as a product manual is often an unstructured document (untagged PDF). Therefore, in order to perform information processing using machine learning, pre-processing for structuring an unstructured document is required.
ファイル形式に着目すれば、非構造化文書から構造化文書を作成する技術として光学的文字認識(OCR)が存在する。しかし、OCRは、レイアウトの再現に止まり、章及び節等の文書の構造を表すセクション情報の取得は行えない。 Focusing on the file format, there is optical character recognition (OCR) as a technique for creating a structured document from an unstructured document. However, OCR can only reproduce the layout and cannot acquire section information representing the structure of the document such as chapters and sections.
構造化文書を作成する構造化文書作成装置は、例えば特許文献1に開示されている。
A structured document creating apparatus for creating a structured document is disclosed in, for example,
しかしながら、特許文献1に開示された技術は、構造化する対象の文書が事業報告書に限定される。事業報告書のフォーマットに適合しない文書は構造化することができない。つまり、従来の技術は汎用性が低いという課題がある。
However, in the technology disclosed in
本発明は、この課題に鑑みてなされたものであり、区分された非構造化文書であればあらゆる種類の文書に対応できる汎用性の高い構造化文書作成装置とその方法を提供することを目的とする。区分された非構造化文書は、例えば、マニュアル、取り扱い説明書、及び仕様書等である。区分されていない非構造化文書は例えば随筆等である。 The present invention has been made in view of this problem, and an object of the present invention is to provide a highly versatile structured document creation device and a method thereof that can handle all kinds of documents as long as they are classified unstructured documents. And. The classified unstructured documents are, for example, manuals, instruction manuals, specifications, and the like. Unstructured documents that are not classified are, for example, essays.
本発明の構造化文書作成装置は、区分された非構造化文書から、所定の型に適合するように記述された構造化文書を作成する構造化文書作成装置であって、前記非構造化文書の頁ごとに、テキストフレーム要素、表フレーム要素、及び画像フレーム要素を取得する文書構造取得部と、前記テキストフレーム要素、前記表フレーム要素、及び前記画像フレーム要素のそれぞれの前記頁における位置とその内容とを対応付けてリスト化した管理リストを生成する管理リスト生成部と、前記管理リストを参照し、前記頁ごとに前記テキストフレーム要素を書き順に並べるテキストフレーム要素配列部と、並べた前記テキストフレーム要素を、分割定義プロパティに設定されたルールに基づいて分割した第1構造化文書を生成するテキスト情報構造化部と、前記管理リストを参照して前記第1構造化文書に前記表フレーム要素と前記画像フレーム要素を挿入したHTMLファイルを生成するHTML化部とを備え、前記ルールは、フォントサイズ、文字位置、及び見出しを識別する規則を含むものである。 The structured document creation device of the present invention is a structured document creation device that creates a structured document described so as to conform to a predetermined type from a classified unstructured document, and is the unstructured document. For each page, a document structure acquisition unit that acquires a text frame element, a table frame element, and an image frame element, and the positions of the text frame element, the table frame element, and the image frame element on the page and their positions thereof. A management list generation unit that generates a management list that is listed in association with the contents, a text frame element arrangement unit that refers to the management list and arranges the text frame elements in the writing order for each page, and the arranged text. The text information structuring unit that generates the first structured document in which the frame element is divided based on the rule set in the division definition property, and the table frame element in the first structured document with reference to the management list. The rule includes a rule for identifying a font size, a character position, and a heading .
また、本発明の構造化文書作成方法は、上記の構造化文書作成装置が行う構造化文書作成方法であって、前記非構造化文書の頁ごとに、テキストフレーム要素、表フレーム要素、及び画像フレーム要素を取得する文書構造取得ステップと、前記テキストフレーム要素、前記表フレーム要素、及び前記画像フレーム要素のそれぞれの前記頁における位置とその内容とを対応付けてリスト化した管理リストを生成する管理リスト生成ステップと、前記管理リストを参照し、前記頁ごとに前記テキストフレーム要素を書き順に並べるテキストフレーム要素配列ステップと、並べた前記テキストフレーム要素を、分割定義プロパティに設定されたルールに基づいて分割した第1構造化文書を生成するテキスト情報構造化ステップと、前記管理リストを参照して前記第1構造化文書に前記表フレーム要素と前記画像フレーム要素を挿入したHTMLファイルを生成するHTML化ステップとを行い前記ルールは、フォントサイズ、文字位置、及び見出しを識別する規則を含むものである。 Further, the structured document creation method of the present invention is a structured document creation method performed by the above-mentioned structured document creation apparatus, and a text frame element, a table frame element, and an image are used for each page of the unstructured document. A management to generate a management list in which the document structure acquisition step for acquiring a frame element and the position of each of the text frame element, the table frame element, and the image frame element on the page and their contents are associated with each other and listed. Based on the rule set in the division definition property, the list generation step, the text frame element array step that refers to the management list and arranges the text frame elements for each page in the writing order, and the arranged text frame elements. A text information structuring step to generate a divided first structured document , and an HTML file to generate an HTML file in which the table frame element and the image frame element are inserted into the first structured document with reference to the management list. The rules include a rule for identifying font size, character position, and heading .
本発明によれば、区分された非構造化文書であればあらゆる種類の文書に対応できる汎用性の高い構造化文書作成装置とその方法を提供することができる。 INDUSTRIAL APPLICABILITY According to the present invention, it is possible to provide a highly versatile structured document creation device and a method thereof that can handle all kinds of documents as long as they are classified unstructured documents.
以下、本発明の実施の形態について図面を用いて説明する。複数の図面中同一のものには同じ参照符号を付し、説明は繰り返さない。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. The same reference numerals are given to the same objects in a plurality of drawings, and the description is not repeated.
〔第1実施形態〕
図1は、本発明の第1実施形態に係る構造化文書作成装置の機能構成例を示す図である。図1に示す構造化文書作成装置100は、区分された非構造化文書から、所定の型に適合するように記述された構造化文書を作成する装置である。
[First Embodiment]
FIG. 1 is a diagram showing a functional configuration example of the structured document creating device according to the first embodiment of the present invention. The structured
構造化文書作成装置100は、PDF生成部10、文書構造取得部20、管理リスト生成部30、テキストフレーム要素配列部40、テキスト情報構造化部50、HTML化部60、操作部70、及び表示部80を備える。構造化文書作成装置100は、例えば、ROM、RAM、CPU等からなるコンピュータで実現することができる。各機能構成部をコンピュータによって実現する場合、各機能構成部が有すべき機能の処理内容はプログラムによって記述される。このことは後述する他の実施形態でも同じである。
The structured
なお、図1において、他の装置とネットワーク(図示せず)を介して通信する通信部の表記は省略している。これらの一般的な機能構成部である通信部(図示せず)、操作部70、及び表示部80の説明は省略する。
In FIG. 1, the notation of the communication unit that communicates with other devices via a network (not shown) is omitted. The description of the communication unit (not shown), the
PDF生成部10は、例えば文書作成するアプリケーションソフトウェアで構成され、ユーザが作成した文書をPDF(Portable Document Format)ファイル構造で生成する。PDFファイル構造は、ページツリーとアウトラインツリーで構成される。ページツリーは、ページごとの内容とサムネール(縮小させた見本)を含む。アウトラインツリーは、文書の章及び節を示すしおり情報等を含む。以降、ページは頁と表記する。
The
図2は、構造化文書作成装置100の処理手順を示すフローチャートである。ここから図1と図2を参照して構造化文書作成装置100の動作を説明する。
FIG. 2 is a flowchart showing a processing procedure of the structured
文書構造取得部20は、区分された非構造化文書の頁ごとに、テキストフレーム要素、表フレーム要素、及び画像フレーム要素を取得する(ステップS1)。区分された非構造化文書は、章及び節等の構成が明らかな文書のことである。
The document
図3は、本実施形態が対象とする区分された非構造化文書の一頁を模式的に示す図である。図3に示すように、非構造化文書の一頁Pは、タイトルT、サブタイトルST、本文C、図Z、及び表Hを含む。なお、本文Cのみで構成される(図Z等を含まない)頁Pもあり得る。 FIG. 3 is a diagram schematically showing one page of the divided unstructured document targeted by the present embodiment. As shown in FIG. 3, one page P of an unstructured document includes a title T, a subtitle ST, a text C, a figure Z, and a table H. It should be noted that there may be a page P composed of only the text C (not including FIG. Z and the like).
図3において、テキストフレーム要素は、タイトルT、サブタイトルST、及び本文Cである。また、表フレーム要素は表Hである。また、画像フレームは図Zである。それぞれをフレーム要素と称しているのは、頁Pの上にそれぞれが所定の範囲(座標)に記載されていることによる。 In FIG. 3, the text frame elements are the title T, the subtitle ST, and the text C. The table frame element is table H. The image frame is shown in FIG. Z. Each is referred to as a frame element because each is described in a predetermined range (coordinates) on page P.
図4は、文書構造取得部20で取得されたテキストフレーム要素の一部を示す。テキストフレーム要素は、XML(eXtensible Markup Language)形式で表される。
FIG. 4 shows a part of the text frame element acquired by the document
図4に示す各行のそれぞれは、文書を構成するフォントを表す。1~2行目はフォントの「こ」、3~4行目は同「の」、5~6行目は同「た」である。7行目以降は省略する。 Each of the lines shown in FIG. 4 represents the font that constitutes the document. The 1st and 2nd lines are the font "ko", the 3rd and 4th lines are the same "no", and the 5th and 6th lines are the same "ta". The 7th and subsequent lines are omitted.
図4に記載されたahp:lはフォントの左位置、ahp:rは同右位置、ahp:tは同上位置、ahp:bは同下位置の頁P上の座標を表す。 In FIG. 4, ahp: l represents the left position of the font, ahp: r represents the same right position, ahp: t represents the same top position, and ahp: b represents the coordinates on the page P at the same bottom position.
管理リスト生成部30は、テキストフレーム要素、表フレーム要素、及び画像フレーム要素のそれぞれの頁Pにおける位置(座標)とその内容とを対応付けてリスト化した管理リストを生成する(ステップS2)。テキストフレーム要素は、XMLで表されるフォントの出現順を利用して文字列を取得する。また、その文字列の位置も左位置ahp:l~下位置ahp:bで取得する。
The management
図4に示す「このたびは、」のテキストフレーム要素の位置は、左位置ahp:l=62.32、右位置ahp:r=124.12、上位置ahp:t=739.70、下位置ahp:b=749.70である。管理リスト生成部30は、テキストフレーム要素の位置とその内容を対応付けてリスト化する。
The positions of the text frame elements of "This time" shown in Fig. 4 are the left position ahp: l = 62.32, the right position ahp: r = 124.12, the upper position ahp: t = 739.70, and the lower position ahp: b = 749.70. be. The management
図5は、テキストフレーム要素をリスト化したテキスト管理リスト31の例を示す図である。テキスト管理リスト31は、例えば、文字(文字列)、文字列長、ページ、左位置、上位置、右位置、下位置、オペレーションNo、及び書き順の項目から成る。オペレーションNoと書き順は、文字の出現順番を表す情報である。
FIG. 5 is a diagram showing an example of a
管理リスト生成部30は、頁P内の図と表についてもテキストフレーム要素と同様にそれぞれの位置とその内容を対応付けて画像管理リスト32とテーブル管理リスト33を生成する。
The management
図6は、画像フレーム要素をリスト化した画像管理リスト32の例を示す図である。画像管理リスト32は、画像、ページ、左位置、上位置、右位置、及び下位置の項目からなる。画像は、画像ファイル名と画像ファイルパスで構成される。 FIG. 6 is a diagram showing an example of an image management list 32 in which image frame elements are listed. The image management list 32 includes items of an image, a page, a left position, an upper position, a right position, and a lower position. The image consists of an image file name and an image file path.
図7は、表フレーム要素をリスト化したテーブル管理リスト33の例を示す図である。テーブル管理リスト33は、表ID、ページ、左位置、上位置、右位置、及び下位置の項目からなる。
FIG. 7 is a diagram showing an example of a
テキスト管理リスト31、画像管理リスト32、及びテーブル管理リスト33のそれぞれを参照すれば頁Pに記載されたコンテンツを全て再現することができる。
By referring to each of the
テキストフレーム要素配列部40は、テキスト管理リスト31を参照し、テキストフレーム要素を頁ごとに並べ替える(ステップS3)。例えば、図3に示したように、タイトルT、サブタイトルST、本文Cの順番でテキストフレーム要素を並べる。
The text frame
テキスト情報構造化部50は、テキストフレーム要素配列部40で並べたテキストフレーム要素を、分割定義プロパティ51に設定されたフォントサイズ、文字位置、所定の規則を表す正規表現、及びしおり情報の何れかのルールに基づいて構造化した第1構造化文書を生成する(ステップS4)。分割定義プロパティ51は予めユーザが設定する情報であり、例えば、しおり情報に基づいてテキストフレーム情報を並べる、フォントサイズに応じてタイトルTとサブタイトルSTを切り分ける等のルールを定めたものである。また、正規表現の具体例については後述する。
The text
図8は、分割定義プロパティ51に設定されたルールの例を示す図である。図8に示すように、頁P上のx座標、y座標ともに小さいほど上位のセクション、フォントサイズが大きいほど上位のセクションにするといったルールが設定される。セクションは、文書の区切られた部分であり章>節>項のそれぞれを表す。
FIG. 8 is a diagram showing an example of a rule set in the
文字位置が(10,5)⇒<h1>を付与は、座標(10,5)に記載された文字列には見出しタグ<h1>を付与することを意味する。座標(10,5)は一例である。見出しタグ<h1>は、例えば章のタイトルに付与される。 Adding the character position (10, 5) ⇒ <h1> means adding the heading tag <h1> to the character string described in the coordinates (10, 5). The coordinates (10, 5) are an example. The heading tag <h1> is attached to the chapter title, for example.
フォントサイズが14p⇒<h2>を付与は、14pのフォントサイズの文字列には見出しタグ<h2>を付与することを意味する。(数字)で始まっている⇒<h3>を付与は、行の先頭が数字の場合に、見出しタグ<h3>を付与することを意味する。見出しタグは、<h6>まで用意されている。見出しタグで表される文字列の大きさは、<h1>><h2>><h3>…の関係である。 When the font size is 14p⇒ <h2>, it means that the heading tag <h2> is added to the character string of the font size of 14p. Starting with (number) ⇒ Adding <h3> means adding the heading tag <h3> when the beginning of the line is a number. Heading tags are available up to <h6>. The size of the character string represented by the heading tag is related to <h1 >> <h2 >> <h3> ....
図9は、テキスト情報構造化部50が生成した第1構造化文書の例を示す図である。見出しタグの開始タグ<h1>と終了タグ</h1>に挟まれた要素は、「第3節 光コラボレーション受付センタについて」である。この要素は、例えば「文字位置が(10,5)⇒<h1>を付与」のルールが適用され、当該頁Pの最上位の見出しになる。
FIG. 9 is a diagram showing an example of a first structured document generated by the text
図9に示す2行目は、分割定義プロパティ51に設定された「フォントサイズが14p⇒<h2>を付与」が適用され、「1. 光コラボレーション受付センタとは」を開始タグ<h2>と終了タグ</h2>で挟んで構造化されたことを示している。
In the second line shown in FIG. 9, "font size is 14p⇒ <h2> is given" set in the
同3行目は、(数字)で始まっている⇒<h3>のルールが適用され、「(1)概要」を開始タグ<h3>と終了タグ</h3>で挟んで構造化されたことを示している。4行目~7行目は、テキストフレーム要素の本文Cがタグ<p>で挟まれて構造化されている。 The third line starts with (number) ⇒ The rule of <h3> is applied, and "(1) Overview" is structured by sandwiching the start tag <h3> and the end tag </ h3>. Is shown. The 4th to 7th lines are structured so that the body C of the text frame element is sandwiched between tags <p>.
このように、テキスト情報構造化部50は、管理リストを参照して並べたテキストフレーム要素を、分割定義プロパティに設定されたルールに基づいて構造化する。よって、あらゆる種類の文書で有ってもルールに基づいて文書を構造化することができる。
In this way, the text
なお、ルールは、文字位置とフォントサイズに基づく例を示したが他にも考えられる。所定の規則を表す正規表現、又は非構造化文書に含まれるしおり情報に基づくルールを分割定義プロパティに設定するようにしてもよい。 The rule shows an example based on the character position and the font size, but other possibilities are possible. A regular expression representing a predetermined rule, or a rule based on bookmark information contained in an unstructured document may be set in the division definition property.
所定の規則を表す正規表現とは、例えば、見出しを識別する一定のルールのことである。例えば、セクションレベル1:(I-IX)、セクションレベル2:(1-9)といった正規表現が考えられる。 A regular expression that represents a given rule is, for example, a fixed rule that identifies a heading. For example, regular expressions such as section level 1: (I-IX) and section level 2: (1-9) can be considered.
セクションレベル1:(I-IX)は、(I)、(II)、…、(X)のようにかっこに挟まれたローマ数字をセクションレベル1(例えば「章」)として構造化する正規表現である。また、セクションレベル2:(1-9)は、(1)、(2)、…、(10)のようにかっこに挟まれたアラビヤ数字をセクションレベル2(例えば「節」)として構造化する正規表現である。 Section level 1: (I-IX) is a regular expression that structures Roman numerals in parentheses as section level 1 (eg, "chapter"), such as (I), (II), ..., (X). Is. Further, section level 2: (1-9) structures arabia numbers sandwiched between parentheses such as (1), (2), ..., (10) as section level 2 (for example, "section"). It is a regular expression.
また、非構造化文書のPDFファイル構造のアウトラインツリーに含まれるしおり情報に基づいて、管理リストを参照して並べたテキストフレーム要素を構造化してもよい。 Further, the text frame elements arranged by referring to the management list may be structured based on the bookmark information included in the outline tree of the PDF file structure of the unstructured document.
HTML化部60は、テキスト情報構造化部50が生成した第1構造化文書に、図Zと表Hを挿入したHTMLファイルを生成する(ステップS5)。図Zは、画像管理リスト32(図6)を参照して第1構造化文書に挿入される。表Hは、テーブル管理リスト33(図7)を参照して第1構造化文書に挿入される。
The HTML-forming
以上説明したように本実施形態に係る構造化文書作成装置100は、区分された非構造化文書から、所定の型に適合するように記述された構造化文書を作成する構造化文書作成装置であって、非構造化文書の頁ごとに、テキストフレーム要素、表フレーム要素、及び画像フレーム要素を取得する文書構造取得部20と、テキストフレーム要素、表フレーム要素、及び画像フレーム要素のそれぞれの頁における位置とその内容とを対応付けてリスト化した管理リストを生成する管理リスト生成部30と、管理リストを参照し、テキストフレーム要素を頁ごとに並べるテキストフレーム要素配列部40と、並べたテキストフレーム要素を、分割定義プロパティ51に設定されたルールに基づいて構造化した第1構造化文書を生成するテキスト情報構造化部50とを備える。これにより、区分された非構造化文書であればあらゆる種類の文書に対応できる汎用性の高い構造化文書作成装置とその方法を提供することができる。
As described above, the structured
〔第2実施形態〕
図10は、本発明の第2実施形態に係る構造化文書作成装置の機能構成例を示す図である。図10に示す構造化文書作成装置200は、分割部210とHTML化部260を備える点で構造化文書作成装置100(図1)と異なる。図11は、構造化文書作成装置200の処理手順を示すフローチャートである。
[Second Embodiment]
FIG. 10 is a diagram showing a functional configuration example of the structured document creation device according to the second embodiment of the present invention. The structured
分割部210は、テキスト情報構造化部50が生成した第1構造化文書を構成するテキストに含まれる複数の文のそれぞれをベクトル化して前後の類似度を求め、該類似度と分割定義プロパティ51に設定された閾値とを比較して上記のテキストを分割した第2構造化文書を生成する(ステップS6)。
The
テキストに含まれる複数の文は、例えば周知のBoW(bag-of-words)を用いてベクトル化する。BoWは、一文を形態素解析して分割した単語にユニークな数値を割り当て、全ての単語をone hot vectorに変換する。one hot vectorは、上記のテキスト内に存在する単語が1とされ、以外が0とされたベクトルである。BoWは周知であり、これ以上の説明は省略する。 A plurality of sentences contained in the text are vectorized using, for example, a well-known BoW (bag-of-words). BoW morphologically analyzes a sentence, assigns a unique numerical value to the divided words, and converts all the words into one hot vector. One hot vector is a vector in which the words existing in the above text are set to 1 and the words other than the above are set to 0. BoW is well known and further description is omitted.
分割部210は、ベクトル化した文の前後の類似度を求める。そして、分割部210は、分割定義プロパティ51に設定された閾値と類似度を比較して第1構造化文書を構成するテキストを分割した第2構造化文書を生成する。テキストを分割する閾値は、例えば0.2とする。この場合、類似度が0.2よりも小さい場合は前後する一文間の関連性が低いと判定し、類似度が0.2になる一文の前後でテキストを分割して構造化する。
The
図12は、テキストを分割する様子を模式的に示す図である。図12に示す様に、第1構造化文書を構成するテキストは、例えば5つの文から成り、一文aと次の一文bの類似度は0.88である。一文bと一文cの類似度は0.75である。一文cと一文dの類似度は0.11である。一文dと一文eの類似度は0.97である。 FIG. 12 is a diagram schematically showing how the text is divided. As shown in FIG. 12, the text constituting the first structured document is composed of, for example, five sentences, and the similarity between one sentence a and the next sentence b is 0.88. The similarity between one sentence b and one sentence c is 0.75. The similarity between one sentence c and one sentence d is 0.11. The similarity between one sentence d and one sentence e is 0.97.
この場合、分割部210は、一文cとdの間で分割して構造化した第2構造化文書を生成する。このようにテキストを、関連性の低い一文の間で分割した第2構造化文書は、分割された一群のテキストの意味を明確にすることができる。
In this case, the
以上説明したように本実施形態に係る構造化文書作成装置200は、第1構造化文書を構成する分割されたテキストを構成する一文のそれぞれをベクトル化して前後の類似度を求め、該類似度と分割定義プロパティ51に設定された閾値とを比較し、類似度が閾値よりも小さい場合はテキストを分割した第2構造化文書を生成する分割部210と、画像管理リスト32とテーブル管理リスト33を参照し、第2構造化文書に画像及び表を挿入したHTMLファイルを生成するHTML化部260とを備える。これにより、テキストを適切な長さに分割することができる。
As described above, the structured
(変形例)
第1構造化文書を分割するだけでなく、第1構造化文書を構成するテキストを結合させても良い。テキストを結合させる場合の閾値は、例えば0.8とする。この場合、類似度が0.8よりも大きな一文は同じ段落を表すものとして結合して構造化する。
(Modification example)
Not only the first structured document may be divided, but also the texts constituting the first structured document may be combined. The threshold value when combining texts is, for example, 0.8. In this case, sentences with a similarity greater than 0.8 are combined and structured as representing the same paragraph.
第1構造化文書を構成する分割されたテキストを構成する一文のそれぞれをベクトル化して前後の類似度を求め、該類似度と分割定義プロパティに設定された第1閾値とを比較し、類似度が第1閾値よりも小さい場合はテキストを分割した第2構造化文書を生成し、又は、前後する前方のテキストの最下行の一文と、後方のテキストの最初の一文のそれぞれをベクトル化して前後の類似度を求め、該類似度と分割定義プロパティに設定された第2閾値とを比較し、類似度が第2閾値よりも大きい場合は分割された前後のテキストを結合した第2構造化文書を生成する分割・結合部211(図示せず)と、画像管理リストとテーブル管理リストを参照し、第2構造化文書に画像及び表を挿入したHTMLファイルを生成するHTML化部とを備える。これにより、テキストを適切な長さに分割することができる。 Each of the sentences constituting the divided text constituting the first structured document is vectorized to obtain the similarity before and after, and the similarity is compared with the first threshold value set in the division definition property to obtain the similarity. If is less than the first threshold, generate a second structured document that divides the text, or vectorize each of the bottom line sentence of the front text and the first sentence of the back text before and after. The similarity is obtained, the similarity is compared with the second threshold set in the division definition property, and if the similarity is larger than the second threshold, the second structured document in which the texts before and after the division are combined is combined. It is provided with a division / combination unit 211 (not shown) for generating the image and an HTML unit for generating an HTML file in which an image and a table are inserted in a second structured document with reference to an image management list and a table management list. This allows the text to be split into appropriate lengths.
(評価結果)
本実施形態に係る構造化文書作成装置100による構造化文書の作業効率の向上の度合いを評価する目的で、手作業で構造化文書を作成した場合と比較を行った。構造化する対象の文書は、327頁29ファイルから成るE社マニュアルと649頁4ファイルから成るF社マニュアルの2つを用いた。
(Evaluation results)
For the purpose of evaluating the degree of improvement in the work efficiency of the structured document by the structured
表1に示すように構造化文書作成に要する作業時間は約1/6に短縮することができた。 As shown in Table 1, the work time required to create a structured document could be reduced to about 1/6.
次に、本実施形態に係る構造化文書作成装置200によるテキストの分割による検索精度への影響を評価した結果を表2に示す。
Next, Table 2 shows the results of evaluating the influence of the text division by the structured
表2に示す様に本実施形態によれば、検索して回答する作業の迅速化が可能である。本実施に係る構造化文書作成装置200で作成した構造化文書を例えばお客様相談室で用いた場合、お客様への応答時間を短縮し、お客様満足度を向上させる効果が得られる。
As shown in Table 2, according to the present embodiment, it is possible to speed up the work of searching and answering. When the structured document created by the structured
以上説明したように本実施形態の構造化文書作成装置100によれば、区分された非構造化文書であればあらゆる種類の文書に対応できる汎用性の高い構造化文書作成装置とその方法を提供することができる。また、本実施形態の構造化文書作成装置200によれば、構造化された一群のテキストの意味を明確にすることができる。
As described above, the structured
なお、上記の実施形態は、PDF生成部10を備える例で説明を行ったがPDF生成部10は無くても構わない。区分された非構造化文書は、構造化文書作成装置100,200に直接入力されるようにしてもよい。このように本発明は、上記した実施形態に限定されるものではなく、その要旨の範囲内で数々の変形が可能である。
Although the above embodiment has been described with an example including the
10:PDF生成部
20:文書構造取得部
30:管理リスト生成部
40:テキストフレーム要素配列部
50:テキスト情報構造化部
51:分割定義プロパティ
60、260:HTML化部
210:分割部
211:分割・結合部
10: PDF generation unit 20: Document structure acquisition unit 30: Management list generation unit 40: Text frame element arrangement unit 50: Text information structuring unit 51:
Claims (4)
前記非構造化文書の頁ごとに、テキストフレーム要素、表フレーム要素、及び画像フレーム要素を取得する文書構造取得部と、
前記テキストフレーム要素、前記表フレーム要素、及び前記画像フレーム要素のそれぞれの前記頁における位置とその内容とを対応付けてリスト化した管理リストを生成する管理リスト生成部と、
前記管理リストを参照し、前記頁ごとに前記テキストフレーム要素を書き順に並べるテキストフレーム要素配列部と、
並べた前記テキストフレーム要素を、分割定義プロパティに設定されたルールに基づいて分割した第1構造化文書を生成するテキスト情報構造化部と、
前記管理リストを参照して前記第1構造化文書に前記表フレーム要素と前記画像フレーム要素を挿入したHTMLファイルを生成するHTML化部と
を備え、
前記ルールは、フォントサイズ、文字位置、及び見出しを識別する規則を含み、
前記テキスト情報構造化部は、前記テキストフレーム要素に、前記文字位置および前記フォントサイズに応じたレベルの見出しタグ、および、段落タグを付与する
ことを特徴とする構造化文書作成装置。 A structured document creation device that creates a structured document described to fit a predetermined type from a classified unstructured document.
A document structure acquisition unit that acquires text frame elements, table frame elements, and image frame elements for each page of the unstructured document.
A management list generation unit that generates a management list that lists the positions of the text frame element, the table frame element, and the image frame element on the page in association with each other and their contents.
A text frame element array section that arranges the text frame elements in the writing order for each page with reference to the management list.
A text information structuring unit that generates a first structured document in which the arranged text frame elements are divided based on the rules set in the division definition property.
It is provided with an HTML conversion unit that generates an HTML file in which the table frame element and the image frame element are inserted into the first structured document with reference to the management list.
The rules include rules for identifying font size, character position, and heading.
The text information structuring unit adds a heading tag and a paragraph tag at a level corresponding to the character position and the font size to the text frame element.
A structured document creation device characterized by this.
を備え、
前記HTML化部は、前記管理リストを参照して前記第2構造化文書に対しても前記表フレーム要素と前記画像フレーム要素を挿入したHTMLファイルを生成する
ことを特徴とする請求項1に記載の構造化文書作成装置。 Each of the sentences constituting the divided text constituting the first structured document is vectorized to obtain the similarity before and after, and the similarity is compared with the threshold value set in the division definition property to obtain the similarity. Is smaller than the threshold value, the text is divided into a second structured document, which is provided with a division unit.
The HTML processing unit according to claim 1, wherein the HTML conversion unit generates an HTML file in which the table frame element and the image frame element are inserted also for the second structured document with reference to the management list. Structured document creation device.
区分された非構造化文書の頁ごとに、テキストフレーム要素、表フレーム要素、及び画像フレーム要素を取得する文書構造取得ステップと、
前記テキストフレーム要素、前記表フレーム要素、及び前記画像フレーム要素のそれぞれの前記頁における位置とその内容とを対応付けてリスト化した管理リストを生成する管理リスト生成ステップと、
前記管理リストを参照し、前記頁ごとに前記テキストフレーム要素を書き順に並べるテキストフレーム要素配列ステップと、
並べた前記テキストフレーム要素を、分割定義プロパティに設定されたルールに基づいて分割した第1構造化文書を生成するテキスト情報構造化ステップと、
前記管理リストを参照して前記第1構造化文書に前記表フレーム要素と前記画像フレーム要素を挿入したHTMLファイルを生成するHTML化ステップと
を行い
前記ルールは、フォントサイズ、文字位置、及び見出しを識別する規則を含み、
前記テキスト情報構造化ステップは、前記テキストフレーム要素に、前記文字位置および前記フォントサイズに応じたレベルの見出しタグ、および、段落タグを付与する
ことを特徴とする構造化文書作成方法。 It is a structured document creation method performed by a structured document creation device.
A document structure acquisition step for acquiring text frame elements, table frame elements, and image frame elements for each page of a partitioned unstructured document.
A management list generation step for generating a management list in which the positions of the text frame element, the table frame element, and the image frame element on the page and their contents are associated with each other and listed.
A text frame element array step that arranges the text frame elements in writing order for each page with reference to the management list.
A text information structuring step that generates a first structured document in which the arranged text frame elements are divided according to a rule set in the division definition property.
With reference to the management list, the first structured document is subjected to the HTMLization step of generating the HTML file in which the table frame element and the image frame element are inserted, and the rule determines the font size, character position, and heading. Including rules to identify
The text information structuring step adds a heading tag and a paragraph tag at a level corresponding to the character position and the font size to the text frame element.
A structured document creation method characterized by this.
を行い、
前記HTML化ステップは、前記管理リストを参照して前記第2構造化文書に対しても前記表フレーム要素と前記画像フレーム要素を挿入したHTMLファイルを生成する
請求項3に記載の構造化文書作成方法。 Each of the sentences constituting the divided text constituting the first structured document is vectorized to obtain the similarity before and after, and the similarity is compared with the threshold value set in the division definition property to obtain the similarity. If is less than the threshold, the split step to generate a second structured document that splits the text, and
And
The structured document creation according to claim 3, wherein the HTMLization step generates an HTML file in which the table frame element and the image frame element are inserted also for the second structured document with reference to the management list. Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019155289A JP7041103B2 (en) | 2019-08-28 | 2019-08-28 | Structured document creation device and its method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019155289A JP7041103B2 (en) | 2019-08-28 | 2019-08-28 | Structured document creation device and its method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021033804A JP2021033804A (en) | 2021-03-01 |
JP7041103B2 true JP7041103B2 (en) | 2022-03-23 |
Family
ID=74676680
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019155289A Active JP7041103B2 (en) | 2019-08-28 | 2019-08-28 | Structured document creation device and its method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7041103B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015146122A (en) | 2014-02-03 | 2015-08-13 | シャープ株式会社 | Conversion processing device, information processing apparatus including the same, program, and recording medium |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06203020A (en) * | 1992-12-29 | 1994-07-22 | Hitachi Ltd | Method an device for recognizing and generating text format |
JPH06214983A (en) * | 1993-01-20 | 1994-08-05 | Kokusai Denshin Denwa Co Ltd <Kdd> | Method and device for converting document picture to logical structuring document |
JP2618832B2 (en) * | 1994-06-16 | 1997-06-11 | 日本アイ・ビー・エム株式会社 | Method and system for analyzing logical structure of document |
JPH09319747A (en) * | 1996-05-29 | 1997-12-12 | Ricoh Co Ltd | Structuralization method for document image |
JP3940491B2 (en) * | 1998-02-27 | 2007-07-04 | 株式会社東芝 | Document processing apparatus and document processing method |
JP2003288334A (en) * | 2002-03-28 | 2003-10-10 | Toshiba Corp | Document processor and document processing method |
JP2004178010A (en) * | 2002-11-22 | 2004-06-24 | Toshiba Corp | Document processor, its method, and program |
JP2004240643A (en) * | 2003-02-05 | 2004-08-26 | Toshiba Corp | Character recognition system, method for recognizing character and program |
JP2006092462A (en) * | 2004-09-27 | 2006-04-06 | Data Place Inc | Automatic conversion system for electronic book content and construction of electronic book shared database |
JP4625535B1 (en) * | 2009-12-14 | 2011-02-02 | 株式会社野村総合研究所 | Information extraction system and information extraction program |
JP6559415B2 (en) * | 2014-11-20 | 2019-08-14 | シャープ株式会社 | Document image processing apparatus, information processing apparatus including the same, program, and recording medium |
-
2019
- 2019-08-28 JP JP2019155289A patent/JP7041103B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015146122A (en) | 2014-02-03 | 2015-08-13 | シャープ株式会社 | Conversion processing device, information processing apparatus including the same, program, and recording medium |
Also Published As
Publication number | Publication date |
---|---|
JP2021033804A (en) | 2021-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7958444B2 (en) | Visualizing document annotations in the context of the source document | |
US9268753B2 (en) | Automated addition of accessiblity features to documents | |
US8196037B2 (en) | Method and device for extracting web information | |
US8266087B2 (en) | Creating forms with business logic | |
US11762926B2 (en) | Recommending web API's and associated endpoints | |
US8577887B2 (en) | Content grouping systems and methods | |
CN110162601B (en) | Biomedical publication contribution recommendation system based on deep learning | |
US20150026159A1 (en) | Digital Resource Set Integration Methods, Interfaces and Outputs | |
JP7082333B2 (en) | Question automatic generation program and question automatic generation device | |
KR101469715B1 (en) | System and method for converting equation contents into hangeul sounds | |
Clausner et al. | Efficient ocr training data generation with aletheia | |
JP2010205060A (en) | Method for retrieving image in document, and system for retrieving image in document | |
CN114297143A (en) | File searching method, file displaying device and mobile terminal | |
JP2011065255A (en) | Data processing apparatus, data name generation method and computer program | |
Costin-Gabriel et al. | Archaisms and neologisms identification in texts | |
JP7041103B2 (en) | Structured document creation device and its method | |
JP6653169B2 (en) | Keyword extraction device, content generation system, keyword extraction method, and program | |
JP2004178010A (en) | Document processor, its method, and program | |
Tiedemann | Improved text extraction from PDF documents for large-scale natural language processing | |
CN116306506A (en) | Intelligent mail template method based on content identification | |
JP2010108268A (en) | Document processing apparatus | |
CN113033178A (en) | Text evaluation method and device for business plan and computer | |
CN113065316A (en) | Method for dynamically converting formal thumbnail file into html (hypertext markup language) and inputting question bank, selecting questions from question bank and composing draft and generating thumbnail file | |
JP2008171164A (en) | Classification support apparatus and method, and program | |
JPH0748217B2 (en) | Document summarization device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190828 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20201013 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201211 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20210323 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210604 |
|
C60 | Trial request (containing other claim documents, opposition documents) |
Free format text: JAPANESE INTERMEDIATE CODE: C60 Effective date: 20210604 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20210614 |
|
C21 | Notice of transfer of a case for reconsideration by examiners before appeal proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C21 Effective date: 20210615 |
|
A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20210702 |
|
C211 | Notice of termination of reconsideration by examiners before appeal proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C211 Effective date: 20210706 |
|
C22 | Notice of designation (change) of administrative judge |
Free format text: JAPANESE INTERMEDIATE CODE: C22 Effective date: 20211124 |
|
C23 | Notice of termination of proceedings |
Free format text: JAPANESE INTERMEDIATE CODE: C23 Effective date: 20220118 |
|
C03 | Trial/appeal decision taken |
Free format text: JAPANESE INTERMEDIATE CODE: C03 Effective date: 20220308 |
|
C30A | Notification sent |
Free format text: JAPANESE INTERMEDIATE CODE: C3012 Effective date: 20220308 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220310 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7041103 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |