JP2021082088A - Information processing device, control method thereof, program, and storage medium - Google Patents

Information processing device, control method thereof, program, and storage medium Download PDF

Info

Publication number
JP2021082088A
JP2021082088A JP2019210032A JP2019210032A JP2021082088A JP 2021082088 A JP2021082088 A JP 2021082088A JP 2019210032 A JP2019210032 A JP 2019210032A JP 2019210032 A JP2019210032 A JP 2019210032A JP 2021082088 A JP2021082088 A JP 2021082088A
Authority
JP
Japan
Prior art keywords
information
auxiliary information
text
structured document
annotation
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
JP2019210032A
Other languages
Japanese (ja)
Inventor
陽子 齊野
Yoko Saino
陽子 齊野
睦 池田
Mutsumi Ikeda
睦 池田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2019210032A priority Critical patent/JP2021082088A/en
Publication of JP2021082088A publication Critical patent/JP2021082088A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

To provide a series of display processing of a structured document capable of improving the readability of auxiliary information in the case when reading kanas which are attached to kanjis as auxiliary information annotated to kanjis is more important when understanding the document depending on the age, the nationality, etc. of a user.SOLUTION: An information processing device 100 includes: an acquisition unit 111 that acquires a structured document; a determination unit 112 that determines whether the description of the structured document includes predetermined annotation information; a conversion unit 114 configured to, when determined that annotation information is included, convert the description of the structured document so that a piece of auxiliary information included in the annotation information is embedded in the body of the structured document; and a display control unit 115 that controls to display the structured document on a display unit according to the description of the converted structured document.SELECTED DRAWING: Figure 1

Description

本発明は構造化文書の表示処理に関する。 The present invention relates to a display process of a structured document.

Webサイトのコンテンツとして利用されているHTML文書では、文字列の表現の一つとしてルビを扱うことができる。ルビとは、コンテンツの本文に対する注釈情報であり、対象となる文字列に注釈を付け加えるための補助情報として表示される。日本語の場合には、注釈対象となる漢字に対して補助情報として読み仮名を示したり、注釈対象となる熟語や慣用句に対して補助情報として意味を示したりするのに利用される。一般に、横書きであれば注釈対象の上部、縦書きであれば注釈対象の右に補助情報が、本文の文字よりも小さい文字によって表示される。 In the HTML document used as the content of the website, ruby can be treated as one of the expressions of the character string. Ruby is annotation information for the text of the content, and is displayed as auxiliary information for adding annotations to the target character string. In the case of Japanese, it is used to indicate reading kana as auxiliary information for the kanji to be annotated, and to indicate the meaning as auxiliary information for the compound words and idioms to be annotated. In general, auxiliary information is displayed at the top of the annotation target for horizontal writing and to the right of the annotation target for vertical writing, with characters smaller than the characters in the text.

一方、近年では、スマートフォン、タブレット端末、携帯型ゲーム機など表示領域が小さい情報処理装置でも、ルビを含むWebサイトを閲覧する機会がある。表示領域の小さいデバイスにおいて、視認性のよいフォントサイズで文書を表示するには、1画面あたりに表示可能な文字数が、表示領域が大きいデバイスに比べて少なくなる。その上で、補助情報を表示すると行間が広がるため1画面あたりに収まる情報量がさらに低下する。そこで特許文献1では、表示部の表示領域の大きさに応じて、補助情報を非表示にした文書を表示可能とする。 On the other hand, in recent years, even information processing devices having a small display area such as smartphones, tablet terminals, and portable game machines have an opportunity to browse websites including ruby. In order to display a document in a font size with good visibility on a device having a small display area, the number of characters that can be displayed per screen is smaller than that on a device having a large display area. On top of that, when the auxiliary information is displayed, the line spacing is widened, so that the amount of information that can be accommodated on one screen is further reduced. Therefore, in Patent Document 1, it is possible to display a document in which auxiliary information is hidden according to the size of the display area of the display unit.

特開2014−119968号公報Japanese Unexamined Patent Publication No. 2014-119868

ユーザの年齢、国籍などによっては、文書を理解する上で、注釈対象である漢字よりも補助情報である読み仮名の方が重要になる場合がある。しかしながら一般的に補助情報は行間に、本文よりも小さい文字で表示されることが多いため、補助情報をより重視する閲覧者にとっては可読性が低いといえる。特許文献1は、補助情報の表示/非表示を切り替えることを提案するが、補助情報の内容が本文に対してより重視される環境があることは考慮されていない。 Depending on the age, nationality, etc. of the user, the reading kana, which is auxiliary information, may be more important than the kanji to be annotated in understanding the document. However, in general, auxiliary information is often displayed between lines in characters smaller than the text, so that it can be said that the readability is low for a viewer who places more importance on auxiliary information. Patent Document 1 proposes to switch the display / non-display of the auxiliary information, but does not consider that there is an environment in which the content of the auxiliary information is more important to the text.

本発明は、上述した問題を解決するためになされたものであり、構造化文書に含まれる注釈情報の可読性を向上させることを目的の1つとする。 The present invention has been made to solve the above-mentioned problems, and one of the objects of the present invention is to improve the readability of annotation information contained in a structured document.

以上の課題を解決するために、本発明の情報処理装置は、構造化文書を取得する取得手段と、前記構造化文書の記述に所定の注釈情報が含まれるか判定する判定手段と、前記判定手段で注釈情報があると判定された場合、前記注釈情報に含まれる補助情報を前記構造化文書の本文に埋め込むように構造化文書の記述を変換する変換手段と、前記変換された構造化文書の記述に従って、前記構造化文書を表示装置に表示させる表示制御手段と、を有する。 In order to solve the above problems, the information processing apparatus of the present invention includes an acquisition means for acquiring a structured document, a determination means for determining whether or not a predetermined annotation information is included in the description of the structured document, and the determination. When it is determined by the means that there is annotation information, the conversion means for converting the description of the structured document so that the auxiliary information included in the annotation information is embedded in the body of the structured document, and the converted structured document. The present invention includes a display control means for displaying the structured document on the display device according to the description of the above.

本発明によれば、ルビ表記を含む構造化文書を、構造化文書に含まれる注釈情報の可読性が向上する。 According to the present invention, the readability of the annotation information included in the structured document of the structured document including the ruby notation is improved.

情報処理装置のハードウェア構成及び機能構成の一例を示すブロック図。The block diagram which shows an example of the hardware configuration and the functional configuration of an information processing apparatus. 注釈情報を含むHTML文書、及び描画結果の一例を示す図。The figure which shows an example of the HTML document including the annotation information, and the drawing result. HTML文書の表示を行うアプリケーションのGUIの一例を示すブロック図。The block diagram which shows an example of GUI of the application which displays an HTML document. 変換後のHTML文書、及び描画結果の一例を示す図。The figure which shows an example of the HTML document after conversion and the drawing result. 変換後のHTML文書、及び描画結果の一例を示す図。The figure which shows an example of the HTML document after conversion and the drawing result. 変換後のHTML文書、及び描画結果の一例を示す図。The figure which shows an example of the HTML document after conversion and the drawing result. 情報処理装置が実行するメイン処理の一例をフローチャート。A flowchart shows an example of the main processing executed by the information processing device. 情報処理装置が実行する文書変換処理の一例を示すフローチャート。The flowchart which shows an example of the document conversion process executed by an information processing apparatus. HTML文書の表示を行うアプリケーションのGUIの一例を示すブロック図。The block diagram which shows an example of GUI of the application which displays an HTML document. HTML文書、及び描画結果の一例を示す図。The figure which shows an example of the HTML document and the drawing result.

以下、本発明に係る実施形態を、図面を参照して詳細に説明する。なお、以下の実施形態に記載する構成は代表例であり、本発明の範囲はそれらの具体的構成に必ずしも限定されない。 Hereinafter, embodiments according to the present invention will be described in detail with reference to the drawings. The configurations described in the following embodiments are typical examples, and the scope of the present invention is not necessarily limited to those specific configurations.

<第1の実施形態>
第1の実施形態として、タブレット端末にインストールされたブラウザアプリケーションで、注釈情報を含むHTML文書を閲覧する場合に、注釈情報を複数の選択肢からユーザが選択した変換方法によって変換した形式で表示する処理の例を説明する。なお、以下の実施形態において、「注釈情報」とはHTML文書の記述のうち文書本文に対する注釈を表記するための記述部分を指す。また、「注釈対象」とは文書本文のうち注釈される文字列を指し、「補助情報」とは注釈として表記される文字列を指す。
<First Embodiment>
As the first embodiment, when a browser application installed on a tablet terminal browses an HTML document containing annotation information, the processing of displaying the annotation information in a format converted by a conversion method selected by the user from a plurality of options. An example of is described. In the following embodiments, the "commentary information" refers to a description portion of the description of the HTML document for expressing a comment on the document body. Further, the "annotation target" refers to the character string to be annotated in the document body, and the "auxiliary information" refers to the character string described as an annotation.

図1(a)は本実施形態における情報処理装置のハードウェア構成を示すブロック図である。本実施形態において、情報処理装置100は一例としてタブレット端末を想定する。ただし、情報処理装置100はスマートフォン、各種ウェアラブルデバイス、ゲーム機、あるいはパーソナルコンピュータなど、ブラウザ機能を備えてHTML文書を閲覧可能なデバイスであれば本実施形態の適用が可能である。情報処理装置100は、主な構成要素として、情報処理装置全体の制御を司るコントローラ部101、操作装置102、表示装置103、記憶装置104、通信装置108を備える。 FIG. 1A is a block diagram showing a hardware configuration of the information processing apparatus according to the present embodiment. In the present embodiment, the information processing device 100 assumes a tablet terminal as an example. However, the information processing device 100 can be applied to the present embodiment as long as it is a device having a browser function and capable of viewing HTML documents, such as a smartphone, various wearable devices, a game machine, or a personal computer. The information processing device 100 includes a controller unit 101, an operation device 102, a display device 103, a storage device 104, and a communication device 108 that control the entire information processing device as main components.

コントローラ部101は、CPU105、ROM106、RAM107を備える。CPU105は、情報処理装置100における各処理部の処理を実行する。ROM106には、CPU105が実行する各種プログラムや、プログラムが必要とするデータが記憶されている。また、RAM107はSRAM、DRAM等で構成され、プログラム制御変数等を格納するためのものである。また、各種ワーク用バッファもRAM107に格納されるものである。記憶装置104はハードディスクなどで構成され、文書や画像などのファイルデータを格納するためのものである。操作装置102は、ユーザが各種入力操作を行うためのデバイスであり、ポインティングデバイスやキーボード等で構成される。本実施形態では、表示装置103と連動したタッチパネルが操作装置102である。表示装置103は、LCD、LED等でユーザに表示通知するためのものである。通信装置108は、ネットワークに接続するためのインタフェースである。接続方法としてはLAN、USB等がある。 The controller unit 101 includes a CPU 105, a ROM 106, and a RAM 107. The CPU 105 executes the processing of each processing unit in the information processing apparatus 100. The ROM 106 stores various programs executed by the CPU 105 and data required by the programs. Further, the RAM 107 is composed of SRAM, DRAM, etc., and is for storing program control variables and the like. Further, various work buffers are also stored in the RAM 107. The storage device 104 is composed of a hard disk or the like and is for storing file data such as documents and images. The operation device 102 is a device for the user to perform various input operations, and is composed of a pointing device, a keyboard, and the like. In the present embodiment, the touch panel linked with the display device 103 is the operation device 102. The display device 103 is for notifying the user of the display by using an LCD, an LED, or the like. The communication device 108 is an interface for connecting to a network. As a connection method, there are LAN, USB and the like.

