JP2005196305A - Document shaping device and electronic mail device equipped with its function - Google Patents

Document shaping device and electronic mail device equipped with its function Download PDF

Info

Publication number
JP2005196305A
JP2005196305A JP2003435824A JP2003435824A JP2005196305A JP 2005196305 A JP2005196305 A JP 2005196305A JP 2003435824 A JP2003435824 A JP 2003435824A JP 2003435824 A JP2003435824 A JP 2003435824A JP 2005196305 A JP2005196305 A JP 2005196305A
Authority
JP
Japan
Prior art keywords
character string
role
sentence
unit
character
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.)
Pending
Application number
JP2003435824A
Other languages
Japanese (ja)
Inventor
Mitsuki Toyoda
光樹 豊田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JustSystems Corp
Original Assignee
JustSystems Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by JustSystems Corp filed Critical JustSystems Corp
Priority to JP2003435824A priority Critical patent/JP2005196305A/en
Publication of JP2005196305A publication Critical patent/JP2005196305A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problem that text layout collapses due to the insertion of a quotation mark when the return of an electronic mail is repeated. <P>SOLUTION: An original text being the object of shaping is inputted (S10), and the role of the character string is specified for each character string included in the original text (S12). Then, a character string included in the original text is reshaped according to the role (S18). Thus, it is possible to shape the text. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

この発明は、文書を整形する装置に関し、とくに文書に含まれる文章を整形し直す技術およびその整形技術を備える電子メール装置に関する。   The present invention relates to an apparatus for shaping a document, and more particularly to a technique for reshaping sentences included in a document and an electronic mail apparatus equipped with the shaping technique.

ネットワーク環境の充実にともない、ビジネスやプライベートで電子メールを利用したコミュニケーションが頻繁に行われるようになった。一般に電子メールは、SMTP(Simple Mail Transfer Protocol)やPOP(Post Office Protocol)などの共通のプロトコルを利用して、ネットワークに接続された装置間でテキストデータを送受信することで実現される。共通のプロトコルを利用することにより、ネットワークに接続された様々な装置間での通信が実現されている。   With the enhancement of the network environment, communication using e-mail for business and private use has become frequent. Generally, electronic mail is realized by transmitting and receiving text data between devices connected to a network using a common protocol such as SMTP (Simple Mail Transfer Protocol) and POP (Post Office Protocol). By using a common protocol, communication between various devices connected to the network is realized.

通信対象の装置のスペックは様々であり、デスクトップコンピュータの様に、比較的大画面を表示手段とするものもあるし、PDA(Personal Digital Assistance)の様に比較的小画面を表示手段とするものもある。こうしたことから、受信側の装置によっては、段落や改行の位置が換わり、読みにくくなることがある。   There are various specifications of devices to be communicated, such as a desktop computer with a relatively large screen as a display means, and a PDA (Personal Digital Assistance) with a relatively small screen as a display means. There is also. For this reason, depending on the receiving device, the positions of paragraphs and line breaks may change, making it difficult to read.

また、メーラーには、返信時に元の文章に引用符を付加する機能が搭載されていることが多い。このため、ひとつの電子メールに対して返信を繰り返すと、引用符が連なり、ユーザが意図しない部分で改行されることがある。こうしたことから、電子メールに含まれる文章を整形して表示する技術がある(特許文献1)。
特開平11−184775号公報 特開平6−282565号公報
Also, mailers are often equipped with a function that adds quotes to the original text when replying. For this reason, if a reply is repeated with respect to one e-mail, quotes are continued and a line break may occur at a portion not intended by the user. For these reasons, there is a technique for shaping and displaying text included in an e-mail (Patent Document 1).
JP-A-11-184775 JP-A-6-282565

これらの技術は、ユーザが意図して挿入した改行と、ユーザが意図していない改行とを推測して、ユーザが意図していない改行を取り除くことで整形処理を行う。つまり、従来の整形処理は、最初の文章レイアウトに戻るように文章を整形する。例えば、引用符は電子メールの返信を重ねる度に付加されるので、引用符が付加されただけずれが生じる。このため、最初の文章レイアウトに戻すようにしても、必然的に文章レイアウトは崩れてしまう。   In these techniques, a line break inserted by the user and a line break unintended by the user are estimated, and a shaping process is performed by removing the line break unintended by the user. That is, the conventional shaping process shapes the sentence so as to return to the initial sentence layout. For example, since a quotation mark is added every time an electronic mail reply is overlapped, a shift occurs as long as the quotation mark is added. For this reason, even if it returns to the first sentence layout, the sentence layout will inevitably collapse.

本発明はこうした点に鑑みてなされたもので、その目的は、文書に含まれる文章を適切に整形して、視認性を高めユーザの利便性を向上することにある。   The present invention has been made in view of these points, and an object thereof is to appropriately shape a sentence included in a document to improve visibility and improve user convenience.

本発明のある態様は、文書に含まれる文章を整形する装置である。この文書整形装置は、複数の文字列を含む文章を受け付ける入力部と、それぞれの文字列の文章における役割を、可視化されるべき文字列に基づいて特定する解析部と、文章に含まれる文字列を、その役割に応じて可視化する整形部とを備える。この態様によれば、文章に含まれる個々の文字列の役割が特定され、役割に応じて文字列が可視化される。このため、与えられた文章が文章レイアウト的に崩れている場合でも適切に整形できる。   One embodiment of the present invention is an apparatus for shaping a sentence included in a document. The document shaping device includes an input unit that accepts a sentence including a plurality of character strings, an analysis unit that identifies a role of each character string in the sentence based on the character string to be visualized, and a character string included in the sentence And a shaping unit that visualizes according to its role. According to this aspect, the role of each character string included in the sentence is specified, and the character string is visualized according to the role. For this reason, even when a given sentence is broken in the sentence layout, it can be appropriately shaped.

「文字列の役割」は、例えば見出し、飾り行など文章構造における表現手法であり、文章を構成する要素である。「可視化」とは、文字列の役割を実現するために視覚的な効果が生じる表現形態であり、例えば文字配置を変更したり、文字列に特定の文字を追加したり、文字列に修飾を施したりすることでよい。   The “role of character string” is an expression technique in a sentence structure such as a headline and a decoration line, and is an element constituting the sentence. “Visualization” is a form of expression that produces a visual effect to realize the role of a character string. For example, the character arrangement is changed, a specific character is added to the character string, or the character string is modified. It may be given.

解析部は、所定の役割に応じた特徴が文字列に含まれているか否かに基づいて、文字列の役割を特定してもよい。「所定の役割に応じた特徴」は、その役割を満たすように視覚的な効果をもたらす例えば文字配置、文字列の先頭に付加された特定の文字、それらの組み合わせ、前後の行との関連性などであってよい。   The analysis unit may specify the role of the character string based on whether the character string includes a feature corresponding to the predetermined role. “Characteristics according to a given role” has a visual effect to satisfy the role, for example, character placement, specific characters added to the beginning of the character string, combinations thereof, and relevance to previous and next lines And so on.

解析部は、それぞれの文字列の相互関係を特定し、相互に関係する文字列毎にグループ化してもよい。整形部は、グループに含まれる文字列を、視覚的にグループ毎に区別できるように可視化してもよい。これにより、ユーザは、文字列の相互関係を視覚的に把握できる。   The analysis unit may specify the mutual relationship between the character strings and group them for each character string related to each other. The shaping unit may visualize the character string included in the group so that it can be visually distinguished for each group. Thereby, the user can grasp | ascertain visually the mutual relationship of a character string.

入力部は、文章を電子メールとして受け付け、解析部は、電子メールの本文に含まれる文章を対象に、その文章中の文字列の役割を特定してもよい。これにより、電子メールの本文を整形できるので、返信が繰り返され文章レイアウトが崩れた電子メールを受信した場合でも、本文を見やすく整形できる。   The input unit may receive the sentence as an e-mail, and the analysis unit may specify the role of the character string in the sentence for the sentence included in the body of the e-mail. As a result, the body text of the e-mail can be formatted, so that even when an e-mail is received in which the reply is repeated and the text layout is broken, the text can be easily viewed.

