JP2024090290A - Information processing method, program, and storage medium - Google Patents

Information processing method, program, and storage medium Download PDF

Info

Publication number
JP2024090290A
JP2024090290A JP2022206088A JP2022206088A JP2024090290A JP 2024090290 A JP2024090290 A JP 2024090290A JP 2022206088 A JP2022206088 A JP 2022206088A JP 2022206088 A JP2022206088 A JP 2022206088A JP 2024090290 A JP2024090290 A JP 2024090290A
Authority
JP
Japan
Prior art keywords
character string
sentences
original text
html
line
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
JP2022206088A
Other languages
Japanese (ja)
Inventor
臣 石田
Original Assignee
株式会社 ラセングル
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 株式会社 ラセングル filed Critical 株式会社 ラセングル
Priority to JP2022206088A priority Critical patent/JP2024090290A/en
Publication of JP2024090290A publication Critical patent/JP2024090290A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

【課題】ある文章群から所定のポリシーでレイアウトされた文章群を作成した際、その利便性を向上可能な情報処理方法、プログラム、および記憶媒体を提供すること。【解決手段】本発明の一実施形態に係る情報処理方法は、所定のレイアウトポリシーに対応付けられた特殊記号と紐づくように文字列が記載された原文200を取得し(ステップS31)、特殊記号を用いて原文200の文字列の各々に対するレイアウトの仕方を特定し、該特定に応じてHTMLタグを生成し、該生成されたHTMLタグの各々に識別子を付与し(ステップS33、S34)、識別子が付与されたHTMLタグを含むHTML文書によってレンダリングし(ステップS35)、レンダリングにより得られた第2の文章群において配置された文字列の各々の絶対座標を取得する(ステップS36)。【選択図】図3[Problem] To provide an information processing method, program, and storage medium capable of improving the convenience of creating a set of sentences laid out in accordance with a specified policy from a set of sentences. [Solution] An information processing method according to one embodiment of the present invention acquires an original text 200 in which character strings are written so as to be linked to special symbols associated with a specified layout policy (step S31), specifies a layout method for each of the character strings in the original text 200 using the special symbols, generates HTML tags according to the specification, assigns identifiers to each of the generated HTML tags (steps S33, S34), performs rendering using an HTML document including the HTML tags assigned with the identifiers (step S35), and acquires absolute coordinates of each of the character strings arranged in the second set of sentences obtained by rendering (step S36). [Selected Figure] Figure 3

Description

本発明は、情報処理方法、プログラム、および記憶媒体に関する。 The present invention relates to an information processing method, a program, and a storage medium.

映画やテレビ番組、舞台、さらにはゲーム等のコンテンツにおいて、該コンテンツの進行やストーリーに関する各演者やキャラクタのセリフやシーンなどの小見出し、さらにはスタッフの動き方などが記載された台本や脚本といった文書が作成されることがあるが、こういった文書作成においては、作家といった作り手が台本や脚本の原文を作成し、それらを監督や演者/声優、製作スタッフなどが活用する、という流れが多い。すなわち、コンテンツの作り手と使い手とが別、というコンテンツの制作プロセスは多いのである。 For content such as movies, television programs, plays, and even games, documents such as scripts or screenplays are sometimes created that list the progression of the content, subheadings for each actor's or character's lines and scenes related to the story, and even the movements of staff members. In creating such documents, the original text of the script or screenplay is often written by a creator such as a writer, and then used by the director, actors/voice actors, production staff, etc. In other words, in many content production processes, the creators of the content and the users are separate.

例えば、台本や脚本といった文書の場合、ストーリーの章や節の冒頭部分に対応する小見出しが記載されたり、各セリフとそのセリフに対応する演者名とが紐づくようにレイアウトされることが多い。このようにレイアウトされた文書は見易く構成されているので、監督や演者といったコンテンツの使い手側には非常に好ましいものとなる。一方、上記レイアウトされた文書の作成にあたっては、該レイアウトを構築するためのポリシー(ルールや決まり)に則る必要があるが、各文字列(セリフの話者名やセリフなど)をポリシーに沿って配置したり、所定の文字列を枠で囲ったりしなければならず、レイアウト構築のための作業が発生する。作家といったコンテンツの作り手にとってはより質の高い/魅力的なストーリーを作成することに注力したいであろう。よって、コンテンツの作り手に対しては、構想したストーリーの文章化に集中して欲しく、レイアウト作業まで行わせるような事態はなるべく避けたいところであるかもしれない。 For example, in the case of documents such as scripts and screenplays, subheadings corresponding to the beginning of the chapters or sections of the story are often written, and each line is often laid out so that it is linked to the name of the actor corresponding to that line. Since documents laid out in this way are easy to read, they are very favorable for content users such as directors and actors. On the other hand, when creating such a laid out document, it is necessary to follow the policy (rules and regulations) for constructing the layout, but each character string (such as the speaker name or line of a line) must be placed according to the policy, and certain character strings must be enclosed in a frame, which creates work for constructing the layout. Content creators such as writers would like to focus on creating a high-quality/attractive story. Therefore, it may be desirable for content creators to focus on writing the story they have conceived, and to avoid a situation where they have to do layout work as much as possible.

さて、台本調にレイアウトされていないコンテンツの原文を台本調に変換するWebアプリも登場してきている(非特許文献1参照)。こちらのWebアプリは、台本調にレイアウトされていない原文を入力欄に入力すると、小見出しや演者とセリフが紐づいた形式の縦書きの台本に変換するものである。よって、例えば、作り手としての作家がレイアウトを気にすることなく原稿を作成し、上記Webアプリの入力欄に原稿データを入力すると、該原稿を台本調にレイアウトされたファイルに変換するので、作り手は台本調にレイアウトする作業を行う必要が無くなる。 Now, web applications have also appeared that convert the original text of content that is not laid out in a script-like format into a script-like format (see Non-Patent Document 1). When original text that is not laid out in a script-like format is entered into an input field, this web application converts it into a vertically written script in a format that links subheadings and actors and lines. Therefore, for example, if a writer as a creator creates a manuscript without worrying about the layout and enters the manuscript data into the input field of the above-mentioned web application, the manuscript is converted into a file with a script-like layout, so the creator does not need to carry out the work of laying it out in a script-like format.

台本ジェイピー Daihon.jp ボイスドラマの台本から縦書きPDFを生成するWebアプリ、インターネット<https://daihon.jp/>Script JP Daihon.jp A web application that creates vertically written PDFs from voice drama scripts, available on the Internet <https://daihon.jp/>

非特許文献1に開示の技術は、レイアウトされていない原文を入力するだけで台本調のレイアウトが形成された台本が出力されるので、コンテンツの作り手はレイアウト構築の手間をかけることなくストーリーの創作に専念できるので好ましい。しかしながら、所定のレイアウトがなされていない文書(原文など)を、所定のレイアウトがなされた文書(台本など)に変換する技術において、まだまだ解決しなければならない課題がある。 The technology disclosed in Non-Patent Document 1 is preferable because it outputs a script with a script-like layout simply by inputting source text that has no layout, allowing content creators to concentrate on creating the story without the trouble of creating a layout. However, there are still issues to be resolved in the technology for converting a document without a specified layout (such as source text) into a document with a specified layout (such as a script).

例えば、原文から台本を作成し、該台本を複数人が別々に活用する際、ある文字列について台本と原文とを相互に参照し合いたい場合(台本中で誤字を発見した場合や、台本を見たある使用者が所定のセリフの変更を希望し作家や他の使用者と議論したい場合など)、非特許文献1の技術では、台本中の各文字列(例えば、セリフ)が原文中のどの部分に記載されているか、であってり、原文中のある文字列が台本中のどこにあるのかをすぐには特定することが難しい。特に原文の分量が多い場合は、これら特定はより困難なものとなる。 For example, when a script is created from an original text and the script is used separately by multiple people, if there is a need to cross-reference the script and the original text for a certain character string (such as when a typographical error is discovered in the script, or when a user who has seen the script wishes to change a certain line and wants to discuss this with the writer or another user), with the technology in Non-Patent Document 1, it is difficult to immediately identify where in the original text each character string in the script (e.g., a line) is written, or where in the script a certain character string in the original text is located. This identification becomes even more difficult when the original text is particularly long.