本実施形態で表す情報処理装置100は取得したWebコンテンツを解釈して描画するアプリケーションプログラム(以下、ブラウザと称する)を実行する。ブラウザはROM106もしくは記憶装置104に格納され、RAM107に読み出してCPU105が処理を実行する。ブラウザを構成するGUIやWebコンテンツは表示装置103に描画され、操作装置102からの入力に伴いユーザからの指示を受け付ける。ネットワーク経由でWebコンテンツを取得する場合、通信装置108を介して処理をする。 The information processing device 100 represented by the present embodiment executes an application program (hereinafter, referred to as a browser) that interprets and draws the acquired Web content. The browser is stored in the ROM 106 or the storage device 104, reads into the RAM 107, and the CPU 105 executes the process. The GUI and Web contents constituting the browser are drawn on the display device 103, and receive an instruction from the user in response to the input from the operation device 102. When the Web content is acquired via the network, the processing is performed via the communication device 108.

図1(b)は、本実施形態におけるコントローラ部101によって実現されるソフトウェアの構成を模式的に示したブロック図である。各機能部は、CPU105が、ROM106に格納されたプログラムをRAM107に展開し、後述する各フローチャートに従った処理を実行することで実現されている。そして、各処理の実行結果をRAM107に保持する。また例えば、CPU105を用いたソフトウェア処理の代替としてハードウェアを構成する場合には、ここで説明する各機能部の処理に対応させた演算部や回路を構成すればよい。 FIG. 1B is a block diagram schematically showing a configuration of software realized by the controller unit 101 in the present embodiment. Each functional unit is realized by the CPU 105 expanding the program stored in the ROM 106 into the RAM 107 and executing processing according to each flowchart described later. Then, the execution result of each process is held in the RAM 107. Further, for example, when hardware is configured as an alternative to software processing using the CPU 105, a calculation unit or a circuit corresponding to the processing of each functional unit described here may be configured.

取得部111は、ブラウザで指定されたHTML文書を取得する処理を行う。本実施形態では、操作装置102を利用する入力により情報処理装置100内の文書が指定された場合は記憶装置104に保存されたHTML文書を取得する。URLで情報処理装置100外の文書を指定された場合は通信装置108を介してHTML文書を取得する。 The acquisition unit 111 performs a process of acquiring the HTML document specified by the browser. In the present embodiment, when the document in the information processing device 100 is specified by the input using the operation device 102, the HTML document stored in the storage device 104 is acquired. When a document outside the information processing device 100 is specified in the URL, the HTML document is acquired via the communication device 108.

判定部112は、HTML文書内に注釈要素が存在するかを判定する。一般に、HTMLでは注釈情報を指定するため要素(以下、注釈要素)として<ruby>要素が定義されており、ルビを振る対象となる注釈対象は<ruby>要素、補助情報は<rt>要素で指定される。また、注釈対象の上部や右部に補助情報を表記する機能を持たない情報処理装置やブラウザが、補助情報を表現するために使用する代替表記情報を<rp>要素で指定することが定義されている。判定部112は、取得部111に取得されたHTML文書を解析し、<ruby>要素の有無を判定する。 The determination unit 112 determines whether or not the annotation element exists in the HTML document. Generally, in HTML, a <ruby> element is defined as an element (hereinafter referred to as an annotation element) for specifying annotation information, the annotation target for ruby is the <ruby> element, and the auxiliary information is the <rt> element. It is specified. In addition, it is defined that an information processing device or a browser that does not have a function of notating auxiliary information in the upper part or the right part of an annotation target specifies alternative notation information used to express the auxiliary information in the <rp> element. ing. The determination unit 112 analyzes the HTML document acquired by the acquisition unit 111 and determines the presence or absence of the <ruby> element.

選択部113は、判定部112に注釈情報があると判定された場合に、ユーザ入力に基づいてルビ表記を変換する表記方法を選択する。本実施形態では、表示装置103に、注釈情報の表記方法を複数の選択肢から選択させるGUIが表示され、選択部113は、ユーザ入力によって選択された選択肢に応じた表記方法を選択する。変換部114は、取得部111で取得されたHTML文書を、選択部113で選択された表記方法に従って変換する処理を行う。本実施形態では、判定部112で存在を確認した<ruby>要素に包含される<rt>要素、<rp>要素を解釈して、注釈対象、補助情報、代替表記情報の表記を変更する。 The selection unit 113 selects a notation method for converting the ruby notation based on the user input when it is determined that the determination unit 112 has annotation information. In the present embodiment, the display device 103 displays a GUI for selecting the notation method of the annotation information from a plurality of options, and the selection unit 113 selects the notation method according to the options selected by the user input. The conversion unit 114 performs a process of converting the HTML document acquired by the acquisition unit 111 according to the notation method selected by the selection unit 113. In the present embodiment, the <rt> element and the <rp> element included in the <ruby> element whose existence has been confirmed by the determination unit 112 are interpreted, and the notation of the annotation target, the auxiliary information, and the alternative notation information is changed.

なお、HTML文書のような構造化文書の要素検出や構造の変換は構造解析ツールで行うことが出来る。例えば、構造解析ツールは構造化文書を入力すると文書を構成する要素、テキスト、属性などをオブジェクトとして木構造で表現したDOM(DocumentObjectModel)ツリーを生成する。DOMツリーを構成する各オブジェクトをノードと呼び、要素、テキスト、属性の各ノードを要素ノード、テキストノード、属性ノードと呼ぶ。DOMツリーに対する操作として、指定したノードの取得、ノード追加、削除等を行うことが出来る。また、DOMツリーはシリアライズして構造化文書として出力することもできる。判定部112や変換部114で行う<ruby>要素の抽出やHTML文書の変換はこの構造解析ツールを用いて実現する。 In addition, element detection and structure conversion of a structured document such as an HTML document can be performed by a structure analysis tool. For example, when a structured document is input, a structural analysis tool generates a DOM (Document Object Model) tree in which elements, texts, attributes, and the like constituting the document are represented by a tree structure as objects. Each object that constitutes the DOM tree is called a node, and each node of element, text, and attribute is called an element node, text node, and attribute node. As an operation on the DOM tree, it is possible to acquire a specified node, add a node, delete a node, and the like. The DOM tree can also be serialized and output as a structured document. Extraction of <ruby> elements and conversion of HTML documents performed by the determination unit 112 and the conversion unit 114 are realized by using this structural analysis tool.

表示制御部115は、表示装置103に表示される内容を制御する機能部である。本実施形態では、GUIを含むブラウザの実行画面、及び、取得部111に取得されたHTML文書を変換部114によって変換したデータを描画し、表示装置103に出力する。 The display control unit 115 is a functional unit that controls the contents displayed on the display device 103. In the present embodiment, the execution screen of the browser including the GUI and the data obtained by converting the HTML document acquired by the acquisition unit 111 by the conversion unit 114 are drawn and output to the display device 103.

図2は、注釈情報を含むHTML文書とその描画結果の一例を示す図である。HTML文書201では<ruby>要素により注釈情報が5箇所指定されている。具体的には、注釈対象である「来」、「白妙」、「衣」、「天」、「香具山」に対し、それそれ<rt>要素で「き」、「しろたへ」、「ころも」、「あま」、「かぐやま」が補助情報として指定されている。また、ブラウザが注釈対象と補助情報を並べて表示できない場合には、代替表記情報として「[」、「]」を使用して、注釈対象と補助情報を識別させるよう<rp>要素で指定されている。注釈対象に補助情報を並列で表記可能な情報処理装置100の場合、描画結果202のように表示される。 FIG. 2 is a diagram showing an example of an HTML document including annotation information and a drawing result thereof. In the HTML document 201, five annotation informations are specified by the <ruby> element. Specifically, for the annotation targets "Kuru", "Hakumei", "Clothing", "Ten", and "Mt. Amanoka", the <rt> elements are "ki", "shirotahe", and " "Koromo", "Ama", and "Kaguyama" are designated as auxiliary information. If the browser cannot display the annotation target and the auxiliary information side by side, the <rp> element is specified to distinguish the annotation target and the auxiliary information by using "[" and "]" as alternative notation information. There is. In the case of the information processing apparatus 100 capable of expressing auxiliary information in parallel as an annotation target, the drawing result 202 is displayed.

図3は、本実施形態でHTML文書の表示を行うブラウザのGUI(Graphical User Interface)の画面の一例を示す図である。ウィンドウ301は、表示するHTML文書を指定するロケーション欄302、HTML文書のレイアウト結果を描画する描画領域304で構成されている。ロケーション欄302では、図2に示したHTML文書が指定されているとする。図3の例では、描画領域304の上に、ダイアログ303がポップアップ表示されている。本実施形態では、取得したHTML文書内に注釈情報が存在することが判定された場合に、ダイアログ303が表示される。ボタン305〜312は注釈情報の表記方法を選択するための選択肢に対応するボタンであって、HTML文書の一部に変換を施した結果を例示している。選択部113は、ユーザが押下したボタンに関連付けられた表記方法を選択する。変換部114は、選択された表記方法による表記を実現するように、HTML文書の変換を行う。本実施形態では、ダイアログ303により、以下の8つの選択肢をユーザに提示する。なおここでユーザは、Webコンテンツを閲覧する閲覧者を想定する。 FIG. 3 is a diagram showing an example of a screen of a GUI (Graphical User Interface) of a browser that displays an HTML document in the present embodiment. The window 301 is composed of a location field 302 for designating the HTML document to be displayed and a drawing area 304 for drawing the layout result of the HTML document. In the location column 302, it is assumed that the HTML document shown in FIG. 2 is specified. In the example of FIG. 3, the dialog 303 is popped up on the drawing area 304. In the present embodiment, the dialog 303 is displayed when it is determined that the annotation information exists in the acquired HTML document. The buttons 305 to 312 are buttons corresponding to the options for selecting the notation method of the annotation information, and exemplify the result of converting a part of the HTML document. The selection unit 113 selects the notation method associated with the button pressed by the user. The conversion unit 114 converts the HTML document so as to realize the notation according to the selected notation method. In this embodiment, the dialog 303 presents the user with the following eight options. Here, the user is assumed to be a viewer who browses the Web content.