解析部は、電子メール中の文字列に含まれる引用符に基づいて、相互関係を特定し、それぞれの文字列をグループ化してもよい。   The analysis unit may identify the mutual relationship based on the quotation marks included in the character string in the e-mail, and group each character string.

整形部は、文字列からその文字列の位置調整に係るすべての文字情報を取り除き、その文字列の役割に応じて新たに位置調整に係る文字情報を付加することで文字列を可視化したときの配置を調整してもよい。「位置調整に係る文字情報」は、例えば改行コード、空白コードなど文字列の位置を調整できる文字の情報である。これにより、元の文章レイアウトとは無関係に文章を整形できる。   The shaping unit removes all the character information related to the position adjustment of the character string from the character string, and adds the character information related to the position adjustment according to the role of the character string to visualize the character string. The arrangement may be adjusted. “Character information related to position adjustment” is information of a character that can adjust the position of a character string, such as a line feed code or a blank code. As a result, the sentence can be shaped regardless of the original sentence layout.

解析部は、同一の引用符を含む文字列を同一のグループとして分別し、整形部は、グループの可視化のために、そのグループに属する文字列に付加されていた引用符を利用してもよい。これにより、ユーザは、一般的な電子メールの表示フォーマットで電子メールを確認できるので、整形処理が行われていることを意識せずに当該装置を利用できる。   The analysis unit may classify character strings including the same quotation marks as the same group, and the shaping unit may use the quotation marks added to the character strings belonging to the group for visualization of the group. . Thus, the user can check the e-mail in a general e-mail display format, and thus can use the apparatus without being aware of the shaping process.

この装置は、所定の役割に応じた特徴に基づいて、文字列の役割を特定するための解析条件を保持する解析条件格納部を更に備え、解析部は、それぞれの文字列に対して、解析条件が適合するか否かを判断することにより、それぞれの文字列の役割を特定してもよい。これにより、解析条件を変えることで特定すべき文字列の役割、すなわち特定すべき文章の構成要素を変えることができる。解析条件は、所定の役割を有する文字列の自然文における特徴に基づいて定義されてよい。これにより、タグなどの非可視の情報が不要であり、自然文を取り扱う任意の装置で利用できる。   The apparatus further includes an analysis condition storage unit that holds analysis conditions for specifying the role of the character string based on characteristics according to a predetermined role, and the analysis unit analyzes each character string. The role of each character string may be specified by determining whether the conditions are met. Thereby, the role of the character string to be specified, that is, the constituent element of the sentence to be specified can be changed by changing the analysis condition. The analysis condition may be defined on the basis of characteristics in a natural sentence of a character string having a predetermined role. This eliminates the need for invisible information such as tags, and can be used in any device that handles natural sentences.

この装置は、解析条件が定義された役割に対応して、その役割を有する文字列の可視化方法を指定する可視化ルールを保持するルール格納部を更に備え、整形部は、それぞれの文字列の役割に対応する可視化ルールに基づいて可視化を行ってよい。   The apparatus further includes a rule storage unit that holds a visualization rule that specifies a visualization method of a character string having a role corresponding to a role in which an analysis condition is defined, and the shaping unit has a role of each character string. Visualization may be performed based on a visualization rule corresponding to.

本発明の別の態様は、電子メールを取り扱う装置である。この装置は、ネットワークを介して電子メールを受け付ける受信部と、電子メールの本文部分から複数の文字列を含む文章を取得し、それぞれの文字列の文章における役割を、可視化されるべき文字列に基づいて特定する解析部と、文章に含まれる文字列を、その役割に応じて可視化して、文章を整形する整形部と、整形した文章を電子メールの本文部分として表示させる表示処理部とを備える。この態様によれば、電子メールの本文に含まれる文章が、その文章を構成する文字列の役割に応じて整形される。   Another aspect of the present invention is an apparatus for handling electronic mail. This device acquires a sentence including a plurality of character strings from a receiving unit that accepts an e-mail via a network and a body part of the e-mail, and changes the role of each character string in the character string to be visualized. An analysis unit that is identified based on the text, a character string included in the sentence is visualized according to its role, a shaping part that shapes the sentence, and a display processing unit that displays the shaped sentence as the body part of the email Prepare. According to this aspect, the text included in the text of the e-mail is shaped according to the role of the character string constituting the text.

なお、以上の構成要素の任意の組合せや、本発明の構成要素や表現を方法、装置、システム、コンピュータプログラム、コンピュータプログラムを格納した記録媒体、データ構造などの間で相互に置換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described constituent elements, or the constituent elements and expressions of the present invention may be mutually replaced between methods, apparatuses, systems, computer programs, recording media storing computer programs, data structures, etc. This is effective as an embodiment of the present invention.

本発明によれば、電子メールに含まれる文書の視認性を高め、ユーザの利便性を高めることができる。   ADVANTAGE OF THE INVENTION According to this invention, the visibility of the document contained in an email can be improved and a user's convenience can be improved.

実施の形態に係る整形処理は、文章に含まれる個々の文字列の文章構成上の役割を特定し、その役割に応じて可視化を行う。文章における個々の文字列の役割を把握することにより、その役割に適した例えば文字配置や文字修飾などができるので、文章を適切に整形することができる。   In the shaping process according to the embodiment, the role of each character string included in the sentence is specified in the sentence structure, and visualization is performed according to the role. By grasping the role of each character string in the sentence, for example, character arrangement and character modification suitable for the role can be performed, so that the sentence can be appropriately shaped.

図1(a)は、整形処理前の電子メールの本文部分の文章を示す図である。整形処理前の文章を、以下「オリジナル文章」という。このオリジナル文章は、第1グループa、第2グループb、および第3グループcの3つのグループを含む。それぞれのグループは、電子メールの返信タイミング毎にまとめられており、第1グループaは、直近の返信メッセージを示し、第2グループbは2番目に新しい返信メッセージを示し、第3グループcは3番目に新しい返信メッセージを示す。一般に、電子メールの返信文には、以前の電子メールの本文部分にある文章の行頭にオリジナル引用符32が付加される。一行毎に、このオリジナル引用符32を比べることで、どのタイミングにおける返信メッセージなのかが判断される。   FIG. 1A is a diagram showing the text of the body part of the e-mail before the shaping process. The sentence before the shaping process is hereinafter referred to as “original sentence”. This original sentence includes three groups of a first group a, a second group b, and a third group c. Each group is grouped for each e-mail reply timing, the first group a shows the latest reply message, the second group b shows the second new reply message, and the third group c shows 3 Shows the new reply message. In general, an original quotation mark 32 is added to the beginning of a sentence in the body part of a previous electronic mail in an electronic mail reply sentence. By comparing the original quotation marks 32 for each line, it is determined at which timing the reply message is sent.

オリジナル文章の第1グループaには、第1見出し行10aおよび第2見出し行10bが箇条書きされており、それらの見出し行の直下に第1見出説明文12aならびに第2見出説明文12bが記載されている。文字列の最後尾には、ユーザが意図的に付加した改行26(以下、単に「オリジナル改行26」という)が存在する。第1見出し行10aおよび第2見出し行10bは、先頭部分に箇条書きの特徴のひとつである箇条書きマーク30が付加されている。それぞれの箇条書きは、例えば「(1)」、「1.」、「i」など序数詞とそれに続いた項目とを含む。箇条書きマーク30は、そうした箇条書きの先頭に付加された箇条書きの各項目に付加される可能性のある文字または記号である。   In the first group a of the original sentences, the first heading line 10a and the second heading line 10b are listed, and the first heading explanation text 12a and the second heading explanation text 12b are directly under those heading lines. Is described. There is a line feed 26 intentionally added by the user (hereinafter simply referred to as “original line feed 26”) at the end of the character string. In the first heading line 10a and the second heading line 10b, a bullet mark 30 which is one of the bullet characteristics is added to the head part. Each item includes an ordinal number such as “(1)”, “1.”, “i” and the subsequent items. The bullet mark 30 is a character or symbol that may be added to each item of the bullet added at the beginning of such a bullet.