本発明は、このような課題に鑑みてなされたものであって、その目的とするところは、ある文章群から所定のポリシーでレイアウトされた文章群を作成した際、その利便性を向上可能な情報処理方法、プログラム、および記憶媒体を提供することにある。 The present invention was made in consideration of these problems, and its purpose is to provide an information processing method, program, and storage medium that can improve the convenience of creating a set of texts laid out according to a specified policy from a set of texts.

このような目的を達成するために、本発明の第一の態様は、テキストデータである第1の文章群から、所定のレイアウトポリシーによりレイアウトされ、HTML文書である第2の文章群を生成する情報処理方法であって、前記レイアウトポリシーに対応付けられた特殊記号と紐づくように文字列が記載された前記第1の文章群を取得する工程と、前記第1の文章群の文字列の各々に対する、前記HTML文書に含まれるHTML要素を生成する工程であって、前記特殊記号を用いて前記第1の文章群の文字列の各々に対するレイアウトの仕方を特定し、該特定に応じてHTMLタグを生成し、該生成されたHTMLタグの各々に識別子を付与する工程と、前記識別子が付与されたHTMLタグを含むHTML文書によってレンダリングする工程と、前記レンダリングにより得られた第2の文章群において配置された文字列の各々の絶対座標を取得する工程とを有することを特徴とする。 In order to achieve this object, a first aspect of the present invention is an information processing method for generating a second group of sentences, which is an HTML document, from a first group of sentences, which is text data, laid out according to a predetermined layout policy, the method comprising the steps of: acquiring the first group of sentences, in which character strings are written so as to be linked to special symbols associated with the layout policy; generating HTML elements to be included in the HTML document for each character string in the first group of sentences, in which the special symbols are used to specify how each character string in the first group of sentences is to be laid out, generating HTML tags according to the specification, and assigning identifiers to each of the generated HTML tags; rendering the HTML document including the HTML tags to which the identifiers are assigned; and acquiring absolute coordinates of each character string arranged in the second group of sentences obtained by the rendering.

本発明の第二の態様は、コンピュータに、テキストデータである第1の文章群から、所定のレイアウトポリシーによりレイアウトされ、HTML文書である第2の文章群を生成する情報処理方法を実行させるプログラムであって、前記情報処理方法は、前記レイアウトポリシーに対応付けられた特殊記号と紐づくように文字列が記載された前記第1の文章群を取得する工程と、前記第1の文章群の文字列の各々に対する、前記HTML文書に含まれるHTML要素を生成する工程であって、前記特殊記号を用いて前記第1の文章群の文字列の各々に対するレイアウトの仕方を特定し、該特定に応じてHTMLタグを生成し、該生成されたHTMLタグの各々に識別子を付与する工程と、前記識別子が付与されたHTMLタグを含むHTML文書によってレンダリングする工程と、前記レンダリングにより得られた第2の文章群において配置された文字列の各々の絶対座標を取得する工程とを有することを特徴とする。 A second aspect of the present invention is a program for causing a computer to execute an information processing method for generating a second set of sentences, which is an HTML document, laid out according to a predetermined layout policy from a first set of sentences, which is text data. The information processing method includes the steps of: acquiring the first set of sentences, in which character strings are written so as to be linked to special symbols associated with the layout policy; generating HTML elements to be included in the HTML document for each character string in the first set of sentences, in which the special symbols are used to specify how each character string in the first set of sentences is laid out, generating HTML tags according to the specification, and assigning identifiers to each of the generated HTML tags; rendering the HTML document including the HTML tags to which the identifiers are assigned; and acquiring absolute coordinates of each character string arranged in the second set of sentences obtained by the rendering.

本発明の第三の態様は、本発明の第二の態様に係るプログラムを記憶したコンピュータ読取り可能な記憶媒体である。 A third aspect of the present invention is a computer-readable storage medium that stores a program according to the second aspect of the present invention.

本発明によれば、ある文章群から所定のポリシーでレイアウトされた文章群を作成した際、その利便性を向上可能である。 The present invention makes it possible to improve the convenience of creating a set of texts laid out according to a specified policy from a set of texts.

本発明の一実施形態に係る情報処理装置の概略構成を示す図である。1 is a diagram showing a schematic configuration of an information processing apparatus according to an embodiment of the present invention; 本発明の一実施形態に係る第1の文書群および第2の文書群を説明するための図である。FIG. 2 is a diagram for explaining a first document group and a second document group according to an embodiment of the present invention. 本発明の一実施形態に係る第1の文章群としての原文から第2の文章群としての脚本を生成する処理手順を示すフローチャートである。10 is a flowchart showing a processing procedure for generating a screenplay as a second sentence group from original sentences as a first sentence group according to an embodiment of the present invention. 本発明の一実施形態に係る原文の行配列データを示す図である。FIG. 13 is a diagram showing line arrangement data of an original text according to an embodiment of the present invention. 本発明の一実施形態に係る表示画面を示す図である。FIG. 2 is a diagram showing a display screen according to an embodiment of the present invention.

以下、図面を参照して、本発明の実施の形態を説明するが、本発明は本実施形態に限定されるものではない。なお、以下で説明する図面で、同機能を有するものは同一符号を付け、その繰り返しの説明は省略することもある。 The following describes an embodiment of the present invention with reference to the drawings, but the present invention is not limited to this embodiment. In the drawings described below, parts having the same functions are given the same reference numerals, and repeated explanations may be omitted.

本発明の一実施形態では、第1の文章群から、該第1の文章群とは同じ内容であり所定のポリシーでレイアウトされた第2の文章群を作成し、該第2の文章群をWebページで表示するものであって、第1の文章群を構成する各文字列に対応するWebページで表示するためのHTMLタグの各々に識別子を付すことによって、上記文字列の各々に対して上記Webページ内における絶対座標を付与するものである。 In one embodiment of the present invention, a second group of sentences is created from a first group of sentences, the second group of sentences having the same content as the first group of sentences and laid out according to a predetermined policy, and the second group of sentences is displayed on a web page. An identifier is assigned to each of the HTML tags for displaying the second group of sentences on the web page corresponding to each character string that constitutes the first group of sentences, thereby assigning absolute coordinates within the web page to each of the character strings.

本明細書において、「文字列」とは、例えば、タイトルや見出し、小見出し、セリフ、セリフの話者名、ナレーション、所定の記事の内容、所定の説明文、所定の指示文等の、第1および第2の文章群のコンテンツ部分(文字からなるコンテンツ)を構成する一要素である。「第1の文章群」とは、少なくとも1つの文字列からなる文章群であって、所定のポリシーでレイアウトされていないテキストデータである。「第2の文章群」とは、第1の文章群と同一の文字列)を含み(従って、第1の文章群と同じ内容のもの)、所定のポリシーでレイアウトされた文章群であって、例えば、脚本や台本、ニュースや所定のテーマに対する記事、小説等の書籍等、見易く整形された文書である。また、「所定のポリシー」とは、例えば、「小見出しや各章のタイトルは矩形で囲む」、「縦書きの台本において話者と同行(同列)に該話者のセリフを配置する」といった、所定の文書レイアウトを実現するためのルールや決まりである。よって、「所定のポリシーでレイアウトされた」とは、上記ルールや決まりに従ってレイアウトされることを示す。 In this specification, a "character string" is an element that constitutes the content portion (content consisting of characters) of the first and second sentence groups, such as a title, a heading, a subheading, a line, the name of the speaker of the line, a narration, the contents of a specific article, a specific explanatory sentence, a specific instruction sentence, etc. The "first sentence group" is a sentence group consisting of at least one character string, and is text data that is not laid out according to a specific policy. The "second sentence group" is a sentence group that includes the same character string as the first sentence group (and therefore has the same content as the first sentence group) and is laid out according to a specific policy, such as a script, a screenplay, an article on a news or a specific theme, or a book such as a novel, which is formatted to be easy to read. The "specific policy" is a rule or regulation for realizing a specific document layout, such as "enclose subheadings and the titles of each chapter in a rectangle" or "place the speaker's lines in the same row (column) as the speaker in a vertically written script." Therefore, "laid out according to a specific policy" indicates that the layout is done according to the above rule or regulation.