・選択肢1:ボタン305は、本文から注釈対象を削除した上で、HTML文書中で予め指定された代替表記情報を利用して、補助情報を本文に挿入する表記方法に対応する。代替表記情報により、補助情報が本文中の他の文字列と識別可能となる。
・選択肢2:ボタン306は、HTML文書中で予め指定された代替表記情報を利用して、本文中の注釈対象の直後に、補助情報を挿入する表記方法に対応する。代替表記情報により、補助情報が本文中の他の文字列と識別可能となる。
・選択肢3:ボタン307は、本文から注釈対象を削除した上で、補助情報を本文に挿入し、かつ、補助情報の前後に括弧「(」、「)」を挿入する表記方法に対応する。括弧の挿入により、補助情報が本文中の他の文字列と識別可能となる。
・選択肢4:ボタン308は、本文中の注釈対象の直後に補助情報を挿入し、かつ、補助情報の前後に括弧「(」、「)」を挿入する表記方法に対応する。括弧の挿入により、補助情報が本文中の他の文字列と識別可能となる。
・選択肢5:ボタン309は、本文から注釈対象を削除した上で、補助情報を本文に挿入し、かつ、補助情報に下線を付与する表記方法に対応する。下線の付加により、補助情報が本文中の他の文字列と識別可能となる。
・選択肢6:ボタン310は、本文中の注釈対象の直後に補助情報を挿入し、かつ、補助情報に下線を付与する表記方法に対応する。下線の付加により、補助情報が本文中の他の文字列と識別可能となる。
・選択肢7:ボタン311は、本文から注釈対象を削除した上で、補助情報を本文に挿入し、かつ、補助情報の前後にスペースを挿入する表記方法に対応する。スペースの挿入により、補助情報が本文中の他の文字列と識別可能となる。
・選択肢8:ボタン312は、HTML文書を変換しない、すなわち、従来通り行間に補助情報を表示させる表記方法に対応する。
-Option 1: The button 305 corresponds to a notation method in which the annotation target is deleted from the text and the auxiliary information is inserted into the text by using the alternative notation information specified in advance in the HTML document. The alternative notation information makes the auxiliary information distinguishable from other character strings in the text.
Option 2: The button 306 corresponds to a notation method in which auxiliary information is inserted immediately after the annotation target in the text by using the alternative notation information specified in advance in the HTML document. The alternative notation information makes the auxiliary information distinguishable from other character strings in the text.
Option 3: Button 307 corresponds to a notation method in which the annotation target is deleted from the text, auxiliary information is inserted into the text, and parentheses "(", ")" are inserted before and after the supplementary information. By inserting parentheses, the auxiliary information can be distinguished from other character strings in the text.
-Option 4: The button 308 corresponds to a notation method in which auxiliary information is inserted immediately after the annotation target in the text and parentheses "(", ")" are inserted before and after the auxiliary information. By inserting parentheses, the auxiliary information can be distinguished from other character strings in the text.
Option 5: Button 309 corresponds to a notation method in which the annotation target is deleted from the text, the auxiliary information is inserted into the text, and the auxiliary information is underlined. By adding an underline, the auxiliary information can be distinguished from other character strings in the text.
Option 6: The button 310 corresponds to a notation method in which auxiliary information is inserted immediately after the annotation target in the text and the auxiliary information is underlined. By adding an underline, the auxiliary information can be distinguished from other character strings in the text.
Option 7: Button 311 corresponds to a notation method in which the annotation target is deleted from the text, the auxiliary information is inserted into the text, and spaces are inserted before and after the supplementary information. By inserting a space, the auxiliary information can be distinguished from other character strings in the text.
Option 8: Button 312 corresponds to a notation method that does not convert the HTML document, that is, displays auxiliary information between lines as before.

ただし、上記8つの選択肢は例示であり、選択肢をこれらに限定するものではない。上記8つのうちの一部のみが採用されてもよく、別の選択肢が追加されてもよい。例えば、HTML文書において代替表記情報である<rp>要素を含む<ruby>要素が存在しない場合には<rp>要素に関する選択肢1及び選択肢2は、選択肢から除外してもよい。その場合、ウィンドウ301において、ボタン305及びボタン306は非表示とするか、あるいはグレイアウトして操作不可であることを示してもよい。また、<rp>要素を含む<ruby>要素、含まない<ruby>要素が混在しているHTML文書が取得される場合もある。そのような文書に対して、選択肢1または選択肢2を選択可能とする場合には、<rp>要素を含まない<ruby>要素については他の選択肢のうち予め定めた選択肢に従った変換を行ってもよい。 However, the above eight options are examples, and the options are not limited to these. Only a part of the above eight may be adopted, and another option may be added. For example, in the HTML document, when the <ruby> element including the <rp> element which is the alternative notation information does not exist, the option 1 and the option 2 related to the <rp> element may be excluded from the options. In that case, in the window 301, the buttons 305 and 306 may be hidden or grayed out to indicate that they are inoperable. In addition, an HTML document in which a <ruby> element including a <rp> element and a <ruby> element not included may be acquired may be acquired. When option 1 or option 2 can be selected for such a document, the <ruby> element that does not include the <rp> element is converted according to the predetermined option among the other options. You may.

次に図4〜図6を参照して、選択肢1〜7に応じて変換部114によって変換されたHTML文書とその描画結果の例を説明する。いずれも、図2のHTML文書201に対して変換を施した場合を例示する。 Next, with reference to FIGS. 4 to 6, an example of the HTML document converted by the conversion unit 114 according to the options 1 to 7 and the drawing result thereof will be described. In each case, the case where the HTML document 201 of FIG. 2 is converted is illustrated.

<選択肢1に対応する変換処理>
図4(a)は、図3のダイアログ303にて、ボタン305が操作された場合(選択肢1が選択された場合)に実行されるHTML文書変換結果及び、描画結果を図示している。この場合、変換部114は、HTML文書の記述から注釈対象を削除した上で、補助情報と<rp>要素に指定された代替表記情報を本文に埋め込む。HTML文書401は、選択肢1に応じたHTML文書変換結果である。HTML文書201から<ruby>要素、<rp>要素、<rt>要素、および<ruby>要素直後に現われる注釈対象が削除され、代替表記情報が残るようにHTML文書が変換されている。この変換により注釈対象情報の位置に代替表記情報と補助情報を表示するような描画結果402になる。
<Conversion process corresponding to option 1>
FIG. 4A illustrates the HTML document conversion result and the drawing result executed when the button 305 is operated (when option 1 is selected) in the dialog 303 of FIG. In this case, the conversion unit 114 deletes the annotation target from the description of the HTML document, and then embeds the auxiliary information and the alternative notation information specified in the <rp> element in the text. The HTML document 401 is an HTML document conversion result according to option 1. The annotation target that appears immediately after the <ruby> element, <rp> element, <rt> element, and <ruby> element is deleted from the HTML document 201, and the HTML document is converted so that alternative notation information remains. By this conversion, the drawing result 402 is such that the alternative notation information and the auxiliary information are displayed at the position of the annotation target information.

<選択肢2に対応する変換処理>
図4(b)は、図3のダイアログ303にて、ボタン306が操作された場合(選択肢2が選択された場合)に実行されるHTML文書変換結果及び、描画結果を図示している。この場合、変換部114は、HTML文書の記述において、本文中の注釈対象の後ろに<rp>要素に指定された代替表記情報を埋め込む。HTML文書403は、選択肢2が選択された場合のHTML文書変換結果である。HTML文書201から<ruby>要素、<rp>要素、<rt>要素が削除され、代替表記情報は残すようにHTML文書が変換されている。この変換により注釈対象に続いて代替表記情報と補助情報を表示するような描画結果404になる。
<Conversion process corresponding to option 2>
FIG. 4B illustrates the HTML document conversion result and the drawing result executed when the button 306 is operated (when option 2 is selected) in the dialog 303 of FIG. In this case, the conversion unit 114 embeds the alternative notation information specified in the <rp> element after the annotation target in the text in the description of the HTML document. The HTML document 403 is the HTML document conversion result when the option 2 is selected. The <ruby> element, <rp> element, and <rt> element are deleted from the HTML document 201, and the HTML document is converted so that the alternative notation information remains. This conversion results in a drawing result 404 that displays alternative notation information and auxiliary information following the annotation target.

<選択肢3に対応する変換処理>
図5(a)は、図3のダイアログ303にて、ボタン307が操作された場合(選択肢3が選択された場合)に実行されるHTML文書変換結果及び、描画結果を図示している。この場合、変換部114は、HTML文書の記述から注釈対象を削除した上で、補助情報と、括弧「(」、「)」を本文に埋め込む。HTML文書501は、選択肢3が選択された場合のHTML文書の変換結果である。HTML文書201から、<ruby>要素、<rp>要素、<rt>要素、および<rp>要素によって指定された代替表記情報、<ruby>要素直後に現われる注釈対象が削除されている。更に、補助情報の前後に、括弧を挿入されている。この変換により、描画結果602のように注釈対象の位置に括弧で囲まれた補助情報が表示される。
<Conversion process corresponding to option 3>
FIG. 5A illustrates the HTML document conversion result and the drawing result executed when the button 307 is operated (when option 3 is selected) in the dialog 303 of FIG. In this case, the conversion unit 114 deletes the annotation target from the description of the HTML document, and then embeds the auxiliary information and the parentheses "(", ")" in the text. The HTML document 501 is the conversion result of the HTML document when option 3 is selected. From the HTML document 201, the <ruby> element, the <rp> element, the <rt> element, the alternative notation information specified by the <rp> element, and the annotation target appearing immediately after the <ruby> element have been deleted. In addition, parentheses are inserted before and after the auxiliary information. By this conversion, auxiliary information enclosed in parentheses is displayed at the position to be annotated as in the drawing result 602.

<選択肢4に対応する変換処理>
図5(b)は、図3のダイアログ303にて、ボタン308が操作された場合(選択肢3が選択された場合)に実行されるHTML文書変換結果及び、描画結果を図示している。この場合、変換部114は、HTML文書の記述において、本文中の注釈対象の後ろに補助情報と、括弧「(」、「)」を本文に埋め込む。HTML文書503は、選択肢4が選択された場合のHTML文書の変換結果である。HTML文書201から<ruby>要素、<rp>要素、<rt>要素、および<rp>要素によって指定された代替表記情報が削除されている。更に、補助情報の前後に括弧が挿入される。この変換により、描画結果604のように注釈対象に続いて括弧で囲まれた補助情報が表示される。
<Conversion process corresponding to option 4>
FIG. 5B illustrates the HTML document conversion result and the drawing result executed when the button 308 is operated (when option 3 is selected) in the dialog 303 of FIG. In this case, the conversion unit 114 embeds auxiliary information and parentheses "(", ")" in the text after the annotation target in the text in the description of the HTML document. The HTML document 503 is the conversion result of the HTML document when the option 4 is selected. The alternative notation information specified by the <ruby> element, the <rp> element, the <rt> element, and the <rp> element has been deleted from the HTML document 201. In addition, parentheses are inserted before and after the auxiliary information. By this conversion, auxiliary information enclosed in parentheses is displayed following the annotation target as in the drawing result 604.

<選択肢5に対応する変換処理>
図6(a)は、図3のダイアログ303にて、ボタン309が操作された場合(選択肢5が選択された場合)に実行されるHTML文書変換結果及び、描画結果を図示している。この場合、変換部114は、HTML文書の記述から注釈対象を削除した上で、本文に補助情報を埋め込み、さらに補助情報に下線の装飾を加える。HTML文書601は、選択肢5が選択された場合のHTML文書の変換結果である。HTML文書201から<ruby>要素、<rp>要素、<rt>要素、および<rp>要素によって指定された代替表記情報、<ruby>要素直後に現われる注釈対象が削除されている。更に、補助情報を囲むように下線表記を指定する<u>要素が挿入されている。この変換により、描画結果602のように、注釈対象に置き換わって、下線が付加された補助情報が表示される。
<Conversion process corresponding to option 5>
FIG. 6A illustrates the HTML document conversion result and the drawing result executed when the button 309 is operated (when option 5 is selected) in the dialog 303 of FIG. In this case, the conversion unit 114 deletes the annotation target from the description of the HTML document, embeds the auxiliary information in the text, and further adds an underlined decoration to the auxiliary information. The HTML document 601 is the conversion result of the HTML document when the option 5 is selected. The alternative notation information specified by the <ruby> element, the <rp> element, the <rt> element, and the <rp> element, and the annotation target appearing immediately after the <ruby> element have been deleted from the HTML document 201. Furthermore, a <u> element that specifies the underlined notation is inserted so as to surround the auxiliary information. By this conversion, the underlined auxiliary information is displayed in place of the annotation target, as in the drawing result 602.