オリジナル文章の第2グループbには、第1飾り行14a、第1段落説明文16a、および第2飾り行14bが記載されている。第1飾り行14aおよび第2飾り行14bは、例えば「空白行」や「記号が連続した行」などの前後の文との区切りを役割としたものである。第3グループcには、3行にわたり第2段落説明文16bが記載されている。   In the second group b of original sentences, a first decorative line 14a, a first paragraph explanation 16a, and a second decorative line 14b are described. The first decorative row 14a and the second decorative row 14b serve as delimiters from preceding and following sentences such as “blank rows” and “lines with continuous symbols”. In the third group c, the second paragraph explanation 16b is described over three lines.

このように、文章は単に文字が並んでいるだけではなく、文字の配置、表記方法など文章を形作る複数の構成要素が含まれている。そうした構成要素を適切に使うことにより、読みやすくなったり、内容を理解しやすくなったり、効果的な文章になったりといった様々な効果が得られる。つまり、文章を構成する文字列には、文章を構成する上での役割がある。そして、その役割に応じて、例えば箇条書きにされたり、改行されたり、空白が追加され他の文字列との位置関係が調整されたりする。本発明者は、この点に着目し、文字列が本来有する文章における役割を判断し、その役割を維持するように文章を整形することに思い至った。   As described above, the sentence is not only arranged with characters, but also includes a plurality of components that form the sentence such as the arrangement of characters and the notation method. Appropriate use of such components provides various effects such as making it easier to read, understanding the contents, and making effective sentences. That is, the character string constituting the sentence has a role in constituting the sentence. And according to the role, for example, it is bulleted, a line break is added, or a space is added to adjust the positional relationship with other character strings. The present inventor has paid attention to this point, and has determined to determine the role of the character string originally in the sentence and shape the sentence so as to maintain the role.

図1(b)は、図1(a)の文章を、整形処理した後の文章を示す図である。整形処理後の文章を、以下「整形文章」という。整形文章は、オリジナル文章におけるそれぞれの文字列の役割を維持するように、図1(a)の文章を整形したものである。整形文章は、オリジナル文章の第1グループa、第2グループb、および第3グループcに対応して、第1グループA、第2グループB、ならびに第3グループCを有する。第1グループA、第2グループB、および第3グループCは、対応するオリジナル文章のグループに属する文字列と同一の整形引用符34により、視覚的に区別される。   FIG.1 (b) is a figure which shows the text after shaping the text of Fig.1 (a). The text after the shaping process is hereinafter referred to as “shaped text”. The formatted text is obtained by shaping the text in FIG. 1A so as to maintain the role of each character string in the original text. The formatted text has a first group A, a second group B, and a third group C corresponding to the first group a, the second group b, and the third group c of the original text. The first group A, the second group B, and the third group C are visually distinguished by the same formatted quotes 34 as the character strings belonging to the corresponding original sentence group.

整形文章の第1グループAは、オリジナル文章の第1見出し行10aおよび第2見出し行10bに対応して、第1見出し行20aならびに第2見出し行20bを含む。第1見出し行20aおよび第2見出し行20bは、見出しとしての役割を維持するように可視化される。整形文章の第1見出し行20aおよび第2見出し行20bを、総称して「見出し行20」という。また、第1グループAは、オリジナル文章の第1見出説明文12aおよび第2見出説明文12bに対応して、第1見出説明文22aならびに第2見出説明文22bを含む。オリジナル文章の第1見出説明文12aおよび第2見出説明文12bは、それぞれ第1見出し行10aならびに第2見出し行10bに対する説明としての役割を持つため、整形文章においてもその役割を維持するように可視化される。整形文章の第1見出説明文22aおよび第2見出説明文22bを、総称して「見出説明文22」という。   The first group A of formatted sentences includes a first heading line 20a and a second heading line 20b corresponding to the first heading line 10a and the second heading line 10b of the original sentence. The first heading line 20a and the second heading line 20b are visualized so as to maintain a role as a heading. The first heading line 20a and the second heading line 20b of the formatted text are collectively referred to as “heading line 20”. Further, the first group A includes a first finding explanation 22a and a second finding explanation 22b corresponding to the first finding explanation 12a and the second finding explanation 12b of the original sentence. Since the first finding explanation 12a and the second finding explanation 12b of the original sentence serve as explanations for the first heading line 10a and the second heading line 10b, respectively, the role is maintained even in the formatted text. Is visualized as follows. The first finding explanation 22a and the second finding explanation 22b of the formatted text are collectively referred to as “finding explanation 22”.

具体的な可視化の方法はいろいろあるが、本図では、整形文章の見出説明文22は、見出し行20に揃えるように字下げスペース36が追加され、かつ折り返し線Lの文字数で折り返されている。つまり、第2見出説明文22bは、見出し行20の説明であることが明確になるように配置される。詳細は後述するが、本実施の形態における整形処理では、各文字列のオリジナル文章における役割を特定した後、オリジナル文章中の文字列から例えば改行、引用符、行頭字下げのための空白などの位置調整に係るすべての文字情報が削除される。そして、文字列の役割に応じて、新たに位置調整に係る文字情報が適宜追加されて整形文章が生成される。整形改行28は、整形処理により新たに追加された改行を示す。また、字下げスペース36は、整形処理により新たに追加された空白を示す。   Although there are various specific visualization methods, in this figure, the indentation space 36 of the formatted text is added with an indentation space 36 so as to align with the heading line 20, and is folded back by the number of characters of the folding line L. Yes. That is, the second headline description 22b is arranged so that it is clear that the headline row 20 is the description. Although details will be described later, in the shaping process according to the present embodiment, after specifying the role of each character string in the original sentence, the character string in the original sentence is changed from, for example, a line feed, a quotation mark, a space for indentation, etc. All character information related to the position adjustment is deleted. Then, according to the role of the character string, character information related to position adjustment is newly added as appropriate, and a formatted text is generated. The formatted line feed 28 indicates a new line newly added by the shaping process. The indentation space 36 indicates a blank newly added by the shaping process.

整形文章の第2グループBは、オリジナル文章の第1飾り行14a、第1段落説明文16a、および第2飾り行14bに対応して、第1飾り行24a、第1段落説明文25a、ならびに第2飾り行24bを含む。整形文章の第3グループCは、オリジナル文章の第2段落説明文16bに対応して、第2段落説明文25bを含む。オリジナル文章の第1段落説明文16aおよび第2段落説明文16bは、通常のメッセージとしての役割を有するので、第1段落説明文25aおよび第2段落説明文25bは、通常のメッセージとしての役割を維持するように可視化される。「通常のメッセージ」は、文章の中心となる文字列であり、例えば「見出し行」、「飾り行」などのオリジナル文章から検出すべき所定の役割として、予め登録された文字列の特徴に一致しない文字列として定義される。整形文章の第1段落説明文25aおよび第2段落説明文25bを、総称して「段落説明文25」という。   The second group B of the formatted text corresponds to the first decorative line 14a, the first paragraph explanatory sentence 16a, and the second decorative line 14b of the original sentence, and the first decorative line 24a, the first paragraph explanatory sentence 25a, and A second decorative row 24b is included. The third group C of formatted text includes a second paragraph explanation 25b corresponding to the second paragraph explanation 16b of the original sentence. Since the first paragraph explanation 16a and the second paragraph explanation 16b of the original sentence have a role as a normal message, the first paragraph explanation 25a and the second paragraph explanation 25b have a role as a normal message. Visualized to maintain. The “normal message” is a character string that is the center of the sentence, and matches the characteristics of the pre-registered character string as a predetermined role to be detected from the original sentence such as “headline” and “decorative line”, for example. Not defined as a string. The first paragraph explanation 25a and the second paragraph explanation 25b of the formatted sentence are collectively referred to as “paragraph explanation 25”.