図1は、本実施形態に係る情報処理装置100の概略構成を示す図である。
情報処理装置100は、CPU(Central Processing Unit)101、GPU(Graphics Processing Unit)102、ストレージ103、メモリ104、出力インタフェース(I/F)105、リーダ106、リーダインタフェース(I/F)107、入力インタフェース(I/F)108、通信モジュール109を備えている。情報処理装置100には、出力I/F105を介して表示部110が接続され、また入力I/F108を介して入力部111が接続される。
FIG. 1 is a diagram showing a schematic configuration of an information processing apparatus 100 according to the present embodiment.
The information processing device 100 includes a CPU (Central Processing Unit) 101, a GPU (Graphics Processing Unit) 102, a storage 103, a memory 104, an output interface (I/F) 105, a reader 106, a reader interface (I/F) 107, an input interface (I/F) 108, and a communication module 109. A display unit 110 is connected to the information processing device 100 via the output I/F 105, and an input unit 111 is connected to the information processing device 100 via the input I/F 108.

CPU101は、種々の演算、制御、判別などの処理動作を実行するものであり、例えばストレージ103から所定のプログラムをメモリ104にロードし、該プログラムに含まれる一連の命令を実行することによって、様々な処理を実行するよう機能する。GPU102は、画像処理を行うためのプロセッサであって、CPU101からの所定の命令に応じて画像を描画し、表示部110に画像を表示させる。 The CPU 101 executes various processing operations such as calculations, controls, and determinations, and functions to execute various processes, for example, by loading a specific program from the storage 103 into the memory 104 and executing a series of commands contained in the program. The GPU 102 is a processor for performing image processing, and draws images in response to specific commands from the CPU 101 and displays the images on the display unit 110.

ストレージ103は、CPU101が読み出して実行するためのプログラム(例えば、図3に示すプログラム等)及び各種のデータが格納されている。メモリ104は、データ及びプログラムを一時的に保持する。メモリ104は、揮発性メモリであり、CPU101やGPU102の処理動作中のデータや入力データ、さらにはリーダ106にて読み取られたデータ(画像等)を一時的に格納するものであって、例えばRAM(Random Access Memory)である。 Storage 103 stores programs (such as the programs shown in FIG. 3) and various data that CPU 101 reads and executes. Memory 104 temporarily holds data and programs. Memory 104 is a volatile memory that temporarily stores data being processed by CPU 101 and GPU 102, input data, and data (such as images) read by reader 106, and is, for example, a RAM (Random Access Memory).

出力I/F105は、CPU101やGPU102の指令に従って、ディスプレイといった表示部110に映像を表示する。リーダ106は、情報処理装置100に設けられ、各種データ、プログラム等が格納されたメモリカードやDVD(Digital Versatile Disc)といった外部記憶媒体を装着可能に構成され、該装着された外部記憶媒体から所定のデータを読み取る。リーダI/F107は、CPU101からの指令に応じて、リーダ106に装着された外部記憶媒体からのデータの読み取りを行う。入力I/F108は、キーボード等の入力部111を介して使用者が操作することによって入力された操作に関する入力信号を受付ける。通信モジュール109は、通信回路網に接続されて、通信回路網に接続されている他のコンピュータと通信する。この通信は有線であっても無線であってもよい。通信モジュール109を介して上記元画像等、所定のデータを取得しても良い。 The output I/F 105 displays an image on a display unit 110 such as a display according to instructions from the CPU 101 or the GPU 102. The reader 106 is provided in the information processing device 100 and is configured to be able to mount an external storage medium such as a memory card or a DVD (Digital Versatile Disc) on which various data, programs, etc. are stored, and reads predetermined data from the mounted external storage medium. The reader I/F 107 reads data from the external storage medium mounted in the reader 106 according to instructions from the CPU 101. The input I/F 108 accepts input signals related to operations input by a user through an input unit 111 such as a keyboard. The communication module 109 is connected to a communication circuit network and communicates with other computers connected to the communication circuit network. This communication may be wired or wireless. Predetermined data such as the original image may be acquired via the communication module 109.

以下、最終的に出力したい第2の文章群を縦書きの脚本調にレイアウトされた文書(以下、単に“脚本”とも呼ぶ)とし、第1の文書群を該脚本の構成要素としての各種文字列(タイトル、章毎のタイトル、話者、セリフ等)が記載されたプレーンテキストである原文とする。すなわち、情報処理装置100によって、図2に示す原文200から脚本300を生成するのである。なお、第1の文章群としての原文200のファイル形式はテキストファイルとなり、第2の文章群としての脚本300のファイル形式はHTML文書である。 Hereinafter, the second group of sentences to be finally output is a document laid out in a script style with vertical writing (hereinafter simply referred to as a "script"), and the first group of documents is an original text that is plain text containing various character strings (title, chapter titles, speakers, lines, etc.) that are components of the script. That is, the information processing device 100 generates a script 300 from the original text 200 shown in FIG. 2. The file format of the original text 200 as the first group of sentences is a text file, and the file format of the script 300 as the second group of sentences is an HTML document.

本実施形態において、原文200は、あるRPG型ゲームのシナリオである。
図2において、符号201~214、および符号301~符号314はそれぞれ文字列である。文字列201、301は上記RPG型ゲームのタイトルに対応し、文字列202、207、302、307は各節のタイトルに対応し、文字列203、210、212、303、310、312は話者に対応し、文字列204、205、206、211、213、214、304、305、306、311、313、314は話者のセリフに対応し、文字列208、209、308、309はト書きに対応する。また、符号216は改行コードである。なお、図2において、文字列201~214の各々の最後尾、および文字列202と203との間、文字列205と206との間、文字列206と207との間、文字列207と文字列208との間、文字列208と文字列209との間、文字列209と文字列210との間、文字列211と文字列212との間にも改行コードは設けられているが、図面の煩雑化を防ぐため、ここでは符号の表記を省略している。
In this embodiment, the original text 200 is a scenario for a certain RPG type game.
2, the reference characters 201 to 214 and the reference characters 301 to 314 are character strings. The reference characters 201 and 301 correspond to the title of the RPG game, the reference characters 202, 207, 302, and 307 correspond to the titles of the sections, the reference characters 203, 210, 212, 303, 310, and 312 correspond to speakers, the reference characters 204, 205, 206, 211, 213, 214, 304, 305, 306, 311, 313, and 314 correspond to the lines of the speakers, and the reference characters 208, 209, 308, and 309 correspond to stage directions. The reference character 216 is a line feed code. In addition, in FIG. 2, line feed codes are provided at the end of each of character strings 201 to 214, and also between character strings 202 and 203, between character strings 205 and 206, between character strings 206 and 207, between character strings 207 and 208, between character strings 208 and 209, between character strings 209 and 210, and between character strings 211 and 212; however, to avoid complicating the drawing, the symbols are omitted here.