<選択肢6に対応する変換処理>
図6(b)は、図3のダイアログ303にて、ボタン310が操作された場合(選択肢6が選択された場合)に実行されるHTML文書変換結果及び、描画結果を図示している。この場合、変換部114は、HTML文書の記述において、本文中の注釈対象の後ろに補助情報を埋め込み、さらに補助情報に下線の装飾を加える。HTML文書603は、選択肢6が選択された場合のHTML文書の変換結果である。HTML文書201から<ruby>要素、<rp>要素、<rt>要素、および<rp>要素によって指定された代替表記情報が削除されている。更に、補助情報を囲むように下線表記を指定する<u>要素を挿入が挿入されている。この変換により、描画結果604のように注釈対象に続いて、下線が付加された補助情報が表示される。なお、選択肢5・6では、下線で文字を装飾する例を挙げたが、下線に限らず太字、斜体への変更、文字色の変更など、他の装飾で表記するようHTML文書を変換する選択肢を設けてもよい。
<Conversion process corresponding to option 6>
FIG. 6B illustrates the HTML document conversion result and the drawing result executed when the button 310 is operated (when option 6 is selected) in the dialog 303 of FIG. In this case, the conversion unit 114 embeds auxiliary information after the annotation target in the text in the description of the HTML document, and further adds an underlined decoration to the auxiliary information. The HTML document 603 is the conversion result of the HTML document when the option 6 is selected. The alternative notation information specified by the <ruby> element, the <rp> element, the <rt> element, and the <rp> element has been deleted from the HTML document 201. Furthermore, an insert <u> element that specifies the underlined notation is inserted so as to surround the auxiliary information. By this conversion, the underlined auxiliary information is displayed following the annotation target as in the drawing result 604. In Options 5 and 6, the example of decorating the characters with underline is given, but the option to convert the HTML document so that it is written with other decorations such as bold, italic change, change of character color, etc. is not limited to underline. May be provided.

<選択肢7に対応する変換処理>
図6(c)は、図3のダイアログ303にて、ボタン311が操作された場合(選択肢7が選択された場合)に実行されるHTML文書変換結果及び、描画結果を図示している。この場合、変換部114は、HTML文書の記述から注釈対象を削除した上で、補助情報と、スペースを本文に埋め込む。HTML文書605は、選択肢7が選択された場合のHTML文書の変換結果である。HTML文書201から<ruby>要素、<rp>要素、<rt>要素、および<rp>要素によって指定された代替表記情報、<ruby>要素直後に現われる注釈対象が削除されている。更に、補助情報の前後にスペースが挿入される。
<Conversion process corresponding to option 7>
FIG. 6C illustrates the HTML document conversion result and the drawing result executed when the button 311 is operated (when option 7 is selected) in the dialog 303 of FIG. In this case, the conversion unit 114 deletes the annotation target from the description of the HTML document, and then embeds the auxiliary information and the space in the text. The HTML document 605 is the conversion result of the HTML document when the option 7 is selected. The alternative notation information specified by the <ruby> element, the <rp> element, the <rt> element, and the <rp> element, and the annotation target appearing immediately after the <ruby> element have been deleted from the HTML document 201. In addition, spaces are inserted before and after the auxiliary information.

ただし、<ruby>要素が行頭にある場合は補助情報の後ろ、文末にある場合は補助情報の前にのみ挿入する。また、<ruby>要素が連続する場合は重複してスペースを挿入しないことで不要なスペースが入らないようにする。例えば、<br>の改行により「衣」は文頭に位置すると判定できるため補助情報の後ろのみにスペースを挿入する。後にテキストが存在しない「香具山」に対しては文末だと判定し、補助情報の前にのみスペースを挿入する。この変換により、描画結果606のように注釈対象の位置にスペースで囲まれた補助情報が表示される。 However, if the <ruby> element is at the beginning of the line, it is inserted only after the auxiliary information, and if it is at the end of the sentence, it is inserted only before the auxiliary information. In addition, when <ruby> elements are continuous, unnecessary spaces are prevented from being inserted by not inserting duplicate spaces. For example, since it can be determined that "clothing" is located at the beginning of a sentence by a line break of <br>, a space is inserted only after the auxiliary information. If there is no text after "Mt. Amanoka", it is judged to be the end of the sentence, and a space is inserted only before the auxiliary information. By this conversion, auxiliary information surrounded by a space is displayed at the position to be annotated as in the drawing result 606.

なお選択肢8が選択された場合は、図2で説明したHTML文書、及び描画結果が維持される。 When option 8 is selected, the HTML document described in FIG. 2 and the drawing result are maintained.

次に図7に示すフローチャートを使用して、本実施形態において情報処理装置100が実行する処理のメインの流れを説明する。以下、フローチャートの各工程(ステップ)は、それら符号の先頭にはSを付与して説明することとする。本実施形態では、ブラウザにおいて、表示対象のWebコンテンツ(HTML文書)のロケーションが指定されると、図7のフローチャートの処理が開始される。 Next, using the flowchart shown in FIG. 7, the main flow of the processing executed by the information processing apparatus 100 in the present embodiment will be described. Hereinafter, each process (step) of the flowchart will be described by adding S at the beginning of the reference numerals. In the present embodiment, when the location of the Web content (HTML document) to be displayed is specified in the browser, the processing of the flowchart of FIG. 7 is started.

S701では、取得部111が、HTML文書を取得する。本実施形態では、図3のロケーション欄302にて、URLで文書のロケーションを指定されている場合は、URLで指定された先にアクセスしてHTML文書を取得する。httpスキームで指定されていれば通信装置108を介して指定されたURLにアクセスし、fileスキームで指定されていれば指定されたファイルにアクセスして取得する。S702では、判定部112が、HTML文書が、注釈情報を含むか判定する。本実施形態の場合、HTML文書の記述が注釈要素である<ruby>要素を含んでいるかを判定する。例えば、HTMLを構文解析するHTMLパーサを用いて<ruby>要素を含んでいるか判定する。注釈情報を含んでいると判定した場合(S702−YES)にはS703に進む。注釈情報を含んでいないと判定した場合(S702−NO)には、S706に進む。 In S701, the acquisition unit 111 acquires the HTML document. In the present embodiment, when the location of the document is specified by the URL in the location field 302 of FIG. 3, the destination specified by the URL is accessed to acquire the HTML document. If it is specified in the http scheme, the URL specified is accessed via the communication device 108, and if it is specified in the file scheme, the specified file is accessed and acquired. In S702, the determination unit 112 determines whether the HTML document contains annotation information. In the case of the present embodiment, it is determined whether the description of the HTML document includes a <ruby> element which is an annotation element. For example, an HTML parser that parses HTML is used to determine if it contains a <ruby> element. If it is determined that the annotation information is included (S702-YES), the process proceeds to S703. If it is determined that the annotation information is not included (S702-NO), the process proceeds to S706.

S703では、表示制御部115により、ユーザに注釈情報の表記方法を選択させるために、複数の選択肢を含むGUI画面が描画され、表示装置103に表示される。本実施形態の場合、図3のダイアログ303がポップアップ表示される。S704では、選択部113が、ユーザに入力された表記方法の選択結果を取得する。本実施形態では、図3のダイアログ303で、どのボタンが押下されたか判定して選択された選択肢を特定する。特定した選択肢の情報はRAM107に保持する。S705では、変換部114が、S704で特定した選択肢に応じた表記方法でHTML文書を変換する。S705で実行されるHTML文書の変換工程の詳細は後述する。S706では、表示制御部115により、HTML文書が描画され、表示装置103に表示される。S702からS706に進んだ場合に表示されるHTML文書は、S701で取得された文書である。S705からS706に進んだ場合には、S704で選択された選択肢に対応する文書である。 In S703, the display control unit 115 draws a GUI screen including a plurality of options and displays it on the display device 103 in order to allow the user to select the notation method of the annotation information. In the case of this embodiment, the dialog 303 of FIG. 3 is popped up. In S704, the selection unit 113 acquires the selection result of the notation method input to the user. In the present embodiment, in the dialog 303 of FIG. 3, it is determined which button is pressed and the selected option is specified. The information of the specified option is held in the RAM 107. In S705, the conversion unit 114 converts the HTML document by the notation method according to the options specified in S704. Details of the HTML document conversion process executed in S705 will be described later. In S706, the HTML document is drawn by the display control unit 115 and displayed on the display device 103. The HTML document displayed when proceeding from S702 to S706 is the document acquired in S701. When proceeding from S705 to S706, it is a document corresponding to the option selected in S704.

なお、上述した図9のフローチャートでは、注釈情報を含むHTML文書を取得するたびに、複数の選択肢を含むGUIをユーザに提示し、その都度選択を求めたが、本実施形態はこの形式に限定されない。例えば、ブラウザの設定項目の1つとして、例えば初期利用時に、複数の選択肢を含むGUIをユーザに提示し、ユーザによる選択結果を保持しておいてもよい。また、初期設定として選択肢1〜8のいずれかが予め特定され、その情報が保持されていてもよい。これらのような場合、注釈情報を含むHTML文書を取得した場合には、GUIの提示(S703)は省略し、保持されている選択結果を取得することにより表記方法を特定し(S704)、変換を行えばよい(S705)。 In the flowchart of FIG. 9 described above, each time an HTML document including annotation information is acquired, a GUI including a plurality of options is presented to the user and a selection is requested each time, but the present embodiment is limited to this format. Not done. For example, as one of the setting items of the browser, for example, at the time of initial use, a GUI including a plurality of options may be presented to the user and the selection result by the user may be retained. Further, any of options 1 to 8 may be specified in advance as an initial setting, and the information may be retained. In such a case, when the HTML document including the annotation information is acquired, the presentation of GUI (S703) is omitted, the notation method is specified by acquiring the retained selection result (S704), and the conversion is performed. (S705).

図8は、S705において、変換部114が実施するHTML文書の変換工程の流れを示すフローチャートである。S801において、変換部114は、HTML文書の構文解析処理を行う。例えば、HTML文書を入力として構文解析ツールでDOMツリーを生成する。S802では、変換部114は、HTML文書の全ての<ruby>要素を抽出する。例えば、S801で生成したDOMツリー内の全ての<ruby>要素ノードを取得する。HTML文書201の場合には、注釈対象「来」、「白妙」、「衣」、「天」、「香具山」に係る<ruby>要素が抽出される。 FIG. 8 is a flowchart showing the flow of the HTML document conversion process performed by the conversion unit 114 in S705. In S801, the conversion unit 114 performs parsing processing of the HTML document. For example, a DOM tree is generated by a parsing tool using an HTML document as input. In S802, the conversion unit 114 extracts all <ruby> elements of the HTML document. For example, all the <ruby> element nodes in the DOM tree generated in S801 are acquired. In the case of HTML document 201, the <ruby> elements related to the annotation targets "coming", "white mystery", "clothing", "heaven", and "Mt. Amanoka" are extracted.

S803では、変換部114は、HTML文書内に未処理の<ruby>要素があるかを判定する。未処理の<ruby>要素であると判定されない場合(S803−NO)には、変換処理を終了する。未処理の<ruby>要素があると判定される場合(S803−YES)には、S804に進む。S804において、変換部114は、未処理の<ruby>要素のうち1つを処理対象に決定する。例えば、HTML文書において最も早く出現する<ruby>要素を選ぶ。HTML文書201の場合は、注釈対象「来」から順次処理対象となる。 In S803, the conversion unit 114 determines whether there is an unprocessed <ruby> element in the HTML document. If it is not determined to be an unprocessed <ruby> element (S803-NO), the conversion process is terminated. If it is determined that there is an unprocessed <ruby> element (S803-YES), the process proceeds to S804. In S804, the conversion unit 114 determines one of the unprocessed <ruby> elements as the processing target. For example, select the <ruby> element that appears earliest in an HTML document. In the case of HTML document 201, the processing target is sequentially from the annotation target "coming".

S805において、変換部114は、処理対象の<ruby>要素に従属する情報ユニットを1つ抽出する。ここで情報ユニットとは、<ruby>要素に属する1以上の文字セット、あるいは要素に囲まれた要素であって、具体的には、処理対象の<ruby>要素ノードに属する子ノードのそれぞれである。 In S805, the conversion unit 114 extracts one information unit that depends on the <ruby> element to be processed. Here, the information unit is one or more character sets belonging to the <ruby> element, or an element surrounded by the elements, and specifically, each of the child nodes belonging to the <ruby> element node to be processed. is there.