本図では、段落説明文25は、行頭で1文字分の字下げをして、折り返し線Lの文字数で折り返されている。オリジナル文章の第1段落説明文16aと整形文章の第1段落説明文25aとを比較すると、第1段落説明文16aは字下げされていないが、第1段落説明文25aでは字下げされていることがわかる。これは、オリジナル文章からすべての位置調整に係る文字情報を削除し、文字列の役割に応じて新たに位置情報に係る文字情報を適宜付加することで実現される。このように、文字列の役割に応じて新たに位置情報に係る文字情報が付加されることにより、文字列の役割に応じて可視化できる。これにより、例えば引用符が付加されることで、オリジナル文章における各文字列の配置が換わる場合でも、各文字列は役割に応じて可視化され、文章全体が適切に整形される。また、オリジナル文章からすべての位置調整に係る文字情報を削除して、文字列の役割に応じて再整形するので、ユーザの主観が取り除かれ、客観的な基準に基づいて整形される。これにより、整形文章がオリジナル文章よりきれいに整形されることもある。   In this figure, the paragraph explanation 25 is indented by one character at the beginning of the line and is folded back by the number of characters of the folding line L. When comparing the first paragraph explanation 16a of the original sentence and the first paragraph explanation 25a of the formatted sentence, the first paragraph explanation 16a is not indented, but is indented in the first paragraph explanation 25a. I understand that. This is realized by deleting all the character information related to the position adjustment from the original sentence and appropriately adding the character information related to the position information according to the role of the character string. Thus, by newly adding the character information related to the position information according to the role of the character string, it is possible to visualize according to the role of the character string. Thereby, for example, even when the arrangement of each character string in the original sentence is changed by adding a quotation mark, each character string is visualized according to the role, and the entire sentence is appropriately shaped. In addition, since all character information related to position adjustment is deleted from the original sentence and reshaped according to the role of the character string, the user's subjectivity is removed and the character is shaped based on an objective standard. As a result, the formatted text may be formatted more clearly than the original text.

図2は、実施の形態に係る整形処理のフローチャートである。まず、整形対象となるオリジナル文章が入力される(S10)。次に、入力された文章の文章構造が分析され、文字列毎の文章における役割が特定される(S12)。本実施の形態では、文章構造を分析する際に、単に文章中の文字列の役割を特定するだけでなく、複数の文字列の相互関係を特定し、関連する文字列同士をグループとしてまとめる。そのため、ステップ12は、文章中の文字列を関連する文字列毎にグループ化するステップ(S14)と、文章の構成要素を識別する、つまり文字列の役割を特定するステップ(S16)とを有する。その後、文字列の役割と文字列の属するグループとに基づいてオリジナル文章中の文字列が再整形される(S18)。そして、整形文書が出力される(S20)。   FIG. 2 is a flowchart of the shaping process according to the embodiment. First, an original sentence to be shaped is input (S10). Next, the sentence structure of the inputted sentence is analyzed, and the role in the sentence for each character string is specified (S12). In the present embodiment, when analyzing the sentence structure, not only the role of the character string in the sentence is specified, but also the mutual relationship between a plurality of character strings is specified, and the related character strings are grouped together. Therefore, step 12 includes a step (S14) of grouping character strings in the sentence for each related character string, and a step (S16) of identifying the constituent elements of the sentence, that is, specifying the role of the character string. . Thereafter, the character string in the original sentence is reshaped based on the role of the character string and the group to which the character string belongs (S18). Then, the formatted document is output (S20).

この整形処理の手順を、コンピュータに実行させることで文章を整形することができる。この一連の手順をコンピュータに実行させるためのプログラムを単独で利用してもよいし、文章を取り扱う各種のプログラムに組み込んで利用してもよい。組み込み対象となるプログラムは、例えば、電子メールを送受信する装置を実現するためのプログラムや、チャットを実現するためのプログラムや、掲示板を実現するためのプログラムや、ワードプロセッサを実現するためのプログラム等、文章を取り扱う装置をコンピュータで実現するためのプログラムであってよい。以下、電子メールを送受信するための装置をコンピュータで実現するためのプログラムに、上述の整形処理の手順を組み込んだ場合を一例として説明する。   The sentence can be shaped by causing the computer to execute the procedure of the shaping process. A program for causing a computer to execute this series of procedures may be used alone, or may be used by being incorporated in various programs that handle sentences. The programs to be incorporated include, for example, a program for realizing a device for sending and receiving e-mail, a program for realizing chat, a program for realizing a bulletin board, a program for realizing a word processor, etc. It may be a program for realizing an apparatus for handling text on a computer. Hereinafter, a case where the above-described shaping process procedure is incorporated in a program for realizing a device for transmitting and receiving an electronic mail by a computer will be described as an example.

図3は、実施の形態に係る整形処理機能を有する電子メール装置50の構成図である。電子メール装置50の各構成要素は、ハードウエアコンポーネントで言えば、任意のコンピュータのCPU、メモリ、メモリにロードされた本図の構成要素を実現するプログラム、そのプログラムを格納するハードディスクなどの記憶ユニット、ネットワーク接続用インターフェース等を中心に実現されるが、その実現方法、装置にはいろいろな変形例があることは、当業者には理解されるところである。これから説明する各図は、ハードウエア単位の構成ではなく、機能単位のブロックを示している。   FIG. 3 is a configuration diagram of an electronic mail apparatus 50 having a shaping processing function according to the embodiment. In terms of hardware components, each component of the electronic mail device 50 is a CPU, a memory, a program that realizes the components of this figure loaded in the memory, and a storage unit such as a hard disk that stores the program. However, it will be understood by those skilled in the art that there are various modifications in the implementation method and apparatus. Each figure to be described below shows functional unit blocks, not hardware unit configurations.

受信部52は、ネットワークを介して電子メールを受信する。電子メール格納部54は、その電子メールを格納する。選択部56は、例えばユーザの指示に応じて、電子メール格納部54から電子メールを選択して、作成部58または整形処理部100に出力する。   The receiving unit 52 receives an e-mail via a network. The e-mail storage unit 54 stores the e-mail. The selection unit 56 selects an e-mail from the e-mail storage unit 54 according to a user instruction, for example, and outputs it to the creation unit 58 or the shaping processing unit 100.

整形処理部100は、選択部56から受け付けた電子メールの本文に含まれるオリジナル文章に対して、上述の整形処理を施して整形文章を表示処理部62に出力する。また、整形処理部100は、整形文章を作成部58に返信用の電子メールのひな形として出力する。もちろん、他の例では、作成部58は、整形文章を作成部58に出力しなくてもよいし、ユーザの指示に応じて、整形文章を作成部58に出力するか否かを決定してもよい。整形文章をどのように利用するかは、任意である。   The shaping processing unit 100 performs the above-described shaping processing on the original text included in the body of the email received from the selection unit 56 and outputs the shaped text to the display processing unit 62. The shaping processing unit 100 also outputs the formatted text to the creation unit 58 as a reply e-mail template. Of course, in another example, the creation unit 58 does not need to output the formatted text to the creation unit 58, and determines whether to output the formatted text to the creation unit 58 according to a user instruction. Also good. How to use the formatted text is arbitrary.

表示処理部62は、整形処理の施された電子メールを表示部に出力する。作成部58は、ユーザから文章の入力を受け付け、電子メールを作成する。作成部58は、電子メールを新規に生成してもよいし、整形処理部100から供給された返信用のひな形に基づいて、作成してもよい。作成部58は、新規および返信のいずれの電子メールを作成してもよい。要は、作成部58は、送信部60から送信する電子メールを作成すればよい。送信部60は、作成部58から供給された電子メールをネットワークに向けて出力する。   The display processing unit 62 outputs the email subjected to the shaping process to the display unit. The creation unit 58 accepts input of text from the user and creates an e-mail. The creation unit 58 may newly generate an e-mail, or may create it based on a reply template supplied from the shaping processing unit 100. The creation unit 58 may create either new or reply e-mails. In short, the creation unit 58 may create an email to be transmitted from the transmission unit 60. The transmission unit 60 outputs the electronic mail supplied from the creation unit 58 toward the network.