図2に示されるように、脚本300においては、タイトル「『〇〇物語』」に関する文字列301は最も大きい所定のフォントサイズにて縦書きで配置され、節のタイトル「[1節 プロローグ]」に関する文字列302には矩形315で囲まれて縦書きで配置される。また、「案内人」、「主人公」、「使者」といった話者に関する文字列303、310、312は、矩形315、316の上端の位置から縦書きで配置され、セリフに関する文字列304、305、306、311、313、314は対応する話者に関する文字列から所定の距離だけ離間した位置から縦書きに配置される。ト書きに関する文字列308、309は話者の文字列とセリフの文字列の間の同一の位置から縦書きで配置される。このように各文字列は、対応する役割(例えば、文字列301であればタイトルを示す役割、文字列304であればセリフを示す役割など)に応じて決まって位置に配置されるので、上述した各文字列の役割に応じて配置するというポリシー(以降、本実施形態に係るポリシーと呼ぶ)でレイアウトされた文章群である。 As shown in FIG. 2, in script 300, character string 301 for the title "The Story of XX" is arranged vertically in the largest specified font size, and character string 302 for the section title "[Section 1 Prologue]" is arranged vertically surrounded by a rectangle 315. Character strings 303, 310, 312 for speakers such as "Guide", "Main Character", and "Messenger" are arranged vertically from the top of rectangles 315 and 316, and character strings 304, 305, 306, 311, 313, 314 for dialogue are arranged vertically from positions spaced a specified distance from the corresponding character string for the speaker. Character strings 308, 309 for stage directions are arranged vertically from the same position between the speaker string and the dialogue string. In this way, each character string is placed in a fixed position according to its corresponding role (for example, character string 301 serves as a title, character string 304 serves as dialogue, etc.), and the text is laid out according to the policy of placing each character string according to its role as described above (hereinafter referred to as the policy according to this embodiment).

一方、原文200においては、タイトルに関する文字列201のフォントサイズを最も大きい所定のサイズにしたり、節のサブタイトルに関する文字列202を矩形で囲ったりという上述した本実施形態に係るポリシーでレイアウトされた文章群ではない。しかしながら、本実施形態では、各文字列201~214を脚本300においてどのようにレイアウトするのかというレイアウトの仕方を特殊文字(記号、符号、数字)や特殊文字の有無によって、すなわち特殊文字を用いて規定する(なお、特殊文字の有無(例えば、後述のセリフが該当)についても、特殊文字が無い場合は、それに対応するレイアウトの仕方(役割)が対応することになるので、特殊文字を用いている、と言える)。本実施形態では、特殊文字を付す場合は、対応する特殊文字の冒頭部分に特殊文字を配置する。例えば、原文200の1行目に記載された「■■『〇〇物語』」については、該当する行に記載された文字列の冒頭部分の特殊文字“■■”がレイアウトの仕方(該当する文字列の役割(ここでは、タイトル))に対応するものであり、それに続く“『〇〇物語』”が表示内容(コンテンツ部分)である。 On the other hand, the original text 200 is not a set of sentences laid out according to the policy of the present embodiment, such as making the font size of the title-related string 201 the largest predetermined size and surrounding the subtitle-related string 202 of the section with a rectangle. However, in this embodiment, the layout method of how each string 201 to 214 is laid out in the script 300 is specified by special characters (symbols, signs, numbers) or the presence or absence of special characters, that is, by using special characters (note that, regarding the presence or absence of special characters (for example, dialogue, which will be described later), if there are no special characters, the corresponding layout method (role) will be used, so it can be said that special characters are used). In this embodiment, when a special character is added, the special character is placed at the beginning of the corresponding special character. For example, for "■■'The Story of XX'" written on the first line of the original text 200, the special character "■■" at the beginning of the string written on the corresponding line corresponds to the layout method (the role of the corresponding string (here, the title)), and the following "The Story of XX" is the display content (content part).