S806では、変換部114は、抽出した情報ユニットが、注釈対象かを判定する。注釈対象であると判定される場合(S806−YES)にはS807に進む。注釈対象であると判定されない場合(S806−NO)にはS808に進む。本実施形態では、抽出した<ruby>要素ノードの子ノードがテキストノードであれば、注釈対象であると判定する。S807では、変換部114により、S704で選択された表記方法(選択肢)に応じて、注釈対象に対する処理が実行される。各選択に応じた処理の詳細は後述する。 In S806, the conversion unit 114 determines whether the extracted information unit is an annotation target. If it is determined that the annotation is to be made (S806-YES), the process proceeds to S807. If it is not determined to be an annotation target (S806-NO), the process proceeds to S808. In the present embodiment, if the child node of the extracted <ruby> element node is a text node, it is determined that it is an annotation target. In S807, the conversion unit 114 executes processing for the annotation target according to the notation method (option) selected in S704. Details of the processing according to each selection will be described later.

S808では、変換部114が、抽出した情報ユニットが<rp>要素かを判定する。<rp>要素であると判定される場合(S808−YES)にはS809に進む。<rp>要素であると判定されない場合(S808−NO)はS810に進む。S809では、変換部114により、S704で選択された表記方法(選択肢)に応じて、<rp>要素に対する処理が実行される。各選択に応じた処理の詳細は後述する。 In S808, the conversion unit 114 determines whether the extracted information unit is a <rp> element. If it is determined to be a <rp> element (S808-YES), the process proceeds to S809. If it is not determined to be a <rp> element (S808-NO), the process proceeds to S810. In S809, the conversion unit 114 executes processing for the <rp> element according to the notation method (option) selected in S704. Details of the processing according to each selection will be described later.

S810では、変換部114が、抽出した情報ユニットが<rt>要素かを判定する。<rt>要素であると判定される場合(S810−YES)には、S811に進む。<rt>要素であると判定されない場合(S810−NO)にはS812に進む。S811では、変換部114により、S704で選択された表記方法(選択肢)に応じて、<rt>要素に対する処理が実行される。各選択に応じた処理の詳細は後述する。 In S810, the conversion unit 114 determines whether the extracted information unit is a <rt> element. If it is determined that the element is <rt> (S810-YES), the process proceeds to S811. If it is not determined to be a <rt> element (S810-NO), the process proceeds to S812. In S811, the conversion unit 114 executes processing for the <rt> element according to the notation method (option) selected in S704. Details of the processing according to each selection will be described later.

S812では、処理対象の<ruby>要素下に未処理の情報ユニットがあるかを判定する。未処理の情報ユニットがあると判定される場合(S812−YES)には、S805に進む。本実施形態では、対象の<ruby>要素ノード以下に未処理の子ノードがあればS805に進む。未処理の情報ユニットがあると判定されない場合(S812−NO)には、S813に進む。S813では、変換部114が、処理対象の<ruby>要素を削除し、S803に進む。本実施形態では、DOMツリーへの操作として、対象の<ruby>要素ノードを削除する。この処理に至るステップで<ruby>要素ノードの子ノードは削除、もしくは親ノードへの付け替えを行った状態になっている。親ノードに付け替えることにより、付け替えを行った情報については上位の文書情報、つまり親ノードと同様の文書表現を反映した状態で注釈対象、代替表記情報、補助情報を表示することができる。結果として、補助情報を文中に埋め込んだような表記になる。ここで文書表現とは、文字を表示する際に適用される設定情報であって、フォントサイズ、文字色、フォント、その他装飾を含む。 In S812, it is determined whether or not there is an unprocessed information unit under the <ruby> element to be processed. If it is determined that there is an unprocessed information unit (S812-YES), the process proceeds to S805. In the present embodiment, if there is an unprocessed child node under the target <ruby> element node, the process proceeds to S805. If it is not determined that there is an unprocessed information unit (S812-NO), the process proceeds to S813. In S813, the conversion unit 114 deletes the <ruby> element to be processed, and proceeds to S803. In this embodiment, the target <ruby> element node is deleted as an operation on the DOM tree. In the step leading to this process, the child node of the <ruby> element node is in a state of being deleted or replaced with the parent node. By replacing the information with the parent node, it is possible to display the annotation target, alternative notation information, and auxiliary information in a state that reflects the higher-level document information, that is, the same document expression as the parent node. As a result, the notation is such that auxiliary information is embedded in the sentence. Here, the document representation is setting information applied when displaying characters, and includes font size, character color, font, and other decorations.

以上説明した処理により、注釈情報を含むHTML文書が、ユーザ入力により選択された表記方法に変換される。なお、変換後のDOMツリーをシリアライズしたテキストを書き出すことでファイルにすることもできる。次に、各選択肢が選択された場合に、図8のフローチャートのうちS807、S809,S811で実行される具体的な処理を説明する。ただし、重複する具体的な処理方法の例示は適宜省略する。 By the process described above, the HTML document including the annotation information is converted into the notation method selected by the user input. It is also possible to create a file by writing out the serialized text of the converted DOM tree. Next, when each option is selected, specific processing executed in S807, S809, and S811 in the flowchart of FIG. 8 will be described. However, examples of duplicate specific processing methods will be omitted as appropriate.

<選択肢1が選択された場合>
S807では、変換部114が、注釈対象をHHTML文書から削除する。本実施形態では、DOMツリーへの操作として、注釈対象であるテキストノードを削除する。S809では、変換部114は、<rp>要素内の代替表記情報を残し、HTML文書の記述から<rp>要素を削除する。本実施形態では、DOMツリーへの操作として、<rp>要素ノードの子ノードである代替表記情報を示すテキストノードを<ruby>要素ノードの親ノードに付け替える。その際、<ruby>要素ノードに続く位置にテキストノードを配置する。配置したのち、<rp>要素ノードを削除する。
<When option 1 is selected>
In S807, the conversion unit 114 deletes the annotation target from the HHTML document. In this embodiment, as an operation on the DOM tree, the text node to be annotated is deleted. In S809, the conversion unit 114 leaves the alternative notation information in the <rp> element and deletes the <rp> element from the description in the HTML document. In the present embodiment, as an operation on the DOM tree, a text node indicating alternative notation information which is a child node of the <rp> element node is replaced with a parent node of the <ruby> element node. At that time, a text node is placed at a position following the <ruby> element node. After arranging, delete the <rp> element node.

S811では、変換部114は、<rt>要素内の補助情報を残したままにし、<rt>要素を削除する。本実施形態では、DOMツリーへの操作として、<rt>要素ノードの子ノードである補助情報を示すテキストノードを<ruby>要素ノードの親要素に付け替える。その際、S809において代替表記情報のテキストノードが付け替えられている位置に基づく位置にノードを配置する。配置したのち、<rt>要素ノードを削除する。 In S811, the conversion unit 114 leaves the auxiliary information in the <rt> element and deletes the <rt> element. In the present embodiment, as an operation on the DOM tree, a text node indicating auxiliary information that is a child node of the <rt> element node is replaced with a parent element of the <ruby> element node. At that time, the node is arranged at the position based on the position where the text node of the alternative notation information is replaced in S809. After arranging, delete the <rt> element node.

例えば、処理対象が、HTML文書201の「天」を注釈している<ruby>要素である場合、S807では、注釈対象である「天」を示すテキストノードが削除される。S809では、代替表記情報である「[」、「]」を示すテキストノード<ruby>要素ノードの親ノードに付け替える。S811では、補助情報である「あま」を示すテキストノードを<ruby>要素ノードの親ノードに付け替える。付け替える位置は代替表記情報である「[」と「]」を示すテキストノードの間になる。 For example, when the processing target is a <ruby> element annotating the "heaven" of the HTML document 201, the text node indicating the "heaven" to be annotated is deleted in S807. In S809, it is replaced with the parent node of the text node <ruby> element node indicating "[", "]" which is the alternative notation information. In S811, the text node indicating "Ama", which is auxiliary information, is replaced with the parent node of the <ruby> element node. The position to be replaced is between the text nodes indicating the alternative notation information "[" and "]".

<選択肢2が選択された場合>
S807では、変換部114が、注釈対象を残す。本実施形態では、DOMツリーへの操作として、注釈対象であるテキストノードを<ruby>要素ノードの親ノードに付け替える。その際、<ruby>要素ノードに続く位置にテキストノードを配置する。
<When option 2 is selected>
In S807, the conversion unit 114 leaves an annotation target. In the present embodiment, as an operation on the DOM tree, the text node to be annotated is replaced with the parent node of the <ruby> element node. At that time, a text node is placed at a position following the <ruby> element node.

S809及びS811における処理は、選択肢1の場合と同様である。すなわち、代替表記情報を示すテキストノードと、補助情報を示すテキストノードが親ノードに付け替えられる。 The processing in S809 and S811 is the same as in the case of option 1. That is, the text node indicating the alternative notation information and the text node indicating the auxiliary information are replaced with the parent node.

例えば、処理対象が、HTML文書201の「天」を注釈している<ruby>要素である場合、S807では、注釈対象である「天」を示すテキストノードを親ノードに付け替える。S809では、代替表記情報である「[」、「]」を示すテキストノード<ruby>要素ノードの親ノードのうち「天」の後ろに付け替える。S811では、補助情報である「あま」を示すテキストノードを<ruby>要素ノードの親ノードに付け替える。付け替える位置は代替表記情報である「[」と「]」を示すテキストノードの間になる。 For example, when the processing target is a <ruby> element annotating the "heaven" of the HTML document 201, in S807, the text node indicating the "heaven" to be annotated is replaced with the parent node. In S809, it is replaced after "heaven" among the parent nodes of the text node <ruby> element node indicating "[", "]" which is the alternative notation information. In S811, the text node indicating "Ama", which is auxiliary information, is replaced with the parent node of the <ruby> element node. The position to be replaced is between the text nodes indicating the alternative notation information "[" and "]".

<選択肢3が選択された場合>
S704で選択肢3が選択された場合、S807における処理は、選択肢1の場合と同様である。すなわち、注釈対象であるテキストノードが削除される。S809では、変換部114が、<rp>要素ノードをHTML文書の記述から削除する。本実施形態では、DOMツリーへの操作として、代替表記情報を示すテキストノードを従属させたまま<rp>要素ノードの全体を削除する。
<When option 3 is selected>
When option 3 is selected in S704, the processing in S807 is the same as in the case of option 1. That is, the text node to be annotated is deleted. In S809, the conversion unit 114 deletes the <rp> element node from the description in the HTML document. In the present embodiment, as an operation on the DOM tree, the entire <rp> element node is deleted while the text node indicating the alternative notation information is subordinated.

S811では、変換部114が、補助情報の前後に括弧を挿入し、<rt>要素を削除する。本実施形態では、DOMツリーへの操作として、<rt>要素ノードの子ノードである補助情報を示すテキストノードを<ruby>要素ノードの親要素に付け替える。その際、補助情報を示すテキストノードの前後にそれぞれ「(」、「)」を示すテキストノードを追加する。さらに、<rt>要素ノードを削除する。 In S811, the conversion unit 114 inserts parentheses before and after the auxiliary information and deletes the <rt> element. In the present embodiment, as an operation on the DOM tree, a text node indicating auxiliary information that is a child node of the <rt> element node is replaced with a parent element of the <ruby> element node. At that time, text nodes indicating "(" and ")" are added before and after the text node indicating auxiliary information, respectively. Furthermore, the <rt> element node is deleted.

例えば、処理対象が、HTML文書201の「天」を注釈している<ruby>要素である場合、S807では、注釈対象である「天」を示すテキストノードが削除され、S809では、<rp>要素ノードが削除される。S811では、補助情報である「あま」を示すテキストノードと、「(」、「)」を示すテキストノードが、<ruby>要素ノードの親ノードに「(あま)」の順に付け替えられる。 For example, when the processing target is a <ruby> element that annotates the "heaven" of the HTML document 201, the text node indicating the "heaven" to be annotated is deleted in S807, and the <rp> is deleted in S809. The element node is deleted. In S811, the text node indicating "Ama", which is auxiliary information, and the text node indicating "(", ")" are replaced with the parent node of the <ruby> element node in the order of "(Ama)".