図4は、図3の整形処理部100の内部構成図である。受付部102は、選択部56から電子メールを受け付け、その電子メールを解析部104に出力する。解析部104は、受け付けた電子メールの本文部分に含まれるオリジナル文章に対して、図2のステップ12に該当する分析を行う。解析部104は、オリジナル文章を一行毎、すなわち改行コードで区切られる文字列毎に分析を進める。以下、オリジナル文章の1行を「行文字列」といい、とくに行文字列として特定する必要が無い場合、複数の文字のまとまりを文字列という。   FIG. 4 is an internal configuration diagram of the shaping processing unit 100 of FIG. The accepting unit 102 accepts an email from the selection unit 56 and outputs the email to the analysis unit 104. The analysis unit 104 performs an analysis corresponding to step 12 in FIG. 2 on the original text included in the body part of the received electronic mail. The analysis unit 104 analyzes the original sentence for each line, that is, for each character string delimited by a line feed code. Hereinafter, one line of the original sentence is referred to as a “line character string”, and a group of a plurality of characters is referred to as a character string when it is not particularly necessary to identify the line as a line character string.

解析部104は、オリジナル文章に含まれるすべての行文字列を、行頭文字部と文章部とに分離する。「行頭文字部」は、行頭の引用符、空白および行頭字下げ空白文字を含み、電子メールの返信の際にメーラーにより自動的に付加された文字列である。「文章部」は、行文字列から行頭文字列と改行コードとを取り除いた残りの文字列である。解析部104は、行頭文字部が一致する行文字列をグループとしてまとめる。一般に、引用符は返信を繰り返すたびに一つずつ追加されるので、行頭文字部が一致することは同一のタイミングで作成された文字列であると判断できる。   The analysis unit 104 separates all line character strings included in the original sentence into a bullet part and a sentence part. The “bullet character part” is a character string that includes a quotation mark at the beginning of the line, a space, and a space character with indentation, and is automatically added by the mailer when replying to an e-mail. The “text part” is a remaining character string obtained by removing the beginning character string and the line feed code from the line character string. The analysis unit 104 groups line character strings having the same initial character part as a group. In general, each time a reply is repeated, one quotation mark is added, so it can be determined that the beginning of a letter portion is a character string created at the same timing.

また、解析部104は、文章部に含まれる文字列の役割を特定する。解析部104は、文章部に含まれる文字列の役割を特定するために、所定の役割を有する文字列が備えるべき基本の特徴(以下、単に「基本特徴」という)が、文章部に含まれる文字列にあるか否かを検査する。そして、解析部104は、文章部に含まれる文字列と基本特徴とが合致した場合、その基本特徴に対応する役割をその文字列が有するとして判断する。   Moreover, the analysis part 104 specifies the role of the character string contained in a text part. The analysis unit 104 includes basic features (hereinafter simply referred to as “basic features”) that should be included in a character string having a predetermined role in order to specify the role of the character string included in the sentence portion. Check if it is in a string. When the character string included in the sentence part matches the basic feature, the analysis unit 104 determines that the character string has a role corresponding to the basic feature.

解析条件格納部106は、文字列の役割の特定に利用する基本特徴に関する特徴情報を、文字列の役割に対応づけて保持する。例えば、「見出し行」としての役割を有する文字列の特徴情報は、「文章部の先頭に、箇条書きマーク、章番号などを含む」である。「飾り行」としての役割を有する文字列の特徴情報は、「文章部が空白、または特定の文字が連続している」である。「見出説明文」としての役割を有する文字列の特徴情報は、「見出し行の直近、すなわち次の行にある」である。本実施の形態では、オリジナル文章に含まれる文字列を「見出し行」、「飾り行」、「見出説明文」、および「通常のメッセージ」の4つの役割に分別する。すなわち、オリジナル文章に含まれる文字列を4つの構成要素に分別する。このため、「通常メッセージ」としての役割を有する文字列の特徴情報は、「見出し行、飾り行、見出し説明文のいずれにも適合しないもの」である。   The analysis condition storage unit 106 holds feature information related to basic features used for specifying the role of the character string in association with the role of the character string. For example, the characteristic information of the character string having the role of “heading line” is “including bullet mark, chapter number, etc. at the beginning of the sentence part”. The characteristic information of the character string having the role of “decoration line” is “the sentence part is blank or specific characters are continuous”. The character string characteristic information having the role of “headline explanation” is “most immediately after the headline line, that is, in the next line”. In the present embodiment, the character strings included in the original text are classified into four roles of “headline”, “decorative”, “headline”, and “normal message”. That is, the character string included in the original sentence is divided into four components. For this reason, the characteristic information of the character string having the role of “ordinary message” is “not applicable to any headline, decorative line, or headline description”.

解析部104は、解析条件格納部106に保持されている解析条件を参照して、文章部の役割を特定する。解析部104は、行文字列毎に、グループと役割とを対応づけて、文章構造情報として文章構造格納部108に格納する。また、解析部104は、グループの判別に利用した行頭文字部の文字列をグループ毎に文章データ格納部110に格納し、更に、行文字列毎の文章部を文章データ格納部110に格納する。これにより、例えば行番号など、行文字列を特定する情報をキーに各行文字列における文章構造情報と行頭文字部の文字列と文章部の文字列とを特定できる。   The analysis unit 104 refers to the analysis conditions held in the analysis condition storage unit 106 and identifies the role of the text part. The analysis unit 104 associates groups and roles for each line character string, and stores them in the sentence structure storage unit 108 as sentence structure information. Further, the analysis unit 104 stores the character string of the bullet character part used for the group discrimination in the text data storage unit 110 for each group, and further stores the text part for each line character string in the text data storage unit 110. . As a result, for example, the sentence structure information, the character string of the initial character part, and the character string of the sentence part in each line character string can be specified by using the information specifying the line character string as a key.

他の例では、解析部104は、文字列の役割を特定する度に、その役割を特定するタグをその文字列の前後に付加し、文章構造情報と文章部の文字列とを同一のファイルに格納するようにしてもよい。解析部104における分析結果である文章構造情報、行頭文字部および文章部の文字列を格納するための方法は色々とあり、プログラムのコーディングに応じて適切な方法をとることができる。つまり、解析部104は、行文字列毎の文章構造情報と行頭文字部と文章部とを参照できるように格納処理を行えばよい。   In another example, each time the analysis unit 104 specifies the role of the character string, a tag specifying the role is added before and after the character string, and the sentence structure information and the character string of the sentence part are stored in the same file. You may make it store in. There are various methods for storing the sentence structure information, the bullet character part, and the character string of the sentence part, which are analysis results in the analysis unit 104, and an appropriate method can be taken according to the coding of the program. That is, the analysis part 104 should just perform a storage process so that the text structure information for every line character string, a bullet part, and a text part can be referred.