本実施形態では、原文200において付される特殊文字は、脚本300におけるレイアウトに係る本実施形態に係るポリシーと対応付けられている。本実施形態に係る特殊文字とレイアウトの仕方は以下の通りである。
特殊文字“■■”→タイトルとして最も大きい所定のフォントサイズで縦書き。
特殊文字“■N”(Nは自然数)→節のタイトルとして矩形で囲って縦書きとし、節タイトルを示す文字列を墨付き括弧で囲う。さらに、Nの数字を節番号として節タイトルの前に記載する(Nが“1”であれば、“1節”)。
特殊文字“@”→話者名として脚本300の上端から第1の距離から縦書き。
特殊文字“//”→ト書きとして脚本300の上端から第2の距離から縦書き。
特殊文字無し → 該特殊文字無しの行の直前の話者(@が付された文字列)のセリフとして、該直前の話者の文字列から第3の距離から縦書き。
なお、本実施形態では、冒頭に特殊文字が無い文字列はセリフとして脚本300においてレイアウトするようにしているが、例えば、セリフに対応する特殊文字(例えば、“#”)を設けるようにしても良い。
In this embodiment, the special characters added to the original text 200 are associated with the policy according to this embodiment relating to the layout in the script 300. The special characters and the layout method according to this embodiment are as follows.
Special character “■■” → Written vertically in the largest specified font size as a title.
The special character "■N" (N is a natural number) is used as the section title, enclosed in a rectangle and written vertically, and the character string indicating the section title is enclosed in black brackets. Furthermore, the number N is written before the section title as the section number (if N is "1", it is written as "Section 1").
Special character “@”→vertically written as a speaker name at a first distance from the top of the script 300.
Special character “//” → written vertically from the second distance from the top of the script 300 as a stage direction.
No special characters → The lines without special characters are written vertically from the third distance from the character string of the speaker immediately preceding the line without the special characters (the character string with @ attached).
In this embodiment, a character string that does not have a special character at the beginning is laid out in the script 300 as dialogue, but, for example, a special character (e.g., "#") may be provided to correspond to the dialogue.

本実施形態では、原文200は横書きの様式(上から下に向かって記載されていく様式)で脚本300は縦書きの様式(右から左に向かって記載されていく様式)であり、原文200の一行目の文字列から順番に、脚本300を生成する際に対応するWebページにおいて右側から左に向かって配置されていくことになる。脚本300にて右側から順番に配置されていく場所は予め決まっていても良い。すなわち、原文200の各文字列は、対応する行番号の順番で脚本300において右側(スタート地点)から順番に配置されていく。例えば、原文200の一行目の文字列201が脚本300にて最も右側に文字列301として配置され、文字列201の次の文字列である3行目の文字列202が脚本300において文字列301の左側に配置される。また、原文200において改行が実行された場合改行コードが付されるが、原文200中のある行において改行コードのみが付されている場合(文字列が存在しない行)は、脚本300においてはその分空白の領域を設ける。例えば、原文200の2行目には改行コード216のみが配置されている。原文200の2行目の文字列は1行目の文字列201に対応する文字列301の左側に配置されるのだが、2行目は改行コード216のみなのでその領域は空白となるのである。一方、原文200の6行目とその次の7行目とには文字列204と205とが記載されており、脚本300において原文200の6行目が配置される場所に文字列204に対応する文字列304が配置され、そのすぐ左隣りに原文200の7行目の文字列205に対応する文字列305が配置される。よって、図2に示されるように、原文200の1行目に対応する文字列301と原文200の3行目に対応する文字列302との間は、空白領域が設けられていない(原文200において改行コードのみの行が間に存在していない場合)文字列304と305との間よりも大きく離間するのである。 In this embodiment, the original text 200 is written horizontally (written from top to bottom) and the script 300 is written vertically (written from right to left). Starting from the first line of the original text 200, the characters are arranged from right to left on the corresponding web page when the script 300 is generated. The locations in the script 300 where the characters are arranged from the right side may be determined in advance. That is, the character strings of the original text 200 are arranged in the script 300 from the right side (starting point) in the order of the corresponding line numbers. For example, the character string 201 on the first line of the original text 200 is arranged as the character string 301 on the far right side of the script 300, and the character string 202 on the third line, which is the next character string after the character string 201, is arranged to the left of the character string 301 in the script 300. Furthermore, when a line break is executed in the original text 200, a line break code is added, but when only a line break code is added to a line in the original text 200 (a line with no character string), a blank area is provided in the script 300 for that amount. For example, only a line break code 216 is placed in the second line of the original text 200. The character string in the second line of the original text 200 is placed to the left of the character string 301 corresponding to the character string 201 in the first line, but since the second line only contains the line break code 216, that area is blank. Meanwhile, the character strings 204 and 205 are written in the sixth line and the following seventh line of the original text 200, and a character string 304 corresponding to the character string 204 is placed in the place where the sixth line of the original text 200 is placed in the script 300, and a character string 305 corresponding to the character string 205 in the seventh line of the original text 200 is placed immediately to the left of that. Therefore, as shown in FIG. 2, the distance between character string 301 corresponding to the first line of original text 200 and character string 302 corresponding to the third line of original text 200 is greater than the distance between character strings 304 and 305 when there is no blank space (when there is no line in original text 200 that contains only a line feed code).

さらに、本実施形態では、原文200において、特殊文字が付されていない文字列はセリフとしてレイアウトされるものであって、該当文字列の直前の話者(特殊文字“@”が付された文字列)のセリフとして扱う。よって、例えば、文字列204、205、206はそれぞれ特殊文字が付されていない文字列であるので、セリフの役割を持つ文字列である。原文200の5行目の文字列203が、文字列204~206の直前の話者に該当する文字列(特殊文字“@”が付された文字列)であるので、脚本300においては、セリフに関する文字列304~306は話者に関する文字列203に対応する文字列303が該当する話者のセリフとしてレイアウトされる。なお、原文200において8行目(文字列205と206との間の行)は改行コード216のみの行であるので、脚本300において、原文200の8行目に対応する領域は空白となり、文字列305と文字列306との間に空白の領域が設けられることになる。本実施形態では、上述のように、脚本300を作成する際は原文200の各文字列は行番号の順番に対応するWebページにおいて右側から配置されていくが、話者に関する文字列と該話者のセリフに関する文字列については例外的である。すなわち、話者に関する文字列(例えば、文字列203)とその次の行番号の文字列(例えば、文字列204)とが、脚本300において、脚本300の左右方向Pの位置が同一となる(他の文字列は、該左右方向Pで異なる位置に配置される)ように文字列をレイアウトしていく。 Furthermore, in this embodiment, in the original text 200, character strings that do not have special characters are laid out as dialogue and are treated as dialogue of the speaker immediately preceding the corresponding character string (character strings with the special character "@"). Thus, for example, character strings 204, 205, and 206 are character strings that do not have special characters, and therefore have the role of dialogue. Since character string 203 in the fifth line of the original text 200 is a character string that corresponds to the speaker immediately preceding character strings 204 to 206 (character string with the special character "@"), in the script 300, character strings 304 to 306 related to dialogue are laid out as the dialogue of the speaker corresponding to character string 303 related to speaker 203. In addition, since the eighth line (between character strings 205 and 206) in the original text 200 is a line containing only line feed code 216, the area corresponding to the eighth line of the original text 200 in the script 300 is left blank, and a blank area is provided between character strings 305 and 306. In this embodiment, as described above, when creating the script 300, each character string in the original text 200 is arranged from the right side on the web page corresponding to the order of the line numbers, but the character strings related to the speaker and the character strings related to the lines of the speaker are exceptional. In other words, the character strings are laid out so that the character string related to the speaker (e.g., character string 203) and the character string of the next line number (e.g., character string 204) are positioned at the same position in the left-right direction P of the script 300 (other character strings are arranged at different positions in the left-right direction P).

このように、本実施形態では、原文200から脚本300を生成する際、対応するWebページにおいて、該Webページの左右方向Pに沿って原文200の行番号に従って各文字列を順番に配置していくこと(話者とセリフに関する文字列は例外的に取り扱う)を基本とし、原文200の各文字列の特殊文字を用いて各文字列をレイアウトしていくのである。 In this way, in this embodiment, when generating a script 300 from the original text 200, the basic principle is to arrange each character string in the corresponding Web page in order according to the line number of the original text 200 along the left-right direction P of the Web page (character strings related to speakers and lines are treated as an exception), and each character string is laid out using special characters in each character string of the original text 200.

さて、本実施形態では、テキスト形式である原文200からHTML文書を作成し、該HTML文書をレンダリングすることによって脚本300を生成するのだが、HTML文書作成の際、原文200の全行のHTMLタグにIDを付与し、上記HTML文書によって生成されたWebページにおいて各文字列の絶対座標を取得し、該取得された絶対座標と対応するIDとを紐づけて管理している。 Now, in this embodiment, an HTML document is created from the original text 200, which is in text format, and the script 300 is generated by rendering the HTML document. When creating the HTML document, IDs are assigned to the HTML tags of all lines of the original text 200, the absolute coordinates of each character string are obtained in the web page generated by the HTML document, and the obtained absolute coordinates are linked to the corresponding ID and managed.

図3は、本実施形態に係る第1の文章群としての原文200から第2の文章群としての脚本300を生成する処理手順を示すフローチャートである。
本実施形態では、脚本300は上述した本実施形態に係るポリシーでレイアウトされたものであるので、原文200の作り手は、本実施形態に係るポリシーに対応する特殊記号を駆使して原文200を生成することになる。脚本300を利用したいユーザが入力部111により情報処理装置100にインストールされた本実施形態に係る処理を実行するアプリケーションを起動を指示すると、情報処理装置100が備えるWebブラウザにて該アプリケーションが起動する。
FIG. 3 is a flowchart showing a processing procedure for generating a screenplay 300 as a second group of sentences from an original sentence 200 as a first group of sentences according to this embodiment.
In this embodiment, since the script 300 is laid out according to the policy according to the embodiment described above, the creator of the original text 200 makes full use of special symbols corresponding to the policy according to the embodiment to generate the original text 200. When a user who wishes to use the script 300 instructs, via the input unit 111, to start an application that executes the processing according to this embodiment and that is installed in the information processing device 100, the application starts in a web browser provided in the information processing device 100.

ステップS31では、CPU101は、原文200を取得する。例えば、ユーザが原文200に関するテキストファイルから原文200を上記アプリケーションにドラッグ&ドロップするなどして原文200を入力すると、CPU101は入力された原文200を取得することができる。または、原文200のテキストファイルを上記アプリケーションにて開くことによって、原文200を取得しても良い。さらには、上記アプリケーションが原文200を生成する機能(例えば、文書作成機能)を備えており、作り手が入力部111を操作して原文200を作成し、該作成されたものを入力データとしても良い。本実施形態では、原文200の取得方法は本質ではなく、いずれの方法を採っても良い。 In step S31, the CPU 101 acquires the original text 200. For example, when the user inputs the original text 200 by dragging and dropping the original text 200 from a text file related to the original text 200 into the application, the CPU 101 can acquire the input original text 200. Alternatively, the original text 200 may be acquired by opening the text file of the original text 200 in the application. Furthermore, the application may have a function for generating the original text 200 (e.g., a document creation function), and the creator may create the original text 200 by operating the input unit 111, and the created text may be used as the input data. In this embodiment, the method of acquiring the original text 200 is not essential, and any method may be adopted.

ステップS32では、CPU101は、ステップS31にて取得された原文200に基づいて、該原文200中の改行コードを区切り文字として原文200中の各文字列を分割し、分割された各文字列を配列したデータ(原文の行配列データと呼ぶ)を生成する。すなわち、CPU101は、原文200の各行に対して改行コードが出現するまでの文字列を抽出し、新規のテキストデータ(原文の行配列データとなるデータ)において該抽出された文字列の行番号に対応するように文字列を配列していく。また、ある行において改行コードが出現するまでに文字列が存在しない空行についても、新規のテキストデータにおいては空行として、原文200の行番号と対応する行番号に空行を形成する。原文200の全ての行に対してこのような処理を実行することによって、改行コードが無くなった形の原文200に対応する原文の行配列データ(テキストデータ)が生成される。該原文の行配列データは、どの行に何の文字列が配列しているのかを示すデータである。図4は、本実施形態に係る原文の行配列データを示す図である。文字列401~414はそれぞれ、文字列201~214と同一の文字列であり、同一の行番号である。 In step S32, the CPU 101 divides each character string in the original text 200 based on the original text 200 acquired in step S31, using the line feed code in the original text 200 as a delimiter, and generates data in which each divided character string is arranged (called original text line arrangement data). That is, the CPU 101 extracts the character string up to the appearance of the line feed code for each line of the original text 200, and arranges the character string in the new text data (data that becomes the original text line arrangement data) so that it corresponds to the line number of the extracted character string. In addition, for a blank line in which no character string exists until the appearance of the line feed code in a certain line, a blank line is formed in the new text data at the line number corresponding to the line number of the original text 200. By performing such processing on all lines of the original text 200, original text line arrangement data (text data) corresponding to the original text 200 in a form in which the line feed code has been removed is generated. The original text line arrangement data is data indicating which character string is arranged in which line. FIG. 4 is a diagram showing line arrangement data of the original text according to this embodiment. Character strings 401 to 414 are the same character strings as character strings 201 to 214, respectively, and have the same line numbers.

ステップS33では、CPU101は、ステップS32にて生成された原文の行配列データ400を解析し、各文字列の役割(出力すべき脚本300におけるレイアウトの仕方)を特定する。すなわち、CPU101は、原文の行配列データ400の各行に対して、文字列の冒頭に付された特殊文字を解析し、該文字列の役割を特定し、該特定結果を含む解析済行データを生成する。該解析済行データは、各行について、解析によって特定された役割(レイアウトの仕方)、文字列による表示内容(文字列から特殊文字を除いたもの)、原文における文字列(特殊文字を含む文字列)、行番号の4つの情報を1つの要素とした情報(例えば、Javascript(登録商標)のオブジェクト型データ等)である。例えば、原文の行配列データ400の1行目に対しては、
役割(レイアウトの仕方)→タイトル
表示内容→“『〇〇物語』”
原文→“■■『〇〇物語』”
行番号1
という4つの情報を1つの要素(解析済行データの要素1)とする。一方、空行である原文の行配列データ400の2行目に対しては、
役割→空白
表示内容→“”
原文→“”
行番号2”
という4つの情報を1つの要素(解析済行データの要素2)としている。このように、解析済行データは、原文の行配列データ400の各行に対する、上記4つの情報を持った要素を有するものである。
In step S33, the CPU 101 analyzes the original line arrangement data 400 generated in step S32, and identifies the role of each character string (the manner of layout in the script 300 to be output). That is, for each line of the original line arrangement data 400, the CPU 101 analyzes the special characters added to the beginning of the character string, identifies the role of the character string, and generates analyzed line data including the identification result. The analyzed line data is information (e.g., Javascript (registered trademark) object type data, etc.) that combines four pieces of information for each line, namely, the role (the manner of layout) identified by the analysis, the display content of the character string (the character string excluding the special characters), the character string in the original text (the character string including the special characters), and the line number, into one element for example. For example, for the first line of the original line arrangement data 400,
Role (layout method) → Title Display content → "The story of XX"
Original text → "■■『〇〇 story』"
Line number 1
These four pieces of information are treated as one element (element 1 of the parsed line data). On the other hand, for the second line of the original line array data 400, which is a blank line,
Role → Blank Display content → ""
Original text → “”
Line number 2"
These four pieces of information are treated as one element (element 2 of the parsed line data). In this way, the parsed line data has an element having the above four pieces of information for each line of the line array data 400 of the original text.

ステップS34では、CPU101は、ステップS34にて生成された解析済行データの要素毎に特定された役割(レイアウトの仕方)に応じてHTMLタグ化し、該HTMLタグの各々に対して識別子(ID)を付与する。すなわち、CPU101は、解析済行データの各要素に基づいて、「役割」に対応したHTMLタグを生成し、「表示内容」を表示テキスト値に設定し、「行番号」をID属性値に設定することにより、役割に該当するHTMLタグ(開始タグにID属性値が含まれる)で表示テキスト値を囲んだHTML要素を解析済データの要素毎(すなわち、原文200の行毎)に生成する。なお、原文200の空白行については、空白を示すHTMLタグで要素化される。例えば、図2の2行目に対する解析済行データの要素では、「役割」は空白、「表示内容」は“”、行番号は2であるので、空白を示すHTMLタグにて空白領域を囲い、HTMLタグの開始タグにID属性値2を含めてHTML要素を生成すれば良い。CPU101は、生成した全てのHTML要素を連結して、各HTMLタグに識別子が付された脚本300を表示するためのHTML要素群を有するデータ(HTMLタグ配列データと呼ぶ)を生成する。 In step S34, CPU 101 converts each element of the analyzed line data generated in step S34 into an HTML tag according to the role (layout method) specified for each element, and assigns an identifier (ID) to each of the HTML tags. That is, CPU 101 generates an HTML tag corresponding to the "role" based on each element of the analyzed line data, sets the "display content" to the display text value, and sets the "line number" to the ID attribute value, thereby generating an HTML element for each element of the analyzed data (i.e., for each line of original text 200) in which the display text value is surrounded by an HTML tag (whose start tag contains an ID attribute value) corresponding to the role. Note that blank lines in original text 200 are converted into elements with HTML tags indicating blank spaces. For example, in the element of the analyzed line data for the second line in FIG. 2, "role" is blank, "display content" is "", and the line number is 2, so an HTML element can be generated by enclosing the blank area with an HTML tag indicating a blank space and including an ID attribute value of 2 in the start tag of the HTML tag. CPU 101 concatenates all the generated HTML elements to generate data (called HTML tag array data) having a group of HTML elements for displaying script 300 in which each HTML tag has an identifier assigned.

ステップS35では、CPU101は、ステップS34にて生成されたHTMLタグ配列データをHTML文書に追加し、該HTML文書に基づいてWebページとしてレンダリングする(描画する)。すなわち、CPU101は、HTMLタグ配列データの各要素に基づいて脚本300が構築されたWebページを生成する。 In step S35, the CPU 101 adds the HTML tag array data generated in step S34 to the HTML document, and renders (draws) a web page based on the HTML document. In other words, the CPU 101 generates a web page in which the script 300 is constructed based on each element of the HTML tag array data.

ステップS36では、CPU101は、Webページとしてレンダリングされた脚本300における、解析済行データの要素毎に脚本300にて対応するHTML要素(文字列301~314)の各々の絶対座標を取得する。CPU101は、取得された各絶対座標を解析済行データにおける対応する要素に紐づけた絶対座標データを生成する。例えば、現在レンダリングされた脚本300において文字列301の絶対座標がXだとすると、改行済行データの要素1と絶対座標Xとが関連付けられて絶対座標データが生成されるのである。 In step S36, CPU 101 acquires the absolute coordinates of the corresponding HTML elements (character strings 301-314) in script 300 for each element of the analyzed line data in script 300 rendered as a web page. CPU 101 generates absolute coordinate data that links each acquired absolute coordinate to the corresponding element in the analyzed line data. For example, if the absolute coordinate of character string 301 in the currently rendered script 300 is X, element 1 of the line-wrapped line data is associated with absolute coordinate X to generate absolute coordinate data.

ステップS37では、CPU101は、レンダリングされた脚本300を表示部110に表示する。このようにして、原文200から所定のポリシーでレイアウトされた脚本300が生成され表示される。 In step S37, the CPU 101 displays the rendered script 300 on the display unit 110. In this manner, the script 300 is generated from the original text 200 and laid out according to a predetermined policy, and is displayed.

本実施形態によれば、原文200に含まれる特殊文字を用いて原文200の各文字列に対して所定のポリシーに対応したレイアウトの仕方(役割)に関するHTMLタグを生成し、該HTMLタグを含むHTML要素に基づいてレンダリングするので、上記所定のポリシーでレイアウトされた脚本300を生成することができる。そして、上記HTMLタグの各々に対して識別子を付与し、該HTMLタグに基づいてレンダリングされた後の文字列(HTML要素)の各々の絶対座標を取得しているので、脚本300における文字列301~314の各々は、絶対座標とHTMLタグに付された識別子を持つことになる。よって、脚本300中の絶対座標をたよりに該絶対座標に対応する原文200中の文字列を特定することができる。例えば、脚本300において文字列306を指定すると、該文字列306に関するHTMLタグの識別子を特定でき、該特定された識別子に対応する原文200中の行番号を特定することで、原文200における文字列206を抽出することができる。すなわち、解析済行データの各要素が原文200の対応する文字列の識別子としての行番号を有しているので、解析済行データのどの要素が、原文200のどの文字列に対応するかを特定することができるのである。従って、脚本300のある文字列の絶対座標が分かれば、該文字列に対応する原文200中の文字列を特定することができる。よって、例えば脚本300を見たユーザがある文字列に誤字を発見したり、その表現を変えたいといった要望から原文200中の表記を確認したい場合、脚本300にて所望の文字列を特定するだけで、それに対応する原文200中の文字列を抽出することができる。よって、原文200の分量が多い場合であっても、脚本300の所定の文字列に対応する原文200中の文字列を容易に抽出することができる。 According to this embodiment, HTML tags related to the layout method (role) corresponding to a predetermined policy are generated for each character string in the original text 200 using special characters contained in the original text 200, and rendering is performed based on HTML elements including the HTML tags, so that a script 300 laid out according to the predetermined policy can be generated. Then, an identifier is assigned to each of the HTML tags, and the absolute coordinates of each character string (HTML element) after rendering based on the HTML tags are obtained, so that each of the character strings 301 to 314 in the script 300 has absolute coordinates and an identifier assigned to the HTML tag. Therefore, it is possible to specify a character string in the original text 200 corresponding to the absolute coordinates based on the absolute coordinates in the script 300. For example, when a character string 306 is specified in the script 300, an identifier of an HTML tag related to the character string 306 can be specified, and the character string 206 in the original text 200 can be extracted by specifying the line number in the original text 200 corresponding to the specified identifier. That is, since each element of the analyzed line data has a line number as an identifier of the corresponding character string in the original text 200, it is possible to identify which element of the analyzed line data corresponds to which character string in the original text 200. Therefore, if the absolute coordinates of a character string in the script 300 are known, it is possible to identify the character string in the original text 200 that corresponds to that character string. Therefore, for example, if a user who has viewed the script 300 finds a typographical error in a character string or wants to check the notation in the original text 200 because they want to change the expression, they can simply identify the desired character string in the script 300 and extract the corresponding character string in the original text 200. Therefore, even if the original text 200 is large in volume, it is possible to easily extract the character string in the original text 200 that corresponds to a specific character string in the script 300.

本実施形態では、図5に示すように、CPU101は、脚本300が表示されたウィンドウ500において、該ウィンドウ500にてユーザが指定した文字列(例えば、文字列306)の絶対座標から該文字列のHTMLタグに付された識別子を特定し、該識別子に対応する原文200中の文字列(行番号9の文字列206)を特定し、該特定された文字列を抽出してポップアップウィンドウ501に表示するようにしても良い。 In this embodiment, as shown in FIG. 5, the CPU 101 may identify an identifier attached to the HTML tag of a character string (e.g., character string 306) specified by the user in a window 500 displaying a script 300 from the absolute coordinates of the character string, identify the character string in the original text 200 that corresponds to the identifier (character string 206 on line number 9), extract the identified character string, and display it in a pop-up window 501.

また、本実施形態によれば、脚本300の各文字列の絶対座標を取得しているので、ユーザが脚本300をスクロールした際、ウィンドウの所定の位置に設けられたスクロールの判定ライン上の文字列の絶対座標を取得することにより、脚本300において現在ウィンドウに表示されている領域を特定することができる。従って、上記スクロールによって画面を切り替えていく際、ウィンドウに現在表示されている章や節やフェーズを上記ウィンドウに常時表示することができる。同様に、ウィンドウに表示されている文字列のいずれかをユーザが指定した際も、ウィンドウに現在表示されている章や節を常時表示することができる。従って、脚本300を読んでいるユーザは、脚本300の全体像の中で現在読んでいる個所を把握することができ、「今、何処を読んでいるんだっけ?」といった迷子になることを低減することができる。 In addition, according to this embodiment, the absolute coordinates of each character string in the script 300 are obtained, so that when the user scrolls the script 300, the absolute coordinates of the character strings on the scroll judgment line provided at a predetermined position in the window are obtained, thereby making it possible to identify the area of the script 300 currently displayed in the window. Therefore, when switching screens by scrolling as described above, the chapter, section, or phase currently displayed in the window can be displayed in the window at all times. Similarly, when the user specifies any of the character strings displayed in the window, the chapter or section currently displayed in the window can be displayed at all times. Therefore, the user reading the script 300 can grasp the part he or she is currently reading in the overall picture of the script 300, and can reduce the likelihood of getting lost, such as "Where am I reading now?"

また、本実施形態では、脚本300を表示するウィンドウサイズや文字サイズを変えた場合、CPU101がその都度ステップS35~S37を実行することによって、上記変更に合わせたWebページ(脚本300)を生成するようにしても良い。本実施形態では、脚本300の各文字列のHTMLタグに識別子が振られ、上記変更前の脚本300の各文字列の絶対座標を保持しつつ、上記変更後にレンダリングされた脚本300において各文字列の絶対座標を取得しているので、上記変更により文字サイズや折り返し位置が変わることでスクロール位置が変わったとしても、上記変更の直前にウィンドウに表示されていた文字列を該ウィンドウに表示させることができる。すなわち、上記変更の直前のウィンドウに表示されている文字列のいずれかを特定しておけば(ユーザによる所望の文字列の指定や、スクロールの判定ラインとの比較等)、該特定された文字列のHTMLタグに付与された識別子を認識することができる。上記変更により、特定された文字列の絶対座標が変わったとしても、該特定された文字列のHTMLタグの識別子は認識されているので、上記変更後における該識別子に対応する文字列が特定できる。変更後も各文字列の絶対座標が取得されているので、上記特定された文字列に対する絶対座標の領域をウィンドウに表示することにより、上記変更があっても、変更の直前までウィンドウに表示されていた文字列の絶対座標までスクロール位置をズラすことができる。 In addition, in this embodiment, when the window size or character size for displaying the script 300 is changed, the CPU 101 may execute steps S35 to S37 each time to generate a web page (script 300) that matches the change. In this embodiment, an identifier is assigned to the HTML tag of each character string in the script 300, and the absolute coordinates of each character string in the script 300 rendered after the change are acquired while retaining the absolute coordinates of each character string before the change. Therefore, even if the scroll position changes due to the change in character size or wrapping position, the character string displayed in the window immediately before the change can be displayed in the window. In other words, if any of the character strings displayed in the window immediately before the change is specified (by the user specifying a desired character string or by comparing with the scroll judgment line, etc.), the identifier assigned to the HTML tag of the specified character string can be recognized. Even if the absolute coordinates of the specified character string change due to the change, the identifier of the HTML tag of the specified character string is recognized, so the character string corresponding to the identifier after the change can be specified. Since the absolute coordinates of each character string are still obtained after the change, by displaying the absolute coordinate area for the identified character string in the window, even if the change is made, the scroll position can be shifted to the absolute coordinates of the character string that was displayed in the window immediately before the change.

なお、本実施形態では、本実施形態に特徴的な図3に示す処理を情報処理装置100にて実行しているが、情報処理装置100にインターネット等で通信可能な外部サーバにて実行しても良い。例えば、原文200に対するテキストデータを情報処理装置100から外部サーバに送信し、外部サーバにてステップS31~ステップS36までを外部サーバにて実行し、該外部サーバがステップS35で生成されたHTML文書とステップS36で取得された絶対座標データを情報処理装置100に送信し、情報処理装置100が受信したHTML文書をレンダリングするようにすれば良い。 In this embodiment, the process shown in FIG. 3, which is characteristic of this embodiment, is executed by the information processing device 100, but it may also be executed by an external server that can communicate with the information processing device 100 via the Internet or the like. For example, text data for the original text 200 is transmitted from the information processing device 100 to the external server, and the external server executes steps S31 to S36, and the external server transmits the HTML document generated in step S35 and the absolute coordinate data acquired in step S36 to the information processing device 100, and the information processing device 100 renders the received HTML document.

(その他の実施形態)
上述した実施形態の機能を実現するように前述した実施形態の構成を動作させるプログラム(例えば、図3に示す処理を行うプログラム)を記憶媒体に記憶させ、該記憶媒体に記憶されたプログラムをコードとして読み出し、コンピュータにおいて実行する処理方法も上述の実施形態の範疇に含まれる。即ちコンピュータ読み取り可能な記憶媒体も実施例の範囲に含まれる。また、前述のコンピュータプログラムが記憶された記憶媒体はもちろんそのコンピュータプログラム自体も上述の実施形態に含まれる。かかる記憶媒体としてはたとえばフロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD-ROM、磁気テープ、不揮発性メモリカード、ROM等を用いることができる。また上述の記憶媒体に記憶されたプログラム単体で処理を実行しているものに限らず、他のソフトウエア、拡張ボードの機能と共同して、OS上で動作し上述の実施形態の動作を実行するものも上述した実施形態の範疇に含まれる。
Other Embodiments
The above-mentioned embodiment also includes a processing method in which a program (for example, a program that performs the processing shown in FIG. 3) that operates the configuration of the above-mentioned embodiment to realize the functions of the above-mentioned embodiment is stored in a storage medium, the program stored in the storage medium is read as code, and the program is executed by a computer. That is, a computer-readable storage medium is also included in the scope of the embodiment. In addition, the above-mentioned embodiment includes not only the storage medium in which the above-mentioned computer program is stored, but also the computer program itself. Examples of such a storage medium include a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a non-volatile memory card, a ROM, and the like. In addition, the above-mentioned embodiment also includes a program that operates on an OS in cooperation with other software and functions of an extension board to execute the operations of the above-mentioned embodiment, as well as a program stored in the storage medium.

100 情報処理装置
101 CPU
103 ストレージ
104 メモリ
200 原文
201~214、301~314、401~414 文字列
216 改行コード
400 原文の行配列データ

100 Information processing device 101 CPU
103 Storage 104 Memory 200 Original text 201 to 214, 301 to 314, 401 to 414 Character string 216 Line feed code 400 Original text line arrangement data

Claims (3)

テキストデータである第1の文章群から、所定のレイアウトポリシーによりレイアウトされ、HTML文書である第2の文章群を生成する情報処理方法であって、
前記レイアウトポリシーに対応付けられた特殊記号と紐づくように文字列が記載された前記第1の文章群を取得する工程と、
前記第1の文章群の文字列の各々に対する、前記HTML文書に含まれるHTML要素を生成する工程であって、前記特殊記号を用いて前記第1の文章群の文字列の各々に対するレイアウトの仕方を特定し、該特定に応じてHTMLタグを生成し、該生成されたHTMLタグの各々に識別子を付与する工程と、
前記識別子が付与されたHTMLタグを含むHTML文書によってレンダリングする工程と、
前記レンダリングにより得られた第2の文章群において配置された文字列の各々の絶対座標を取得する工程と
を有することを特徴とする情報処理方法。
1. An information processing method for generating a second group of sentences, which is an HTML document, by laying out a first group of sentences, which is text data, according to a predetermined layout policy, the method comprising:
acquiring the first sentence group in which a character string is written so as to be associated with a special symbol associated with the layout policy;
a step of generating HTML elements to be included in the HTML document for each character string of the first group of sentences, the step of specifying a layout method for each character string of the first group of sentences using the special symbol, generating HTML tags in accordance with the specification, and assigning an identifier to each of the generated HTML tags;
rendering with an HTML document including an HTML tag with said identifier;
and acquiring absolute coordinates of each of the character strings arranged in the second sentence group obtained by the rendering.
コンピュータに、テキストデータである第1の文章群から、所定のレイアウトポリシーによりレイアウトされ、HTML文書である第2の文章群を生成する情報処理方法を実行させるプログラムであって、
前記情報処理方法は、
前記レイアウトポリシーに対応付けられた特殊記号と紐づくように文字列が記載された前記第1の文章群を取得する工程と、
前記第1の文章群の文字列の各々に対する、前記HTML文書に含まれるHTML要素を生成する工程であって、前記特殊記号を用いて前記第1の文章群の文字列の各々に対するレイアウトの仕方を特定し、該特定に応じてHTMLタグを生成し、該生成されたHTMLタグの各々に識別子を付与する工程と、
前記識別子が付与されたHTMLタグを含むHTML文書によってレンダリングする工程と、
前記レンダリングにより得られた第2の文章群において配置された文字列の各々の絶対座標を取得する工程と
を有することを特徴とするプログラム。
A program for causing a computer to execute an information processing method for generating a second group of sentences, which is an HTML document, from a first group of sentences, which is text data, by laying out the second group of sentences according to a predetermined layout policy, the program comprising:
The information processing method includes:
acquiring the first sentence group in which a character string is written so as to be associated with a special symbol associated with the layout policy;
a step of generating HTML elements to be included in the HTML document for each character string of the first group of sentences, the step of specifying a layout method for each character string of the first group of sentences using the special symbol, generating HTML tags in accordance with the specification, and assigning an identifier to each of the generated HTML tags;
rendering with an HTML document including an HTML tag with said identifier;
and acquiring absolute coordinates of each character string arranged in the second sentence group obtained by rendering.
請求項2に記載のプログラムを記憶したコンピュータ読取り可能な記憶媒体。

A computer-readable storage medium storing the program according to claim 2.

JP2022206088A 2022-12-22 2022-12-22 Information processing method, program, and storage medium Pending JP2024090290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022206088A JP2024090290A (en) 2022-12-22 2022-12-22 Information processing method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022206088A JP2024090290A (en) 2022-12-22 2022-12-22 Information processing method, program, and storage medium

Publications (1)

Publication Number Publication Date
JP2024090290A true JP2024090290A (en) 2024-07-04

Family

ID=91715056

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022206088A Pending JP2024090290A (en) 2022-12-22 2022-12-22 Information processing method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP2024090290A (en)

Similar Documents

Publication Publication Date Title
US8719029B2 (en) File format, server, viewer device for digital comic, digital comic generation device
US9047261B2 (en) Document editing method
US7176931B2 (en) Modifying hyperlink display characteristics
US11216253B2 (en) Application prototyping tool
US10380773B2 (en) Information processing apparatus, information processing method, and computer readable medium
US20160357717A1 (en) Generating Layout for Content Presentation Structures
US8819545B2 (en) Digital comic editor, method and non-transitory computer-readable medium
US20130283157A1 (en) Digital comic viewer device, digital comic viewing system, non-transitory recording medium having viewer program recorded thereon, and digital comic display method
US10803236B2 (en) Information processing to generate screen based on acquired editing information
KR20210040611A (en) Method and apparatus for generating web page
JP2012133663A (en) Viewer device, browsing system, viewer program and recording medium
WO2012086358A1 (en) Viewer device, viewing system, viewer program, and recording medium
KR102119560B1 (en) Method, system and computer-readable recording medium for editing font using scalable vector graphic format
JP5451696B2 (en) Subtitle adding apparatus, content data, subtitle adding method and program
KR101649822B1 (en) Apparatus and method for building web-page
JP2024090290A (en) Information processing method, program, and storage medium
Wyke-Smith Stylin'with CSS: a designer's guide
KR102263458B1 (en) Method and Apparatus for Generating E-Book File
JP2008197787A (en) Web content providing device, web content providing method, and program
Schengili-Roberts Core CSS: Cascading style sheets
JP2008071212A (en) Contents providing method
KR20160096360A (en) Method for real-time generation and reproducing of EPUB animation using style sheet animation and real-time generation and reproducing of EPUB animation system using thereof
KR102620692B1 (en) HTML5 Automatic Conversion Method for E-learning Content Creation
KR102676192B1 (en) Automatic reprocessing AI program utilizing NLP and generative technology for visualization of novels
JP2008191879A (en) Information display device, display method for information display device, information display program, and recording medium with information display program recorded