<選択肢4が選択された場合>
S704で選択肢4が選択された場合、S807における処理は、選択肢2の場合と同様である。すなわち、注釈対象であるテキストノードが親ノードに付け替えられる。また、S809及びS811における処理は、選択肢3の場合と同様である。すなわち、<rp>要素ノードが削除され、補助情報を示すテキストノードと「(」、「)」を示すテキストノードが<ruby>要素ノードの親要素に付け替えられる。
<When option 4 is selected>
When option 4 is selected in S704, the processing in S807 is the same as in the case of option 2. That is, the text node to be annotated is replaced with the parent node. Further, the processing in S809 and S811 is the same as in the case of option 3. That is, the <rp> element node is deleted, and the text node indicating the auxiliary information and the text node indicating "(", ")" are replaced with the parent elements of the <ruby> element node.

例えば、処理対象が、HTML文書201の「天」を注釈している<ruby>要素である場合、S807では、注釈対象である「天」を示すテキストノードを親ノードに付け替える。S809では、<rp>要素ノードが削除される。S811では、補助情報である「あま」を示すテキストノードと、「(」、「)」を示すテキストノードが、<ruby>要素ノードの親ノードのうち「天」の後ろに「(あま)」の順に付け替えられる。 For example, when the processing target is a <ruby> element annotating the "heaven" of the HTML document 201, in S807, the text node indicating the "heaven" to be annotated is replaced with the parent node. In S809, the <rp> element node is deleted. In S811, the text node indicating "Ama", which is auxiliary information, and the text node indicating "(", ")" are "(Ama)" after "Heaven" among the parent nodes of the <ruby> element node. It is replaced in the order of.

<選択肢5が選択された場合>
S704で選択肢5が選択された場合、S807及びS809における処理は、選択肢3の場合と同様である。すなわち、注釈対象であるテキストノードと、<rp>要素ノードが削除される。S811において、変換部114は、補助情報を下線で装飾し、<rt>要素は削除する。本実施形態では、DOMツリーへの操作として、文字列に対する下線の装飾を示す<u>要素ノードを生成し、補助情報を示すテキストノードを子ノードにする。その上で<u>要素ノードを、<ruby>要素ノードの親要素に対する子ノードとして付け替え、<rt>要素ノードを削除する。
<When option 5 is selected>
When option 5 is selected in S704, the processing in S807 and S809 is the same as in the case of option 3. That is, the text node to be annotated and the <rp> element node are deleted. In S811, the conversion unit 114 underlines the auxiliary information and deletes the <rt> element. In the present embodiment, as an operation on the DOM tree, a <u> element node indicating the underline decoration for the character string is generated, and a text node indicating auxiliary information is used as a child node. Then, the <u> element node is replaced as a child node with respect to the parent element of the <ruby> element node, and the <rt> element node is deleted.

例えば、処理対象が、HTML文書201の「天」を注釈している<ruby>要素である場合、S807では、注釈対象である「天」を示すテキストノードが削除され、S809では、<rp>要素ノードが削除される。S811では、補助情報である「あま」を子ノードとする<u>要素ノードが生成され、<ruby>要素ノードの親ノードに付け替えられる。 For example, when the processing target is a <ruby> element that annotates the "heaven" of the HTML document 201, the text node indicating the "heaven" to be annotated is deleted in S807, and the <rp> is deleted in S809. The element node is deleted. In S811, a <u> element node having "Ama", which is auxiliary information, as a child node is generated, and is replaced with a parent node of the <ruby> element node.

<選択肢6が選択された場合>
S704で選択肢6が選択された場合、S807における処理は、選択肢4の場合と同様である。すなわち、注釈対象であるテキストノードが親ノードに付け替えられる。また、S809及びS811における処理は、選択肢5の場合と同様である。すなわち、<rp>要素ノードが削除され、補助情報を示すテキストノードと、補助情報のテキストノードを子ノードとする<u>要素ノードが、<ruby>要素ノードの親要素に付け替えられる。
<When option 6 is selected>
When option 6 is selected in S704, the processing in S807 is the same as in the case of option 4. That is, the text node to be annotated is replaced with the parent node. Further, the processing in S809 and S811 is the same as in the case of option 5. That is, the <rp> element node is deleted, and the text node indicating the auxiliary information and the <u> element node having the text node of the auxiliary information as a child node are replaced with the parent element of the <ruby> element node.

例えば、処理対象が、HTML文書201の「天」を注釈している<ruby>要素である場合、S807では、注釈対象である「天」を示すテキストノードを親ノードに付け替える。S809では、<rp>要素ノードが削除される。S811では、補助情報である「あま」を子ノードとする<u>要素ノードが生成され、<ruby>要素ノードの親ノードのうち「天」の後ろに付け替えられる。 For example, when the processing target is a <ruby> element annotating the "heaven" of the HTML document 201, in S807, the text node indicating the "heaven" to be annotated is replaced with the parent node. In S809, the <rp> element node is deleted. In S811, a <u> element node having "Ama", which is auxiliary information, as a child node is generated, and is replaced after "heaven" among the parent nodes of the <ruby> element node.

<選択肢7が選択された場合>
S704で選択肢7が選択された場合、S807及びS809における処理は、選択肢3の場合と同様である。すなわち、注釈対象であるテキストノードと、<rp>要素ノードが削除される。S811では、変換部114が、補助情報の前後にスペースを挿入し、<rt>要素は削除する。本実施形態では、DOMツリーへの操作として、<rt>要素ノードの子ノードである補助情報を示すテキストノードを、<ruby>要素ノードの親要素に付け替える。そして補助情報を示すテキストノードの前後にそれぞれスペースを示すテキストノードを追加する。その際、S809においてノードが付け替えられている位置に続けて、スペース、補助情報、スペースの順にテキストノードを配置する。配置したのち、<rt>要素ノードを削除する。ただし、対象の<ruby>要素が行頭や文末の場合はそれぞれ補助情報の後と前のみにスペースが挿入される。行頭か文末かの判定は、対象の<ruby>要素に続く要素や親要素に基づいて行われる。例えば改行を示す<br>要素が<ruby>要素の前にあれば文頭、後にあれば文末と判定される。
<When option 7 is selected>
When option 7 is selected in S704, the processing in S807 and S809 is the same as in the case of option 3. That is, the text node to be annotated and the <rp> element node are deleted. In S811, the conversion unit 114 inserts a space before and after the auxiliary information and deletes the <rt> element. In the present embodiment, as an operation on the DOM tree, a text node indicating auxiliary information that is a child node of the <rt> element node is replaced with a parent element of the <ruby> element node. Then, add a text node indicating a space before and after the text node indicating auxiliary information. At that time, following the position where the node is replaced in S809, the text node is arranged in the order of space, auxiliary information, and space. After arranging, delete the <rt> element node. However, if the target <ruby> element is at the beginning of a line or at the end of a sentence, spaces are inserted only after and before the auxiliary information, respectively. Whether it is the beginning of a line or the end of a sentence is determined based on the element following the target <ruby> element or the parent element. For example, if the <br> element indicating a line break is before the <ruby> element, it is determined to be the beginning of the sentence, and if it is after it, it is determined to be the end of the sentence.

例えば、処理対象が、HTML文書201の「天」を注釈している<ruby>要素である場合、S807では、注釈対象である「天」を示すテキストノードが削除され、S809では、<rp>要素ノードが削除される。S811では、<ruby>要素ノードの親ノードに補助情報である「あま」を示すテキストノードが付け替えられ、「あま」の前後にスペースを示すテキストノードが付け替えられる。 For example, when the processing target is a <ruby> element that annotates the "heaven" of the HTML document 201, the text node indicating the "heaven" to be annotated is deleted in S807, and the <rp> is deleted in S809. The element node is deleted. In S811, the parent node of the <ruby> element node is replaced with a text node indicating "Ama" which is auxiliary information, and a text node indicating a space is replaced before and after "Ama".

<選択肢8が選択された場合>
S704で選択肢7が選択された場合、S807、S809、S811のいずれにおいても変換は行われず、次のステップに進む。結果的にS706では、描画結果202が表示される。
<When option 8 is selected>
When option 7 is selected in S704, no conversion is performed in any of S807, S809, and S811, and the process proceeds to the next step. As a result, in S706, the drawing result 202 is displayed.

以上、図9、図8のフローチャートの流れで、本実施形態で実行される処理を説明した。この処理により、補助情報が行間ではなく本文に埋め込まれる。補助情報を表す文字は、行間に表示される場合よりも大きいフォントサイズで表示されるため、補助情報自体の可読性を向上することができる。また、本実施形態によれば、本文に埋め込まれた補助情報の表記方法を、ユーザが選択可能となる。従って、個々のユーザが読みやすいと感じる表記方法を利用することができる。また、本文から注釈対象である文字を除くかを選択可能であるため、表示領域の大きさが十分でない場合には、注釈対象を表示させないことで、表示効率を向上させることが可能となる。 The processing executed in the present embodiment has been described above in the flow charts of FIGS. 9 and 8. This process embeds auxiliary information in the body rather than between the lines. Since the characters representing the auxiliary information are displayed in a font size larger than that displayed between the lines, the readability of the auxiliary information itself can be improved. Further, according to the present embodiment, the user can select the notation method of the auxiliary information embedded in the text. Therefore, it is possible to use a notation method that is easy for individual users to read. Further, since it is possible to select whether to exclude the characters to be annotated from the text, if the size of the display area is not sufficient, the display efficiency can be improved by not displaying the annotation target.

なお、変形例として、上述した選択肢1〜8に含まれない表記方法を選択肢に追加しても構わない。例えば、補助情報のフォントサイズを、行間に表示する場合よりは大きく、かつ、本文に属する文字よりは小さく調整した上で、本文に埋め込む表記方法によっても、行間に表示される場合よりも補助情報の可読性を向上させることは可能である。この場合、本文のフォントサイズを補助情報に適用する場合に比べて、文字列の全てを描画するのに必要な描画幅が小さくてすむ。 As a modification, a notation method not included in the above-mentioned options 1 to 8 may be added to the options. For example, after adjusting the font size of the auxiliary information to be larger than when it is displayed between lines and smaller than the characters belonging to the text, the auxiliary information is also larger than when it is displayed between the lines depending on the notation method embedded in the text. It is possible to improve the readability of. In this case, the drawing width required to draw the entire character string can be smaller than when the font size of the text is applied to the auxiliary information.