整形部112は、文章データ格納部110に保持されている文章部の文字列を、文章構造格納部108および整形ルール格納部116を参照して整形して整形文章を生成する。整形ルール格納部116は、所定の役割すなわち構成要素毎に可視化時のルールを定義する。例えば、「見出し行」の整形ルールは、「該当する文章部に保持されている文字列を出力し、出力した文字列の前後に改行を挿入する」として定義されている。「飾り行」の整形ルールは、「該当する文章部に空白が保持されている場合、すなわち空白飾り行の場合、改行を出力し、空白以外の文字列が保持されている場合、すなわち空白飾り行以外の場合、その文字列を出力し、その文字列の前後に改行を挿入する」として定義されている。「見出説明文」の整形ルールは、「見出し行の箇条書きマークまたは章番号などに会わせて、行頭字下げを行う」として定義されている。また、「通常メッセージ」の整形ルールは、「一行あたりの文字数が所定の数に達したら、折り返す。ワードラップの可否、禁則処理などにしたがって出力する。」として定義されている。   The shaping unit 112 shapes the character string of the text part held in the text data storage unit 110 with reference to the text structure storage unit 108 and the shaping rule storage unit 116 to generate a formatted text. The shaping rule storage unit 116 defines a rule for visualization for each predetermined role, that is, for each component. For example, the formatting rule of “headline” is defined as “output a character string held in the corresponding sentence part and insert line breaks before and after the output character string”. The formatting rules for “decorative lines” are: “If a blank is retained in the corresponding text part, that is, if it is a blank decorated line, a line break is output, and if a non-blank character string is retained, that is, a blank ornament. If the line is not a line, the character string is output, and line breaks are inserted before and after the character string. The formatting rule for “headline description” is defined as “indentation of bullets in line with bullets or chapter numbers in the headline”. The formatting rule for “normal message” is defined as “wrapping when the number of characters per line reaches a predetermined number. Output according to word wrapping permission / prohibition processing”.

整形部112は、整形文書の各行の先頭部分に、グループを特定する情報を追加し、それに続けて、文章部の文字列を整形ルールにしたがって追加する。グループを特定する情報は、例えばグループ毎に対応づけられている行頭文字列でもよいし、別の文字列であってもよい。要は、整形部112は、視覚的にグループを区別できるように、文字列を追加すればよい。整形部112は、新たに生成した整形文章を出力部114に出力する。出力部114は、整形文章を作成部58または表示処理部62に出力する。   The shaping unit 112 adds information for identifying a group to the head part of each line of the shaped document, and subsequently adds a character string of the text part according to the shaping rule. The information specifying the group may be a bullet character string associated with each group, for example, or may be another character string. In short, the shaping unit 112 may add a character string so that the groups can be visually distinguished. The shaping unit 112 outputs the newly generated formatted text to the output unit 114. The output unit 114 outputs the formatted text to the creation unit 58 or the display processing unit 62.

解析部104および整形部112の処理をプログラムする場合、解析条件格納部106ならびに整形ルール格納部116は、一連の処理手順としてコーディングされる。つまり、解析条件を保持する解析条件格納部106が別に用意される訳ではなく、プログラムコードとして表現されてよい。また、解析条件および整形ルールとして上述した形態がすべてではなく、例えば文字列の役割を特定するための解析条件を、更に精度よくすることも当然ながら当業者に理解されるところである。   When the processing of the analysis unit 104 and the shaping unit 112 is programmed, the analysis condition storage unit 106 and the shaping rule storage unit 116 are coded as a series of processing procedures. That is, the analysis condition storage unit 106 that holds the analysis conditions is not prepared separately, but may be expressed as a program code. Further, the above-described forms of the analysis conditions and the shaping rules are not all, but it will be understood by those skilled in the art that, for example, the analysis conditions for specifying the role of the character string are made more accurate.

図5は、図4の解析部104における行文字列を行頭文字部と文章部とに分離する処理のフローチャートの一例を示す図である。解析部104は、図4の受付部102から電子メールを受け付けると、その電子メールの本文分にあるオリジナル文章の一行を読み込み(S50)、オリジナル文章のすべてを読み込んだか否かを判定する(S52)。この処理を開始すると、解析部104は、オリジナル文章の先頭行から読み込みを開始して、最終行になるまで同一の分離処理を繰り返す。ステップ52で、例えば最終行か否かの判定は、読み込んだ行に、ファイルの終端を示すEOFが含まれているか否かに基づいて行う。   FIG. 5 is a diagram illustrating an example of a flowchart of a process of separating the line character string into a bullet part and a sentence part in the analysis unit 104 of FIG. When the analysis unit 104 receives an e-mail from the reception unit 102 of FIG. 4, the analysis unit 104 reads one line of the original text in the body of the e-mail (S50) and determines whether all of the original text has been read (S52). ). When this process is started, the analysis unit 104 starts reading from the first line of the original sentence and repeats the same separation process until the last line is reached. In step 52, for example, whether or not it is the last line is determined based on whether or not the read line includes an EOF indicating the end of the file.

最終行の場合(S52のY)、処理を終了する。最終行でない場合(S52のN)、解析部104は、行文字列に含まれる改行コードを削除する(S54)。次に、解析部104は、行文字列を行頭文字部と文章部とに分離する(S56)。例えば、この分離処理は、引用符、空白などの行頭文字列を構成する文字として予め設定された文字(以下、単に「候補文字」という)の有無を、行文字列の先頭から順に判定し、候補文字が無くなったときにその直前までの文字列を行頭文字列、すなわち行頭文字部としてもよい。そして、行文字列から行頭文字列を除いた文字列を文章部としてもよい。   If it is the last line (Y in S52), the process is terminated. If it is not the last line (N in S52), the analysis unit 104 deletes the line feed code included in the line character string (S54). Next, the analysis unit 104 separates the line character string into a bullet part and a sentence part (S56). For example, in this separation process, the presence or absence of a character (hereinafter simply referred to as “candidate character”) preset as a character constituting a bullet character string such as a quotation mark or a blank is determined in order from the top of the line character string, When there are no candidate characters, a character string up to that point may be used as a bullet character string, that is, a bullet character part. A character string obtained by removing the initial character string from the line character string may be used as the sentence part.

解析部104は、直前に処理した行文字列の行頭文字部と、現在処理した行文字列の行頭文字部とが一致するか否かを判定する(S58)。一致しない場合(S58のN)、解析部104は、新たなグループを生成し(S60)、そのグループに行頭文字列が属性として対応づけられる。ステップ58で、行頭文字部が一致する場合(S58のY)、解析部104は、現在のグループの文章部の配列に追加する(S62)。この処理を、オリジナル文章のすべての行について繰り返す。   The analysis unit 104 determines whether the bullet character part of the line character string processed immediately before matches the bullet character part of the currently processed line character string (S58). If they do not match (N in S58), the analysis unit 104 generates a new group (S60), and a bullet character string is associated with the group as an attribute. In step 58, when the bullet part matches (Y of S58), the analysis part 104 adds to the arrangement | sequence of the text part of the present group (S62). This process is repeated for all lines of the original sentence.

図6は、図4の解析部104における文字列毎の役割を特定する処理のフローチャートの一例を示す図である。解析部104は、グループ毎の文書部の配列から、ひとつずつ文章部を取得し(S70)、すべての文章部を読み込んだか否かを判定する(S72)。すべての文章部を読み込んだ場合(S72のY)、解析部104は処理を終了する。すべての文章部を読み込んでいない場合(S72のN)、解析部104は文字列の役割を特定する処理、すなわち文章における構成要素を識別する処理を行う(S74)。そして、解析部104は、識別した要素を属性として登録する(S90)。そして、ステップ70に戻り、すべてのグループの文章部を読み込むまで処理を続ける。すなわち、この一連の処理により、図4を用いて説明した文章構造情報が生成され、図4の文章構造格納部108に格納される。   FIG. 6 is a diagram illustrating an example of a flowchart of processing for specifying a role for each character string in the analysis unit 104 of FIG. The analysis unit 104 acquires sentence parts one by one from the array of document parts for each group (S70), and determines whether all the sentence parts have been read (S72). When all the text parts are read (Y of S72), the analysis part 104 complete | finishes a process. When all the text parts are not read (N of S72), the analysis part 104 performs the process which identifies the role of a character string, ie, the process which identifies the component in a text (S74). Then, the analysis unit 104 registers the identified element as an attribute (S90). Then, the process returns to step 70, and the process is continued until the text parts of all groups are read. That is, the text structure information described with reference to FIG. 4 is generated by this series of processes, and is stored in the text structure storage unit 108 of FIG.