具体的には、例えば、図8のS811において、変換部114により、注釈対象をレイアウトして描画した場合の描画幅、および、注釈対象に替えて補助情報をレイアウトして描画した場合の描画幅を算出する。補助情報をレイアウトする場合の描画幅が、注釈対象をレイアウトする場合の描画幅を超過するようであれば、補助情報のフォントサイズを小さく調整する。フォントサイズは、補助情報が行間に表示される場合のフォントサイズよりは大きい範囲で、かつ、補助情報をレイアウトする場合の描画幅が、注釈対象をレイアウトする場合の描画幅が近づくように決定される。フォントサイズが決定したら、補助情報を表すテキストノードを子ノードとする<font>要素ノードを作成し、属性ノードでフォントサイズを指定する。その<font>要素のノードを<ruby>要素ノードの親ノードに対する子ノードにする。例えば、注釈対象「香具山」は3文字、その補助情報「かぐやま」は4文字であり、「香具山」を「かぐやま」に置き換えて表記する場合、より大きな描画幅を要することになる。「かぐやま」を「香具山」の描画幅を超えないフォントサイズにすることで描画幅が広くなることを防ぐことができる。文章によっては描画幅が広がると改行が発生することがあるが、本表記方法を選ぶことで描画幅が広くならないため、情報の一覧性を保つことができる。 Specifically, for example, in S811 of FIG. 8, the drawing width when the annotation target is laid out and drawn by the conversion unit 114, and the drawing width when the auxiliary information is laid out and drawn instead of the annotation target. Is calculated. If the drawing width when laying out the auxiliary information exceeds the drawing width when laying out the annotation target, adjust the font size of the auxiliary information to a smaller size. The font size is determined so that the font size is larger than the font size when the auxiliary information is displayed between the lines, and the drawing width when laying out the auxiliary information is close to the drawing width when laying out the annotation target. To. After determining the font size, create a <font> element node whose child node is a text node that represents auxiliary information, and specify the font size in the attribute node. Make the node of the <font> element a child node with respect to the parent node of the <ruby> element node. For example, the annotation target "Amanoka" has 3 characters, and its auxiliary information "Kaguyama" has 4 characters. If "Amanoka" is replaced with "Kaguyama", a larger drawing width will be required. .. By setting "Kaguyama" to a font size that does not exceed the drawing width of "Mt. Amanoka", it is possible to prevent the drawing width from becoming wide. Depending on the text, line breaks may occur when the drawing width is widened, but by selecting this notation method, the drawing width is not widened, so the list of information can be maintained.

また、第1の実施形態の説明では、HTML文書内の全ての<ruby>要素を対象に特定の表記方法への変換を行ったが、注釈対象の内容によって表記変更する<ruby>要素を選択する変形してもよい。例えば、ユーザに表記方法を選択させるダイアログ303では、注釈対象を予め「全て」としたが、ユーザに変換対象となる注釈対象を選択させるようにしてもよい。例えば、所定の基準に基づく複雑な漢字に対してのみ変換を行う、ある学年以上で習う漢字を対象にして変換を行うということもできる。 Further, in the description of the first embodiment, all the <ruby> elements in the HTML document are converted to a specific notation method, but the <ruby> element whose notation is changed according to the content of the annotation target is selected. It may be deformed. For example, in the dialog 303 that allows the user to select the notation method, the annotation target is set to "all" in advance, but the user may be allowed to select the annotation target to be converted. For example, it is possible to convert only complicated kanji based on a predetermined standard, or to convert kanji learned in a certain grade or higher.

図9は、ブラウザのHTML文書の表示を行うブラウザのGUI画面の一例を示す。図3と共通する要素には同じ番号を付す。ウィンドウ901の、図3のウィンドウ301との違いは、ダイアログ303において、変換処理を行う注釈対象をユーザが選択可能となっている点である。注釈対象の選択操作部902では、注釈対象を「全て」、「複雑な文字」、「習得学年別」から選択可能である。「習得学年別」については、プルダウン式の操作部品におり、予め定義された各学年で習得する漢字を注釈対象に指定することができる。 FIG. 9 shows an example of the GUI screen of the browser that displays the HTML document of the browser. Elements common to FIG. 3 are numbered the same. The difference between the window 901 and the window 301 of FIG. 3 is that the user can select the annotation target to be converted in the dialog 303. In the annotation target selection operation unit 902, the annotation target can be selected from "all", "complex characters", and "by grade of acquisition". "By grade of acquisition" is a pull-down type operation part, and the kanji to be acquired in each grade defined in advance can be specified as an annotation target.

「複雑な文字」が選択された場合には、漢字のグリフの複雑度による分類をし、複雑な漢字を含む注釈情報について変換を行う。グリフの複雑度の算出は例えば漢字1文字を矩形の画像として捉え、画像の全画素中、漢字として描画する画素数がある一定の閾値以上の割合である場合に複雑だと判定する。この場合、少ない画素数で文字を表現する「天」は複雑ではなく、多くの画素数を要する「香」を複雑度の高い漢字と分類し、「香」を含む「香具山」について表記変換を行う。 When "complex characters" are selected, the kanji glyphs are classified according to the complexity, and the annotation information including the complicated kanji is converted. The calculation of the complexity of the glyph is determined to be complicated when, for example, one Chinese character is regarded as a rectangular image and the number of pixels to be drawn as the Chinese character is a ratio of a certain threshold or more among all the pixels of the image. In this case, "heaven", which expresses characters with a small number of pixels, is not complicated, and "incense", which requires a large number of pixels, is classified as a highly complex kanji, and "Kouguyama" including "incense" is converted into notation. I do.

「習得学年別」が指定された場合は、予め小学生で習う漢字を学年ごとにまとめた学年別漢字配当表を文字分類表として用いて漢字を分類する。例えば、ユーザが「小学4年生以上」を選択した場合、注釈対象に小学4年生以上で習う漢字が含まれていれば表記変換すると判定する。小学1年生で習得する「天」は表記変換しないが、小学4年生以上で習う「具」を含んだ「香具山」は表記変換する。以上のように注釈対象をユーザによって選択可能とすることにより、ユーザの年齢や志向にあった注釈を表記することが出来る。 If "By grade of acquisition" is specified, the kanji will be classified using the Kanji distribution table for each grade, which summarizes the kanji learned by elementary school students in advance for each grade. For example, when the user selects "4th grade or higher", it is determined that the notation conversion is performed if the annotation target includes the kanji learned in the 4th grade or higher. The notation of "heaven" learned in the first grade of elementary school is not converted, but the notation of "Mt. Amanoka" including the "tool" learned in the fourth grade of elementary school and above is converted. By making the annotation target selectable by the user as described above, it is possible to describe the annotation suitable for the user's age and preference.

また別の変形例として、HTML文書に<ruby>要素が存在する場合であっても、描画結果が要する描画領域の大きさに基づいて、補助情報の表示の変換を行うかを切り替えてもよい。具体的には、HTML文書を変換した場合の描画結果が、変換しない場合の描画結果よりも大きい描画領域を要する場合は、変換結果の出力を行わないとしてもよい。変換部114は、変換前のHTML文書の情報を保持した状態で変換処理を行い、変換前後の描画領域の比較を行い、変換が不要となった場合には変換結果を破棄し、元のHTML文書を維持する。このような変形は、特に、描画結果を表示する表示領域の大きさが小さい小型のデバイス等において有効な場合がある。 As another modification, even when the <ruby> element exists in the HTML document, it may be switched whether to convert the display of the auxiliary information based on the size of the drawing area required for the drawing result. .. Specifically, if the drawing result when the HTML document is converted requires a drawing area larger than the drawing result when the HTML document is not converted, the conversion result may not be output. The conversion unit 114 performs conversion processing while retaining the information of the HTML document before conversion, compares the drawing areas before and after conversion, discards the conversion result when conversion is no longer necessary, and discards the original HTML. Keep the document. Such deformation may be particularly effective in a small device or the like in which the size of the display area for displaying the drawing result is small.

例えば、図10は、あるHTML文書を表記変換しない場合と、表記変換した場合の描画の描画領域の違いを示している。各漢字に読み仮名を表示するように構成されたHTML文書を描画した例である。描画結果1001は、HTML文書を表記変換しない場合の描画結果を示している。描画結果1002は、選択肢4に応じた表記方法で変換した場合の描画結果である。それぞれの表記をレイアウトして描画領域の高さを比較すると、表記変換をした場合、変換しない場合と比べて高さ方向の描画領域を要することになる。小さな画面を持つデバイスでは、表示効率が低下するとともに、Webコンテンツをスクロールする手間を増やしてしまう場合がある。 For example, FIG. 10 shows the difference in the drawing area of drawing when a certain HTML document is not converted into notation and when the notation is converted. This is an example of drawing an HTML document configured to display phonetic spelling in each kanji. The drawing result 1001 shows the drawing result when the HTML document is not converted into notation. The drawing result 1002 is a drawing result when converted by the notation method according to the option 4. When each notation is laid out and the heights of the drawing areas are compared, the drawing area in the height direction is required when the notation conversion is performed as compared with the case where the notation is not converted. On a device having a small screen, the display efficiency may be lowered and the time and effort for scrolling the Web content may be increased.

そこで変形例では、デバイスが備える表示領域の大きさと、図9のフローチャートの変換処理前後のHTML文書の描画領域の高さを比較に基づいて、最終的にHTML文書の変換を行なわないと判定する工程を、図9のフローチャートに追加してもよい。なお、HTML文書の描画領域の高さを算出する処理は、本ブラウザがもともと有する文書レイアウトを行う機能を利用して算出できる。また、この変形例はユーザ設定によってON/OFFしてもよい。ユーザは補助情報の可読性向上を優先したい場合にはOFF、表示効率を優先したい場合にはONを選択する。OFFを選択できることで、S704において表記方法を選択したにもかかわらず、変換が行われないといった状況にユーザが違和感をもつ事態を避けることができる。 Therefore, in the modified example, it is finally determined that the HTML document is not converted based on the comparison between the size of the display area provided in the device and the height of the drawing area of the HTML document before and after the conversion process of the flowchart of FIG. The process may be added to the flowchart of FIG. The process of calculating the height of the drawing area of the HTML document can be calculated by using the document layout function originally possessed by this browser. Further, this modification may be turned ON / OFF by user setting. The user selects OFF when he / she wants to prioritize readability improvement of auxiliary information, and ON when he / she wants to prioritize display efficiency. By being able to select OFF, it is possible to avoid a situation in which the user feels uncomfortable in a situation where conversion is not performed even though the notation method is selected in S704.

また、第1の実施形態で説明した補助情報の変換処理は、ブラウザの1機能であってよい。すなわち、1デバイスの表示領域の大きさに関わらず、設定項目として変換処理の実行可否を設け、切り替えが可能としてもよい。変換処理が実行されない場合、Webコンテンツの設計者の意図に沿った見た目で文書を閲覧することを優先できる。変換処理を実行する場合には、ユーザの年齢、国籍などに配慮し、自由度の高いWebコンテンツの閲覧環境が提供できる。また変換処理が実行されない場合、Webコンテンツの設計者の意図に沿った見た目で文書を閲覧することを優先できる。 Further, the auxiliary information conversion process described in the first embodiment may be one function of the browser. That is, regardless of the size of the display area of one device, whether or not the conversion process can be executed may be provided as a setting item so that switching may be possible. When the conversion process is not executed, it is possible to prioritize viewing the document with an appearance in line with the intention of the Web content designer. When executing the conversion process, it is possible to provide a highly flexible Web content browsing environment in consideration of the age, nationality, etc. of the user. Further, when the conversion process is not executed, it is possible to give priority to viewing the document with an appearance in line with the intention of the designer of the Web content.

<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other Embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

111 取得部
112 判定部
113 選択部
114 変換部
115 表示制御部
111 Acquisition unit 112 Judgment unit 113 Selection unit 114 Conversion unit 115 Display control unit

Claims (18)

構造化文書を取得する取得手段と、
前記構造化文書の記述に所定の注釈情報が含まれるか判定する判定手段と、
前記判定手段で注釈情報があると判定された場合、前記注釈情報に含まれる補助情報を前記構造化文書の本文に埋め込むように構造化文書の記述を変換する変換手段と、
前記変換された構造化文書の記述に従って、前記構造化文書を表示装置に表示させる表示制御手段と、
を有することを特徴とする情報処理装置。
How to get a structured document and
A determination means for determining whether or not the description of the structured document includes predetermined annotation information, and
When the determination means determines that there is annotation information, a conversion means for converting the description of the structured document so that the auxiliary information included in the annotation information is embedded in the body of the structured document.
A display control means for displaying the structured document on the display device according to the description of the converted structured document, and
An information processing device characterized by having.
前記変換手段により変換により、前記補助情報は、前記構造化文書の記述において、前記注釈情報の上位の情報と同じ文書表現が反映される位置に配置されることを特徴とする請求項1に記載の情報処理装置。 The first aspect of claim 1, wherein the auxiliary information is arranged at a position in the description of the structured document in which the same document expression as the information higher than the annotation information is reflected by the conversion by the conversion means. Information processing equipment. 前記文書表現にはフォントサイズを含むことを特徴とする請求項2に記載の情報処理装置。 The information processing apparatus according to claim 2, wherein the document expression includes a font size. 前記判定手段で前記注釈情報があると判定した場合に、ユーザ入力に基づいて、前記補助情報の複数の表記方法から表記方法を選択する選択手段を更に有し、と
前記変換手段は、前記選択手段によって選択された表記方法に応じた変換処理を実行することを特徴とする請求項1乃至3のいずれか1項に記載の情報処理装置。
When the determination means determines that the annotation information is present, the conversion means further includes a selection means for selecting a notation method from a plurality of notation methods of the auxiliary information based on the user input, and the conversion means said the selection. The information processing apparatus according to any one of claims 1 to 3, wherein the conversion process according to the notation method selected by the means is executed.
前記ユーザ入力とは、前記表示制御手段により前記表示装置に表示された前記補助情報の複数の表記方法に対応する複数の選択肢から、1つの選択肢を指定する操作の入力であることを特徴とする請求項4に記載の情報処理装置。 The user input is an input of an operation for designating one option from a plurality of options corresponding to a plurality of notation methods of the auxiliary information displayed on the display device by the display control means. The information processing device according to claim 4. 前記補助情報の複数の表記方法には、前記注釈情報に含まれる代替表記情報を利用して前記補助情報を、前記本文中の他の文字列と識別可能に表記する方法が含まれることを特徴とする請求項4または5に記載の情報処理装置。 The plurality of notation methods of the auxiliary information include a method of notating the auxiliary information so as to be distinguishable from other character strings in the text by using the alternative notation information included in the annotation information. The information processing apparatus according to claim 4 or 5. 前記補助情報の複数の表記方法には、前記補助情報とともに括弧を前記本文中に挿入することにより、前記本文中の他の文字列と識別可能に表記する方法が含まれることを特徴とする請求項4乃至6のいずれか1項に記載の情報処理装置。 A plurality of notation methods of the auxiliary information include a method of notating the auxiliary information so as to be distinguishable from other character strings in the main text by inserting parentheses together with the auxiliary information in the main text. Item 6. The information processing apparatus according to any one of Items 4 to 6. 前記補助情報の複数の表記方法には、前記本文中に挿入された前記補助情報に所定の装飾を付加することにより、前記本文中の他の文字列と識別可能に表記する方法が含まれることを特徴とする請求項4乃至7のいずれか1項に記載の情報処理装置。 The plurality of notation methods of the auxiliary information include a method of notating the auxiliary information inserted in the text so as to be distinguishable from other character strings in the text by adding a predetermined decoration. The information processing apparatus according to any one of claims 4 to 7. 前記補助情報の複数の表記方法には、前記補助情報とともにスペースを前記本文中に挿入することにより、前記本文中の他の文字列と識別可能に表記する方法が含まれることを特徴とする請求項4乃至8のいずれか1項に記載の情報処理装置。 A plurality of notation methods of the auxiliary information include a method of notating the auxiliary information so as to be distinguishable from other character strings in the main text by inserting a space together with the auxiliary information in the main text. Item 2. The information processing apparatus according to any one of Items 4 to 8. 前記補助情報の複数の表記方法には、前記補助情報によって注釈される注釈対象を、前記構造化文書の前記本文から削除した上で前記補助情報を前記本文に埋め込む表記方法と、前記注釈対象を、前記構造化文書の前記本文に残した上で前記補助情報を前記本文に埋め込む表記方法とが含まれることを特徴とする請求項4乃至9のいずれか1項に記載の情報処理装置。 The plurality of notation methods of the auxiliary information include a notation method in which the annotation target to be annotated by the auxiliary information is deleted from the main text of the structured document and then the auxiliary information is embedded in the main text, and the annotation target is included. The information processing apparatus according to any one of claims 4 to 9, further comprising a notation method in which the auxiliary information is embedded in the text after being left in the text of the structured document. 前記補助情報とは、ルビ表記される文字列であって、
前記変換手段は、さらに前記本文に埋め込む前記補助情報のフォントサイズを、行間に表示する場合よりは大きく、かつ、前記本文に属する文字よりは小さく調整することを特徴とする請求項1乃至10のいずれか1項に記載の情報処理装置。
The auxiliary information is a character string written in ruby.
The conversion means according to claim 1 to 10, further comprising adjusting the font size of the auxiliary information to be embedded in the text to be larger than that displayed between lines and smaller than the characters belonging to the text. The information processing apparatus according to any one of the following items.
前記変換手段は、文字の複雑度を算出し、前記補助情報によって注釈される注釈対象について算出した複雑度が所定の閾値以上の文字を含む場合に、前記補助情報を本文に埋め込むように前記構造化文書を変換することを特徴とする請求項1乃至11のいずれか1項に記載の情報処理装置。 The conversion means calculates the complexity of characters, and when the calculated complexity of the annotation target annotated by the auxiliary information includes characters equal to or greater than a predetermined threshold value, the structure is such that the auxiliary information is embedded in the text. The information processing apparatus according to any one of claims 1 to 11, wherein the converted document is converted. 前記変換手段は、所定の文字分類表に基づいて、前記補助情報によって注釈される注釈対象の文字を分類し、指定された分類に属する文字が前記注釈対象に含まれる場合に、前記補助情報を本文に埋め込むように前記構造化文書を変換することを特徴とする請求項1乃至12のいずれか1項に記載の情報処理装置。 The conversion means classifies the characters to be annotated by the auxiliary information based on a predetermined character classification table, and when the characters belonging to the designated classification are included in the annotation target, the auxiliary information is added. The information processing apparatus according to any one of claims 1 to 12, wherein the structured document is converted so as to be embedded in a text. 前記変換手段によって変換された前記構造化文書を描画するのに要する領域の大きさが、前記変換手段によって変換される前の前記構造化文書を描画するのに要する領域の大きさよりも大きい場合、前記変換手段によって変換された前記構造化文書は前記表示制御手段によって表示されないことを特徴とする請求項1乃至13のいずれか1項に記載の情報処理装置。 When the size of the area required to draw the structured document converted by the conversion means is larger than the size of the area required to draw the structured document before being converted by the conversion means. The information processing apparatus according to any one of claims 1 to 13, wherein the structured document converted by the conversion means is not displayed by the display control means. 前記構造化文書とはHTML文書であって、前記注釈情報とは<ruby>要素であることを特徴とする請求項1乃至14のいずれか1項に記載の情報処理装置。 The information processing apparatus according to any one of claims 1 to 14, wherein the structured document is an HTML document, and the annotation information is a <ruby> element. 情報処理装置の制御方法であって、
取得手段により、構造化文書を取得する取得工程と、
判定手段により、前記構造化文書の記述に所定の注釈情報が含まれるか判定する判定工程と、
前記判定工程で注釈情報があると判定された場合、変換手段により、前記注釈情報に含まれる補助情報を前記構造化文書の本文に埋め込むように構造化文書の記述を変換する変換工程と、
表示制御手段により、前記変換された構造化文書の記述に従って、前記構造化文書を表示装置に表示させる表示制御工程と、
を有することを特徴とする情報処理装置の制御方法。
It is a control method for information processing equipment.
Acquisition process to acquire structured documents by acquisition means,
A determination step of determining whether the description of the structured document includes predetermined annotation information by the determination means, and
When it is determined that there is annotation information in the determination step, a conversion step of converting the description of the structured document so that the auxiliary information included in the annotation information is embedded in the body of the structured document by the conversion means.
A display control step of displaying the structured document on the display device according to the description of the converted structured document by the display control means.
A method for controlling an information processing device, which comprises.
コンピュータに読み込ませ実行させることで、前記コンピュータを、請求項1乃至15のいずれか1項に記載の情報処理装置として機能させるプログラム。 A program that causes the computer to function as the information processing device according to any one of claims 1 to 15 by being read by a computer and executed. 請求項17に記載されたプログラムを格納したことを特徴とするコンピュータが読み取り可能な記憶媒体。 A computer-readable storage medium comprising storing the program according to claim 17.
JP2019210032A 2019-11-20 2019-11-20 Information processing device, control method thereof, program, and storage medium Pending JP2021082088A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019210032A JP2021082088A (en) 2019-11-20 2019-11-20 Information processing device, control method thereof, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019210032A JP2021082088A (en) 2019-11-20 2019-11-20 Information processing device, control method thereof, program, and storage medium

Publications (1)

Publication Number Publication Date
JP2021082088A true JP2021082088A (en) 2021-05-27

Family

ID=75965310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019210032A Pending JP2021082088A (en) 2019-11-20 2019-11-20 Information processing device, control method thereof, program, and storage medium

Country Status (1)

Country Link
JP (1) JP2021082088A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034611A (en) * 1999-05-18 2001-02-09 Fujitsu Ltd Reading information output device and recording medium
JP2002108853A (en) * 2000-09-29 2002-04-12 Wac.Com:Kk Sentence information editing method and computer readable recording medium
JP2010182317A (en) * 2010-02-26 2010-08-19 Sharp Corp Information processing device, text display program and text display method
JP2014119968A (en) * 2012-12-17 2014-06-30 Canon Inc Information processing system, server device, display control method and computer program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001034611A (en) * 1999-05-18 2001-02-09 Fujitsu Ltd Reading information output device and recording medium
JP2002108853A (en) * 2000-09-29 2002-04-12 Wac.Com:Kk Sentence information editing method and computer readable recording medium
JP2010182317A (en) * 2010-02-26 2010-08-19 Sharp Corp Information processing device, text display program and text display method
JP2014119968A (en) * 2012-12-17 2014-06-30 Canon Inc Information processing system, server device, display control method and computer program

Similar Documents

Publication Publication Date Title
US9785623B2 (en) Identifying a set of related visible content elements in a markup language document
US10229094B2 (en) Dynamic simulation of a responsive web page
US7176931B2 (en) Modifying hyperlink display characteristics
KR102382899B1 (en) Systems and methods of digital note taking
JP3773770B2 (en) Hypertext display device
JP4290011B2 (en) Viewer device, control method therefor, and program
EP2480986B1 (en) System and method for selective control of zoom adjustments in an electronic publication
US9489714B2 (en) Information processing apparatus, information processing system, information processing method, and program
US20150012818A1 (en) System and method for semantics-concise interactive visual website design
US20150169521A1 (en) Techniques for programmatic magnification of visible content elements of markup language documents
US20120032983A1 (en) Information processing apparatus, information processing method, and program
US20110113318A1 (en) Information processing device, method, and computer-readable recording medium recording program
US7519901B2 (en) Methods and systems for selecting objects by grouping annotations on the objects
JP5290433B2 (en) Display processing device, display processing device control method, control program, and computer-readable recording medium recording control program
JP5780409B2 (en) Display control apparatus and program
JP2020123234A (en) Information processor, control method, and program thereof
JP6485495B2 (en) Document display device, document display method, document display system, and program
JP2021082088A (en) Information processing device, control method thereof, program, and storage medium
JP2019133605A (en) Information processing apparatus and information processing program
JP6011686B2 (en) Display control apparatus and program
JP7225541B2 (en) Information processing device and information processing program
JP5645481B2 (en) Apparatus, method, and program
JP6296127B2 (en) Display control apparatus and program
KR100998076B1 (en) Apparatus and method for controlling size of image displayed on display device
JP2014021694A (en) Portable information terminal, table display method for portable information terminal and table display program for portable information terminal

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230719

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230725

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230922

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20231205

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20231213