ステップ74の文字列の要素を識別する処理は、図4の解析条件格納部106に関連して説明した解析条件をプログラムに反映したものである。まず、解析部104は、文章部の先頭が箇条書き文字か否かを判定する(S76)。箇条書き文字の場合(S76のY)、解析部104は見出し行として識別する(S84)。ステップ76で箇条書き文字でない場合(S76のN)、文章部が空または同一の文字が連続しているかを判定する(S78)。文章部が空または同一の文字が連続している場合(S78のY)、解析部104は飾り行として識別する(S86)。ステップ78で文章部が空または同一の文字が連続していない場合(S78のN)、解析部104は直前の文章部が見出し行か否かを判定する(S80)。見出し行の場合(S80のY)、解析部104は見出説明行として識別する(S88)。ステップ80で見出し行でない場合(S80のN)、解析部104は通常メッセージとして識別する(S82)。こうして識別された文字列の役割が、ステップ90で属性として登録される。   The process of identifying the character string element in step 74 reflects the analysis conditions described in relation to the analysis condition storage unit 106 in FIG. 4 in the program. First, the analysis unit 104 determines whether or not the head of the sentence part is a bullet character (S76). In the case of a bulleted character (Y of S76), the analysis part 104 identifies as a heading line (S84). If it is not a bullet character in step 76 (N in S76), it is determined whether the sentence portion is empty or the same character is continuous (S78). When the sentence part is empty or the same character is continuous (Y in S78), the analysis part 104 identifies it as a decorative line (S86). If the sentence part is empty or the same character is not continuous in step 78 (N of S78), the analysis part 104 determines whether or not the immediately preceding sentence part is a heading line (S80). In the case of a heading line (Y in S80), the analysis unit 104 identifies it as a heading explanation line (S88). When it is not a heading line in step 80 (N of S80), the analysis part 104 identifies as a normal message (S82). The role of the character string thus identified is registered as an attribute in step 90.

図7は、図4の整形部112における整形処理のフローチャートの一例を示す図である。整形部112は、グループ毎の文章部と文章構造情報を読み込み(S90)、すべての文章部について読み込みを行ったか否かを判断する(S92)。すべての文章部について読み込みを行った場合(S92のY)、処理を終了する。すべての文章部について読み込みを行っていない場合(S92のN)、整形部112は、グループを視覚的に区別するための行頭文字列を出力する(S94)。そして、整形部112は、文章部の属性すなわち文字列の役割に応じた整形処理を行う(S96)。これを、すべての文章部について行うことで、整形文章が生成される。   FIG. 7 is a diagram illustrating an example of a flowchart of the shaping process in the shaping unit 112 of FIG. The shaping unit 112 reads the sentence part and sentence structure information for each group (S90), and determines whether or not all the sentence parts have been read (S92). If all the text parts have been read (Y in S92), the process is terminated. When all the text parts are not read (N in S92), the shaping part 112 outputs a bullet character string for visually distinguishing the groups (S94). And the shaping part 112 performs the shaping process according to the attribute of a text part, ie, the role of a character string (S96). By performing this for all the sentence parts, a formatted sentence is generated.

ステップ96の整形処理は、図4を用いて説明した文字列の役割毎に対応づけられた整形ルールに基づいた処理をフローチャートにしたものである。この処理で、まず整形部112は、文章部の属性が見出し行か否かを判定する(S98)。見出し行の場合(S98のY)、整形部112は、文章部の前後に改行を追加してバッファに出力する(S104)。ステップ98で、見出し行でない場合(S98のN)、整形部112は、文章部の属性が見出説明行であるか否かを判定する(S100)。見出説明行の場合(S100のY)、整形部112は、直前の見出し行に対して、行頭の字下げを調整すべく空白を追加してバッファに出力する(S106)。ステップ100で、見出説明行でない場合(S100のN)、整形部112は文章部の属性が飾り行か否かを判定する(S102)。飾り行の場合(S102のY)、整形部112は文章部の前後に改行を追加してバッファに出力する(S108)。ステップ102で、飾り行でない場合(S102のN)、整形部112は通常メッセージとして判断し、文章部をそのままバッファに出力する(S110)。そして、整形部112はバッファ内の文字列を、1行あたりの文字数、ワードラップ、禁則処理などに応じて折り返して整形しながら出力する(S112)。   The shaping process in step 96 is a flowchart of the process based on the shaping rule associated with each role of the character string described with reference to FIG. In this process, the shaping unit 112 first determines whether the attribute of the text part is a heading line (S98). In the case of a heading line (Y in S98), the shaping unit 112 adds line breaks before and after the text part and outputs it to the buffer (S104). In step 98, when it is not a heading line (N of S98), the shaping part 112 determines whether the attribute of a text part is a heading description line (S100). In the case of a headline explanation line (Y in S100), the shaping unit 112 adds a blank to the previous headline line to adjust the indentation of the headline and outputs it to the buffer (S106). In step 100, when it is not a headline explanation line (N of S100), the shaping part 112 determines whether the attribute of a text part is a decoration line (S102). In the case of a decorative line (Y in S102), the shaping unit 112 adds a line break before and after the text part and outputs it to the buffer (S108). If it is not a decoration line in step 102 (N in S102), the shaping unit 112 determines that the message is a normal message, and outputs the text part to the buffer as it is (S110). Then, the shaping unit 112 wraps and outputs the character string in the buffer according to the number of characters per line, word wrap, prohibition processing, and the like (S112).

以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、その各構成要素や各処理プロセスの組合せにいろいろな変形が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on the embodiments. This embodiment is an exemplification, and it is understood by those skilled in the art that various modifications can be made to each component and combination of processing processes, and such modifications are within the scope of the present invention.

図1(a)は、整形処理前の電子メールの本文部分の文章を示す図であり、図1(b)は、図1(a)の文章を、整形処理した後の文章を示す図である。FIG. 1A is a diagram showing the text of the body part of the e-mail before the formatting process, and FIG. 1B is a diagram showing the text after the text of FIG. 1A is formatted. is there. 実施の形態に係る整形処理のフローチャートである。It is a flowchart of the shaping process which concerns on embodiment. 実施の形態に係る整形処理機能を有する電子メール装置の構成図である。It is a block diagram of the electronic mail apparatus which has the shaping process function which concerns on embodiment. 図3の整形処理部の内部構成図である。It is an internal block diagram of the shaping process part of FIG. 図4の解析部における行文字列を行頭文字部と文章部とに分離する処理のフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart of the process which isolate | separates the line character string in the analysis part of FIG. 4 into a bullet part and a text part. 図4の解析部における文字列毎の役割を特定する処理のフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart of the process which specifies the role for every character string in the analysis part of FIG. 図4の整形部における整形処理のフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart of the shaping process in the shaping part of FIG.

符号の説明Explanation of symbols

50 電子メール装置、52 受信部、54 電子メール格納部、56 選択部、58 作成部、60 送信部、62 表示処理部、100 整形処理部、102 受付部、104 解析部、106 解析条件格納部、108 文章構造格納部、110 文章データ格納部、112 整形部、114 出力部、116 整形ルール格納部。   50 e-mail device, 52 receiving unit, 54 e-mail storage unit, 56 selection unit, 58 creation unit, 60 transmission unit, 62 display processing unit, 100 shaping processing unit, 102 reception unit, 104 analysis unit, 106 analysis condition storage unit , 108 sentence structure storage unit, 110 sentence data storage unit, 112 shaping unit, 114 output unit, 116 shaping rule storage unit.

Claims (12)

複数の文字列を含む文章を受け付ける入力部と、
それぞれの文字列の前記文章における役割を、可視化されるべき文字列に基づいて特定する解析部と、
前記文章に含まれる文字列を、その役割に応じて可視化する整形部と、
を備えることを特徴とする文書整形装置。
An input unit that accepts sentences including a plurality of character strings;
An analysis unit that identifies the role of each character string in the sentence based on the character string to be visualized;
A shaping unit that visualizes a character string included in the sentence according to its role;
A document shaping apparatus comprising:
前記解析部は、所定の役割に応じた特徴が前記文字列に含まれているか否かに基づいて、前記文字列の役割を特定することを特徴とする請求項1に記載の文書整形装置。   The document shaping apparatus according to claim 1, wherein the analysis unit identifies a role of the character string based on whether or not a feature corresponding to a predetermined role is included in the character string. 前記解析部は、それぞれの文字列の相互関係を特定し、相互に関係する文字列毎にグループ化することを特徴とする請求項1または2に記載の文書整形装置。   3. The document shaping apparatus according to claim 1, wherein the analysis unit identifies a mutual relationship between the character strings and groups the character strings in relation to each other. 前記整形部は、前記グループに含まれる文字列を、視覚的にグループ毎に区別できるように可視化することを特徴とする請求項3に記載の文書整形装置。   The document shaping apparatus according to claim 3, wherein the shaping unit visualizes a character string included in the group so that the character string can be visually distinguished for each group. 前記入力部は、前記文章を電子メールとして受け付け、
前記解析部は、前記電子メールの本文に含まれる文章を対象に、その文章中の文字列の役割を特定することを特徴とする請求項3または4に記載の文書整形装置。
The input unit accepts the sentence as an email,
5. The document shaping apparatus according to claim 3, wherein the analysis unit specifies a role of a character string in the sentence included in the body of the electronic mail.
前記解析部は、前記電子メール中の文字列に含まれる引用符に基づいて、前記相互関係を特定し、それぞれの文字列をグループ化することを特徴とする請求項5に記載の文書整形装置。   6. The document formatting apparatus according to claim 5, wherein the analysis unit specifies the correlation based on quotation marks included in a character string in the electronic mail, and groups each character string. . 前記整形部は、前記文字列からその文字列の位置調整に係るすべての文字情報を取り除き、その文字列の役割に応じて新たに位置調整に係る文字情報を付加することで前記文字列を可視化したときの配置を調整することを特徴とする請求項1から6のいずれかに記載の文書整形装置。   The shaping unit removes all the character information related to the position adjustment of the character string from the character string, and newly adds the character information related to the position adjustment according to the role of the character string to visualize the character string The document shaping apparatus according to claim 1, wherein the arrangement when adjusted is adjusted. 前記解析部は、同一の引用符を含む文字列を同一のグループとして分別し、
前記整形部は、グループの可視化のために、そのグループに属する文字列に付加されていた引用符を利用することを特徴とする請求項6または7に記載の文書整形装置。
The analysis unit separates character strings including the same quotation marks into the same group,
The document shaping apparatus according to claim 6, wherein the shaping unit uses a quote added to a character string belonging to the group for visualization of the group.
前記所定の役割に応じた特徴に基づいて、文字列の役割を特定するための解析条件を保持する解析条件格納部を更に備え、
前記解析部は、それぞれの文字列に対して、前記解析条件が適合するか否かを判断することにより、それぞれの文字列の役割を特定することを特徴とする請求項1から8のいずれかに記載の文書整形装置。
Based on the characteristics according to the predetermined role, further comprising an analysis condition storage unit that holds an analysis condition for specifying the role of the character string,
The analysis unit determines a role of each character string by determining whether or not the analysis condition is suitable for each character string. The document shaping device described in 1.
前記解析条件は、前記所定の役割を有する文字列の自然文における特徴に基づいて定義されることを特徴とする請求項9に記載の文書整形装置。   The document shaping apparatus according to claim 9, wherein the analysis condition is defined based on a characteristic of the character string having the predetermined role in a natural sentence. 前記解析条件が定義された役割に対応して、その役割を有する文字列の可視化方法を指定する可視化ルールを保持するルール格納部を更に備え、前記整形部は、それぞれの文字列の役割に対応する可視化ルールに基づいて可視化を行うことを特徴とする請求項9または10に記載の文書整形装置。   Corresponding to the role in which the analysis condition is defined, it further includes a rule storage unit that holds a visualization rule that specifies a visualization method of the character string having the role, and the shaping unit corresponds to the role of each character string. The document shaping apparatus according to claim 9, wherein visualization is performed based on a visualization rule to be performed. ネットワークを介して電子メールを受け付ける受信部と、
前記電子メールの本文部分から複数の文字列を含む文章を取得し、それぞれの文字列の前記文章における役割を、可視化されるべき文字列に基づいて特定する解析部と、
前記文章に含まれる文字列を、その役割に応じて可視化して、前記文章を整形する整形部と、
整形した文章を前記電子メールの本文部分として表示させる表示処理部と、
を備えることを特徴とする電子メール装置。
A receiving unit that accepts e-mail over the network;
An analysis unit that obtains a sentence including a plurality of character strings from the body part of the email, and identifies the role of each character string in the sentence based on the character string to be visualized,
A character string included in the sentence is visualized according to its role, and a shaping unit that shapes the sentence;
A display processor that displays the formatted text as the body part of the email;
An electronic mail apparatus comprising:
JP2003435824A 2003-12-26 2003-12-26 Document shaping device and electronic mail device equipped with its function Pending JP2005196305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003435824A JP2005196305A (en) 2003-12-26 2003-12-26 Document shaping device and electronic mail device equipped with its function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003435824A JP2005196305A (en) 2003-12-26 2003-12-26 Document shaping device and electronic mail device equipped with its function

Publications (1)

Publication Number Publication Date
JP2005196305A true JP2005196305A (en) 2005-07-21

Family

ID=34815776

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003435824A Pending JP2005196305A (en) 2003-12-26 2003-12-26 Document shaping device and electronic mail device equipped with its function

Country Status (1)

Country Link
JP (1) JP2005196305A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008021115A (en) * 2006-07-12 2008-01-31 Sharp Corp Document processor, program thereof, computer-readable recording medium having this program recorded thereon, electronic indicator, and document processing method
JP2010108326A (en) * 2008-10-31 2010-05-13 Toshiba Corp Document analysis device and document analysis program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008021115A (en) * 2006-07-12 2008-01-31 Sharp Corp Document processor, program thereof, computer-readable recording medium having this program recorded thereon, electronic indicator, and document processing method
JP2010108326A (en) * 2008-10-31 2010-05-13 Toshiba Corp Document analysis device and document analysis program

Similar Documents

Publication Publication Date Title
JP4402138B2 (en) Image processing apparatus, image processing method, and computer program
US6336124B1 (en) Conversion data representing a document to other formats for manipulation and display
US20090198677A1 (en) Document Comparison Method And Apparatus
JP2005524892A5 (en)
JPH1091648A (en) Device for representing and giving link to information and quoted or reproduced material
JP2011065255A (en) Data processing apparatus, data name generation method and computer program
JP5829330B2 (en) Method and apparatus for identifying fonts
JP4470913B2 (en) Character string search device and program
JP2019121165A (en) Retrieval result outputting program, retrieval result outputting apparatus, and retrieval result outputting method
JP2005196305A (en) Document shaping device and electronic mail device equipped with its function
JP3864687B2 (en) Information classification device
JP2007219646A (en) Mail printing system and computer program
US20130332824A1 (en) Embedded font processing method and device
JP5197694B2 (en) Image processing apparatus, image processing method, and computer program
JP6267830B2 (en) Document structure analysis device using image processing
WO2007129288A2 (en) Electronic document reformatting
US20110320927A1 (en) Methods and Apparatus Utilizing XooML: Cross (X) Tool Markup Language
JPH1139315A (en) Method for converting formatted document into sequenced word list
JP4200650B2 (en) E-mail summary transfer system
CN108170651B (en) Information processing method
JP5310206B2 (en) Document processing apparatus, document processing method, and document processing program
TW466426B (en) System and method for extracting data from semi-structured text
JP4995801B2 (en) Document analysis apparatus, document analysis program, and document analysis method
JP4947843B2 (en) Translation apparatus, translation method, recording medium recording program, and program
US20230229855A1 (en) Automatic filling of a form with formatted text

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080904

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080909

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090127