WO2007013418A1 - 複数自然言語のソフトウェア説明書生成システム - Google Patents

複数自然言語のソフトウェア説明書生成システム Download PDF

Info

Publication number
WO2007013418A1
WO2007013418A1 PCT/JP2006/314607 JP2006314607W WO2007013418A1 WO 2007013418 A1 WO2007013418 A1 WO 2007013418A1 JP 2006314607 W JP2006314607 W JP 2006314607W WO 2007013418 A1 WO2007013418 A1 WO 2007013418A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
comment
natural language
source
software
Prior art date
Application number
PCT/JP2006/314607
Other languages
English (en)
French (fr)
Inventor
Satoshi Hirano
Takeshi Ohkawa
Runtao Qu
Original Assignee
National Institute Of Advanced Industrial Science And Technology
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 National Institute Of Advanced Industrial Science And Technology filed Critical National Institute Of Advanced Industrial Science And Technology
Priority to US11/996,809 priority Critical patent/US20100146491A1/en
Publication of WO2007013418A1 publication Critical patent/WO2007013418A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Definitions

  • the present invention relates to a software description generation system capable of outputting a plurality of natural language software instructions, and more specifically, the source file power of computer software including comments. It relates to a software manual generation system that generates software manuals by text processing and converts files by text processing.
  • Sun Microsystems Javadoc is one example.
  • the description is written as a comment (annotation) and the document is output as an HTML document or PDF document with respect to the software unit such as class and method.
  • the description it is possible to control the description so that it appears in the place to be acted on in the document to be output by writing together with a sign indicating the meaning of the description.
  • Such automatic generation of documents has traditionally been performed in a source file in which comments are written in a single natural language. This is because software is generally written in a programming language that uses an English character set because of the history of the establishment of computers and the fact that today's international standard natural language is English. This is because the comments attached to are often written in English.
  • Doxygen, KD OC, and DOC ++ are well-known open implementations that generate documentation similar to Javadoc as automatic document generation systems from software source code. However, the tools listed here are intended to generate software documentation written in a single natural language.
  • Patent Document 1 is known as a content filter technique for electronic documents written in a plurality of types of foreign languages. This content filtering technology is mainly aimed at classifying topical-use articles by topic area. Patent Document 1: U.S. Pat.No. 6,542,888
  • Patent Document 1 there is a content filter technique for electronic documents written in a plurality of types of foreign languages as a technique for creating software instructions in a plurality of natural languages.
  • the purpose of this technology is mainly to classify -youth articles with current contents by topic area, and to classify sentences written in multiple natural languages 'explicitly specify the method of extraction'. It is not shown as an example. For this reason, there is no suggestion that the system should be applied to software source files to create multiple natural language software instructions.
  • the document preprocessing system is, for example, a C preprocessor.
  • a preprocessor instruction is embedded in the source file of the generation source, and preprocessing is performed before inputting to the automatic document generation system. The comment is removed and a software manual written in the target natural language is created. Examples of instructions for the C language preprocessor include # ifdef, # endif, etc., and it seems that the purpose can be achieved by using them.
  • the description is complicated and used for the description of the source code of the software, the management of the symbols that identify the language is particularly confusing, and there are many kinds of natural languages. It is inappropriate for the purpose of identifying comments.
  • an object of the present invention is to provide a software description generation system for multiple natural languages that can generate software instructions written in multiple natural languages.
  • a software description generation system for multiple natural languages includes, as a first aspect, a source code sentence written in a programming language.
  • a comment describing one function in the source code is described in a plurality of natural languages.
  • the multiple natural language software instruction generation system includes a source code sentence written in a programming language and a comment given to the source code sentence.
  • a comment describing one function in the source code is described in multiple natural languages.
  • Each natural language description includes a code indicating the function, a code indicating the type of natural language,
  • An input method for inputting a source file to which a code combining a country or region code is added, and interpreting the input source file, identifying the combined code and associating it with the source code sentence Is stored in memory, and a code corresponding to the type of natural language to be output specified by the user is assigned.
  • Extraction means for extracting only comment was, by also in the range and an outputting unit operable to output the software instructions in a natural language to be output to the source code statement on the basis of the extracted comment.
  • the software description generation system further includes translation processing means for translating one natural language sentence into another natural language sentence, and the extraction means is designated by the user.
  • the comment with the code corresponding to the type of the natural language to be output does not exist, the comment with the code corresponding to the predetermined natural language type is extracted from the source file power, and the output means Machine-translates comments in the natural language to be output, and comments written in a predetermined natural language by the translation processing means. Therefore, it is configured to output the software description in the specified natural language to be output.
  • the source file may include a code indicating the main natural language type for indicating, by default, the natural language type of a comment used as a translation source in machine translation. Good.
  • the code attached to the comment includes a code indicating that the comment needs to be updated, and the output means requires the comment to be updated.
  • the source file may be configured to output the information according to the part that needs to be updated or the language that needs to be updated.
  • each processing element (means) is realized as a program.
  • this program When this program is installed in the information processing apparatus, it functions as a software manual generation system of the present invention.
  • the data structure for configuring the source file structure used in the system is characterized.
  • the data structure of the one source file is a function of the source code in the source file including source code statements written in a programming language and comments given to the source code statements.
  • each natural language description has a data structure to which a code that combines a function code and a natural language code is added.
  • One other source file data structure describes a function in the source code in a source file that contains source code statements written in a programming language and comments given to the source code statements.
  • a comment is described in a plurality of natural languages following a code representing a function. It is a data structure to which a code indicating the type of natural language used in the description is added.
  • FIG. 1 is a schematic diagram showing a manual generation system in the present invention.
  • FIG. 2 is a diagram showing an input source file commented in multiple natural languages.
  • FIG. 3 A diagram showing an example of an input source file commented in multiple natural languages and further designated with a target country or region.
  • FIG. 4 is a schematic diagram showing a procedure for generating a manual.
  • FIG. 5 is a schematic diagram showing another processing procedure for generating a manual.
  • FIG. 6 is a diagram showing a procedure for generating a manual including machine translation.
  • FIG. 7 is a diagram showing a procedure for generating a manual including machine translation using a code that defines the type of main natural language.
  • FIG. 8 is a diagram showing an input source file including a code indicating a location that needs to be updated.
  • FIG. 9 is a diagram showing a procedure for generating a manual that can confirm a location that needs to be updated.
  • FIG. 10 A diagram showing examples of comment formats (XML and CSV).
  • FIG. 11 is a diagram showing an outline of an electronic file conversion system.
  • FIG. 12 A diagram showing an output example of a manual written in English.
  • FIG. 13 is a diagram showing an output example of a manual written in Japanese.
  • FIG. 14 is a diagram showing an example of an input source file including a code indicating a main natural language.
  • FIG. 15 is a diagram showing another example of the source file structure.
  • the software manual generation system is installed by software (program) executed on a computer (or more broadly, information equipment), thereby realizing system elements that function as respective processing means. And the system works.
  • the file here is assumed to be an electronic file stored in a computer storage device.
  • This software manual generation system may be configured as a stand-alone type software manual generation device in the form of a node software that is mostly configured with the same functions.
  • the source file to be input to the software manual creation system is assigned to this corresponding to the source code sentence.
  • a source file containing the comment is entered.
  • a comment indicating the meaning of the comment is assigned.
  • the input source file is syntactically analyzed and identified by a sign indicating meaning, and the comment is stored in the storage means.
  • each comment written in each natural language is described in a plurality of natural languages.
  • symbol which shows the meaning of is attached, and these codes
  • the system configuration can output the software description corresponding to the source code sentence and executable software in the specified natural language to be output.
  • the code indicating the type of the natural language and the meaning of the comment are displayed.
  • a code combined with a code indicating the country or region is attached, and a comment including the code is extracted and a software manual is output.
  • a specified natural language comment is generated by machine translation based on a comment described in another natural language, and the software description is generated.
  • the system configuration is such that the input source file includes a code indicating the type of the main natural language, and the specified natural language comment is added to the main natural language indicated there. It is also configured to generate software instructions based on machine translation.
  • the comment is combined with a code indicating that the comment needs to be updated, and the comment including the code is interpreted and updated. It is also configured to output information on necessary parts.
  • Figure 1 shows a software program written in multiple natural languages, a single program source It is the figure which showed the structure of the system produced
  • Source file 101 in this system is a source file to be processed that contains comments written in languages from the first natural language to the nth natural language and software programs written in programming languages (n is 2 or more). Natural number).
  • the software description creation system includes, as system elements, an input processing unit 11, a comment storage processing unit 12, a comment extraction processing unit 13, and an output processing unit 14. , And a translation processing unit 15.
  • the instruction generation system 102 includes a comment extraction processing unit 13, an output processing unit 14, a translation processing unit 15, and a control processing unit (not shown).
  • the input processing unit 11 inputs a source file including a source code sentence written in a programming language and a comment given to the source code sentence. That is, the data structure of the source file 101 input by the input processing unit 11 is the source code in the source file including the source code sentence written in the programming language and the comment given to the source code sentence. A comment describing one function is described in multiple natural languages, and each natural language description is appended with a code that combines a function code and a natural language type code. This is a data structure.
  • the comment storage processing unit 12 stores the input comment and the source code sentence in correspondence with each other by parsing the source file.
  • the sign indicating the type of the natural language and the meaning of the comment are indicated for each comment written in each natural language.
  • the code is combined with a code (eg, @u. Ja) and stored.
  • the comment extraction processing unit 13 extracts from the comment storage processing unit 12 only a comment with a code (for example, ja) corresponding to the type of natural language to be output designated by the user.
  • the output processing unit 14 outputs a natural language software description to be output for the source code sentence based on the extracted comment.
  • the translation processing unit 15 here performs machine translation processing of one natural language sentence into another natural language sentence, as will be described later.
  • the source file input by the input processing unit 11 or the input source file 101 including comments stored in the comment storage processing unit 12 is stored in the instruction generation system. 102.
  • the user specifies the natural language type of the software manual to be output to the manual generation system 102.
  • the comment generation system 102 extracts only a comment with a code corresponding to the type of the specified natural language of the output target by the comment extraction processing unit 13, so that the output processing unit 14 causes the source code to be extracted.
  • the software instructions corresponding to the sentence statements and executable software are output in the natural language to be output.
  • the instruction 103 written in the first natural language specifies the second natural language.
  • the manual 104 written in the 2nd natural language is output.
  • the manual 105 written in the nth natural language is output. In this case, only one type of natural language may be specified, or a plurality of natural languages may be specified at the same time.
  • this system extracts comments written in the target natural language from comments consisting of multiple types of natural language written in the source code, and automatically extracts the target natural language from the source file. Generate documentation for.
  • FIG. 2 is a diagram illustrating details of an input source file to be processed.
  • the source file 200 uses a character code method for storing multi-natural language text on a single electronic file.
  • a character code method for storing multi-natural language text on a single electronic file.
  • an example using a Unicode character set (ISO 10646) is shown.
  • UTF-8 (RFC 3269) is used as the character encoding method.
  • the present invention can be applied to the present invention as long as a character set and a character encoding method capable of expressing sentences written in a natural language are used.
  • FIG. 2 shows an example of a method for describing a code for identifying a natural language comment to be written in a source file.
  • programming languages such as Java (registered trademark)
  • the area enclosed by “Z *” and “* Z” is processed as a comment that is not in the original program source code.
  • the comment starts with “Z * *”.
  • Document comments are generated by software document generation systems such as Javadoc. Are interpreted and output. The software document is output based on the contents of this document comment.
  • the comment format conforming to Javadoc is used.
  • Other comment formats 'program source code description format for example, comments using XML' program source code description Even if it exists, it is applicable to this invention. Examples of other description formats are shown in Figure 10.
  • the example of the description format shown in FIG. 10 is an example of an XML file format and a CSV file format.
  • the source file 1101 shown at the top of FIG. 10 holds the source code and comments written in multiple natural languages in a single file in the XML file format.
  • the source file 1102 holds the same contents in a CSV format (Comma Separated Values) file.
  • CSV format Common Separated Values
  • Many other similar formats can be applied as well.
  • Such a code also exhibits the same effect as an example of one combination code.
  • the document comment 201 shown prior to the Hello class definition statement 202 describes the outline of this class.
  • the power of the "@u. Ja" tag shown here as a sign This indicates that the text following the sign tag is a summary description of this class written in Japanese.
  • the power of the “@ u.ko” tag with another kind of code is shown. This indicates that the text following this tag is a summary description of this class written in Korean.
  • another type of code, “@ u.zh” indicates that the text following this tag is a summary description of the class written in Chinese.
  • the symbol "@u” here is defined as a tag meaning an outline description of a comment, and is a symbol indicating the meaning of the comment.
  • the following “. Jaj ⁇ . Ko” and “. Zh” symbols are used to indicate the type of natural language to be used.
  • These codes are combined, and the combination code “@ u.ja” is a combination of “code indicating the meaning of the comment” and “code indicating the type of natural language”. Meaning and natural language As a code that simultaneously expresses the type of word.
  • the first part 203 is the same as the comment given to the class and explains the outline of the method.
  • the "@param” tag here is a tag given in Javadoc prior to the comment explaining the method argument. This is also a “code indicating the meaning of a comment” for this code.
  • a code indicating the type of natural language is combined with the “@param” tag, and the combination code is used.
  • These tags allow the description generation system to identify that each comment is a description of a method argument and is further a comment for each natural language.
  • IS0639 is defined as an international standard for natural language names, and IS0639-1 is specified to indicate two letters of the IS0639-1 in order to indicate two letters.
  • the ability to use IS0639-1 can be used in the software description generation system of the present invention, not limited to the ISO standard, if an appropriate natural language name is specified.
  • the software manual generation system according to the present invention can extract only the comments related to the natural language to be generated.
  • FIG. 12 shows an example of a manual output when the source file of FIG. 2 is input and the output target language is English (en). Javadoc, an existing generation system, was used to generate the instructions. Also, the source file in Fig. 2 is input and the output target language is Japanese (ja). Fig. 13 shows an example of the output of the manual for this case. In each case, the commentary power in the source file is also extracted from the description of the corresponding language.
  • FIG. 3 is a diagram showing an example of an input source file in which comments are made in a plurality of natural languages and a target country or region is designated.
  • the input source file illustrated in FIG. 3 is an input source file that includes comments that are commented in a plurality of types of natural languages and that further specify the target country or region.
  • a code to be added to the comment here, as shown in Fig. 3, in addition to the natural language code, a country code is further combined and used. This makes it possible to specify both the natural language and the country to be processed.
  • the code (language code) indicating the type of natural language
  • the code country code indicating the type of country is further used in combination with the target natural language. It can be a code that specifies the country together. For this reason, it is possible to divide the document in detail with the code added to the comment associated with the source code.
  • FIG. 4 is a flowchart illustrating the process of generating the input source file power software description. This figure shows how the manual generation process is performed when there is an input source file as described above.
  • the instruction generation system 102 first reads a source file (step 401). After the reading process (or in parallel), a system internal model of the manual is generated (step 402).
  • the internal system model of the manual expresses the structure of the manual on the memory of the computer that performs this process.
  • This process is common to many manual generation systems, and detailed description is omitted.
  • a characteristic point of the present invention is that the natural language (specified by the system internal model of the manual is specified).
  • a comment with a sign indicating ⁇ country (region) '' is extracted, and a description is generated using only the extracted comment (Step 40). 3) That is. This makes it possible to output documents for each country / region according to the user's specifications.
  • FIG. 5 is a flowchart for explaining another example of the process of generating the source file power software description.
  • the instruction generation process procedure reads the source file (step 501), and imports only necessary information (document comments) when the instruction system internal model is generated (step 502). .
  • the document comments about natural language, as specified by the user are filtered out.
  • the processing (Step 503) for generating the manual output from the internal system model of the manual can use the same processing process as that of the conventional manual generation system.
  • FIG. 6 is a flowchart for explaining still another example of the process for generating the source file power software description.
  • This processing example shows the procedure for generating a manual including machine translation.
  • the manual generation system first reads the source file (step 601). After the reading process, an internal system model of the manual is created (step 602). Next, if there is no comment corresponding to the natural language (country 'region) specified in the created system internal model, or if it is old, a comment is created by machine translation (step 603). Then, the description is generated using only the comment with the sign indicating the natural language (country 'region) in which the system internal model power of the description is also specified (step 604). This makes it possible to output documents for each country / region according to the user's specifications.
  • step 402 in the procedure in FIG. 4 corresponds to step 602
  • step 403 corresponds to step 604.
  • the processing procedure is such that the processing process of step 603 is inserted between step 602 and step 604.
  • the comment corresponding to the specified natural language country 'region
  • it is generated by machine translation.
  • machine translation here is assumed to be equivalent to electronic translation or computer translation. It is not a translator, but the translation work is performed by processing by a translation machine. If the translation's validity in machine translation is not sufficiently reliable, the translation by machine translation should be accompanied by a code indicating that the sentence is by machine translation. It is preferable to add. This code makes it possible to review the machine translation later.
  • a system element that performs machine translation processing does not necessarily need to be included in the system. It is possible to use a software service outside the system by using an external file or clipboard rather than processing only with internal data representation.
  • the system may be configured by adding a machine translation function by using an OLE (Object Linking and Embedding) framework.
  • OLE Object Linking and Embedding
  • An important point in developing a program using a source code including comments written in a plurality of types of natural languages using the software manual creation system according to the present invention is to create a source file. In fact, how do you create a source file containing comments written in multiple natural languages?
  • the main natural language can be set for each source file, and the translation work included in the source code is completely divided. Therefore, it is not always necessary to unify natural language in units outside the program. For this reason, the project members can understand them most easily, and work can be carried out efficiently by selecting a natural language that works efficiently.
  • the determination method is as follows: 1: Specify by the user, 2: Specify the natural language used in the user's work environment as the original natural language It can be considered.
  • FIG. 7 is a diagram showing a processing procedure for generating a manual including machine translation using a code that defines the type of main natural language.
  • a source file including a code indicating the main natural language is read.
  • an internal model is generated.
  • the internal model does not have a comment corresponding to the specified natural language (country 'region) or is old, a comment is generated by machine translation. It is a process.
  • the main natural language is used as the source natural language.
  • the instructions are generated as before.
  • FIG. @ Mainlang.ja is included in the comment at the beginning 1503 of the source file 1500.
  • FIG. 8 is a diagram illustrating an example of an input source file including a code indicating a portion that needs to be updated for a comment written in each natural language.
  • the example of the source file shown in FIG. 8 shows the definition of the Hello class as a whole, and a comment 901 is given to the definition 902 of the method say in the definition.
  • the situation where the method definition 902 is changed due to a change in the software specification or the comment 901 is modified can frequently occur in the field of software development.
  • the example of the source file shown in Fig. 8 shows the situation where the argument name of the say method has been changed from repeat to lines in the source file shown in Fig. 2.
  • the source code editing sequence is shown below.
  • FIG. 9 is a diagram showing a procedure for generating a manual in which a portion that needs to be updated can be confirmed in the software manual generating system according to the present invention.
  • the source file is read in step 1001 and the system internal model is generated in the next step 1002, as before.
  • the next step 1003 in addition to the procedure of FIG. 4, in the system internal model, if the specified natural language (country 'region) has a “sign that update is required”, a record is made. A process to do is added.
  • step 1004 the ability to generate the documentation as before.
  • Output based on the information recorded in all steps.
  • the user can completely divide the translation work based on this information.
  • the software instruction generation system is implemented as a system, apparatus, and method for generating a software instruction described in a target natural language directly by each of the means described above.
  • it is not always necessary to take the embodiment in which it is generated directly.
  • By extracting only comments written in the target natural language from comments written in multiple types of natural languages, conversion of electronic files that output source files commented in a single natural language is possible.
  • the implementation to be performed is also an effective implementation of the software description generation system of the present invention.
  • reference numeral 1201 is a source file similar to that in the software manual generation system / apparatus / method described so far.
  • the source file 1201 commented in the multiple natural languages is input to the electronic file conversion system 1202 and the user selects the first natural language, the source file 1203 in which the comments are written in the first natural language is output. If the user selects the second natural language, the source file 1204 in which the comment is written in the second natural language is output. Similarly, a source file 1205 written in the nth natural language is output.
  • the output source files (1203, 1204, ..., 1205) are targeted by inputting them into the existing software manual generation system (1213, 1214, ..., 1215), respectively.
  • Software instructions (1223, 1224, ..., 1225) written in each natural language can be generated, and the objective is achieved.
  • the ability to use an existing software description generation system is very useful because software descriptions can be generated in various forms without applying the present invention and developing a new system. .
  • the source file to be input includes a large number of codes that combine a code representing the type of natural language and a code representing the meaning of the comment.
  • a code representing the type of natural language When editing this type of file on a conventional text editor, it is necessary to copy in each natural language.
  • the amount of the task of describing the above combination code increases, which may reduce the efficiency of editing. Therefore, this problem can be avoided by providing a mechanism for inserting codes in an editing system for software development such as an existing text editor.
  • FIG. 15 is a diagram showing another example of the source file structure.
  • a source file structure used in the software description generation system according to the present invention
  • a source file structure having a form as shown in FIG. 15 can be used.
  • a comment 1604 is added as a description of the method “say” of the class Hello as a description of the comment 1603 force argument param.
  • the data structure of these comments 1603 and 1604 is described in multiple natural languages following the signs “@uj” and “@param”, which indicate the function, and the comment contents describing the function are further described.
  • the symbols “@ja”, “@ko”, and “@zh” indicating the type of natural language used in the description are added.
  • the software description generation system according to the present invention is also useful to use a source file having the source file structure shown in Fig. 15 as an input. That is, a comment describing one function in the source code is described in a plurality of natural languages following the code representing the function, and the comment indicates the type of natural language used in the description. Since a code is added, it can be used effectively when adding comments in multiple natural languages.
  • An implementation form that uses such a data structure as an input file is also an effective implementation of the software description generation system of the present invention.
  • the software manual for each country / region can be obtained by including comments and source codes written in each natural language in a single file. Can be generated from a single source file. Keeping all natural language versions in a single source file means preventing the dispersal of information sources and keeping them consistent. As a result, it is possible to reduce inconsistencies between the natural language versions, and it is possible to simultaneously shorten the time for creating the manual and improve the quality of the manual.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)
  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)

Abstract

 複数の自然言語で書かれたソフトウェア説明書を生成できるソフトウェア説明書生成システムが提供される。ソフトウェア説明書生成システムは、入力手段により、プログラミング言語で書かれたソースコード文および前記ソースコード文に対して付与されたコメントを含むソースファイル内においてソースコード中のあるひとつの機能を説明するコメントが複数の自然言語で記述され、それぞれの自然言語の記述には機能を表す符号と自然言語の種類を表す符号とを組み合わせた符号が付加されているソースファイルを入力し、ソースファイルを解釈し、組み合わせた符号を識別してソースコード文と対応づけてコメントをメモリ上に格納し、使用者によって指定された出力対象の自然言語の種類に相当する符号がつけられたコメントのみを抽出し、抽出されたコメントに基づいて前記ソースコード文に対する出力対象の自然言語のソフトウェア説明書を出力する。    

Description

明 細 書
複数自然言語のソフトウェア説明書生成システム
技術分野
[0001] 本発明は、複数の自然言語のソフトウェア説明書を出力することのできるソフトゥェ ァ説明書生成システムに関するものであり、更に、詳しくは、コメントが含まれているコ ンピュータソフトウェアのソースファイル力もソフトウェアに関する説明書をテキスト処 理により生成し、また、テキスト処理によりファイルを変換するソフトウェア説明書生成 システムに関するものである。
背景技術
[0002] 本発明の説明に先立ち、誤解を招きやすいと思われる言葉の定義を説明する。本 発明においては、コンピュータ 'システム上で幾つかの種類の「言語」を取り扱う。この ため、本明細書において、「自然言語」は、 日本語、英語、中国語、韓国語など、人 類が普段使っている言語のことを意味する。また、「プログラミング言語」は、ァセンブ リ言語, C言語, Java (登録商標)言語など、情報機器を動かすソフトウエアを記述す るための言語一般を意味する。
[0003] 今日、ソフトウェア製品を多くの国や地域に出荷することはソフトウェア企業にとって 重要な戦略である。一般にソフトウェアを使用する際には、何らかの説明書を読んで 理解を深める。その際、読者にとっての第一自然言語 (すなわち母語)で書かれた説 明書を読むことにより、最も効率的にソフトウェアの使用法を習得することが出来る。 すなわち、ソフトウェアの使いやすさは、ソフトウェアに関連する説明書の読みやすさ に大きく依存する。その為、ソフトウェアに関連する説明書、より一般的にはソフトゥェ ァに関連するドキュメントをそれぞれの国や地域の現地語で提供することが、各出荷 地域においてのソフトウェアの価値を高めることにつながる。
[0004] 一方、ソフトウェア開発の国際化もまた急速に進んでいる。プログラミング言語それ 自体は自然言語からはほぼ独立であり、世界のソフトウェア開発者が共有する知識 体系であるため、開発の国際化は自然の流れであるといえる。しかし、ソフトウェアが 複雑化した今日において、ソフトウェアのソースコードだけでは、そのソフトウェアに関 する理解は非常に困難である。そのため、ソフトウェア開発に関する自然言語で書か れたドキュメント (例:〇 Xソフトウェア説明書、〇 Xプログラム内部仕様書、など)をソ ースコードと併せて、開発者間で共有もしくは配布するのが一般的である。ドキュメン トによって、そのソフトウェアの仕様についての理解を促進することが可能となる。そこ で問題となるのは、どの自然言語でその開発ドキュメントが書かれるかである。
[0005] 一般に、開発に関するドキュメントは、開発地の第一自然言語、もしくは事実上の国 際的標準自然言語となっている英語で記述されることが多い。しかし、十分な語学能 力と十分なソフトウェア開発能力を同時に併せ持つ人材は稀である。その為、読者( すなわちソフトウェア開発者)にとつての母語で記述されたソフトウェア開発用ドキュメ ントを読むことで開発対象のソフトウェアに対する理解を深めることが、開発期間の大 幅な短縮につながる。そのため、ソフトウェア製品 (もしくはソフトウェアコンポーネント 製品)は世界的な共通自然言語である英語でのドキュメントのみならず、現地の自然 言語で書かれたドキュメントを備えた上で出荷されることが望ましい。その結果、世界 の各地域におけるソフトウェア製品の価値を高めることにつながる。
[0006] そのため、ソフトウェアの開発側としてはいくつかの自然言語で書かれたドキュメント を作成する必要がある。しかし、ソフトウェア開発にかかわるドキュメント作成は非常に 時間と労力の力かるものである。特に多数の自然言語で発行する必要がある場合に は、発行の度に翻訳工程、および各自然言語で書かれたドキュメント間の整合性の 確認工程が必要となり、ソフトウェア製品の生産性向上の障害となっていた。
[0007] これは、ソフトウェア開発ドキュメントの作成工程を、ソフトウェア自身と関連させて考 えてみると理解が容易である。一般に、ソフトウェアのソースコードと、ソフトウェア開発 ドキュメント(内部仕様書)を別個に作成 '維持することは、コストの力かる工程である。 何故なら、内部仕様書はソフトウェアのソースコードと非常に密接に関連するドキュメ ントであるため、ソースコードの変更時に、ソースコードとドキュメントの内容が一致す るように保つことが困難である。
[0008] そのため、ソフトウェアのソースコード中に注釈(コメント)をあわせて書き込むことに より、動作するソフトウェアとドキュメントを一体として作り上げる開発スタイル力 ソフト ウェア製品の生産性向上に有用であるとの認識が広まっている。例えば、 Knuthは、 文献「文芸的プログラミング(Literate Programming)」にお!/、て、文章の中にソフ トウエアのソースコードを織り込んで、自然言語での説明文とともに書かれたプロダラ ミング言語でのソフトウェアを示し、その有用性を示している。このような開発スタイル において、ソースコード中のコメントは、コメント抽出'文書整形ソフトウェアにより自動 的に抽出'整形されて、完成品のドキュメントとして即座に開発時もしくは運用時に利 用可能である。
[0009] ソフトウェアおよびドキュメント双方の品質維持とコスト削減の観点から見て、ドキュメ ント自動生成システムの採用は非常に有効であるといえる。更には、即座に利用でき ることから、開発効率の向上に有用である。また、実行されるソフトウェアとドキュメント との間の整合性の確保を行 、やす 、利点がある。
[0010] サンマイクロシステムズ社の Javadocは、その一例である。 Java (登録商標)のプロ グラムソースコード中に、クラスやメソッドといったソフトウェアの構成単位に対して、説 明をコメント(注釈)として書き込み、ドキュメントを HTML文書や PDF文書として出力 を行う。説明を書き込む際には、その説明の意味を示す符号をあわせて書き込むこと により、出力するドキュメント中のし力るべき場所にその説明が現れるような制御が可 能である。
[0011] このようなドキュメントの自動生成は、旧来、コメントが単一の自然言語で書かれたソ ースファイルにおいて行われてきた。何故なら、コンピュータの成立の歴史や今日の 国際的な標準自然言語が英語であるという背景から、ソフトウェアは英語の文字セッ トを用いたプログラミング言語で記述することが一般的であり、そのソースファイルに 付されるコメントも英語でかかれることが多いからである。
[0012] ソフトウェアソースコードからのドキュメント自動生成システムとして、 Javadocと同様 のドキュメント生成を行うオープンな実装のうち著名なものとしては、 Doxygenや KD OC、 DOC+ +が挙げられる。し力し、ここに挙げたツールは、単一の自然言語で書 かれたソフトウェア説明書を生成することを目的としたものである。
[0013] 複数の種類の外国語で書かれた電子ドキュメント用のコンテンツフィルタの技術とし ては、特許文献 1が公知である。このコンテンツフィルタの技術は、主に時事的な内 容の-ユース記事を話題分野別に分類することを目的としている。 特許文献 1 :米国特許第 6, 542, 888号明細書
発明の開示
発明が解決しょうとする課題
[0014] 従来、複数の自然言語のソフトウェア説明書を作成する技術として、特許文献 1に 記載されているように、複数の種類の外国語で書かれた電子ドキュメント用のコンテン ッフィルタの技術がある。しかし、この技術は、主に時事的な内容の-ユース記事を 話題分野別に分類するのが目的であり、複数の自然言語で書かれた文章の分類'抽 出についての方法を明示的'具体的に示しているものではない。このため、ソフトゥェ ァのソースファイルに適用して、複数の自然言語のソフトウェア説明書を作成するシ ステムとすることの示唆は与えられな 、。
[0015] また、既存の技術であるテキストプリプロセッシング (事前処理)システムを用いる方 法も考えられる。具体的に、文書プリプロセッシングシステムとは、例えば、 C言語用 のプリプロセッサである。想定される方法としては、例えば、生成元のソースファイル 中にプリプロセッサ用の命令を埋め込んでおき、ドキュメント自動生成システムに入力 する前にプリプロセスを行うことで、生成対象の自然言語以外で書かれたコメントを除 去し、対象自然言語で記述されたソフトウェア説明書を作成するような構成とする。 C 言語プリプロセッサ用の命令の例としては、 # ifdef、 # endifなどがあり、これらを駆 使すれば目的を達成することはできそうである。しかし、記述が煩雑であることと、本 来ソフトウェアのソースコードの記述用に使用されるものであることから、特に言語を 識別する記号の管理において混乱を生じやすぐ複数の種類の自然言語のコメント を識別する目的には不適切である。
[0016] 現在のところ、複数の自然言語で書かれたソフトウェア説明書の生成に関して、生 産性の向上に有用な技術は確立されていない。したがって、本発明の目的は、複数 の自然言語で書かれたソフトウェア説明書を生成することのできる複数自然言語のソ フトウェア説明書生成システムを提供することにある。
課題を解決するための手段
[0017] 上記のような目的を達成するため、本発明による複数自然言語のソフトウェア説明 書生成システムは、第 1の態様として、プログラミング言語で書かれたソースコード文 および前記ソースコード文に対して付与されたコメントを含むソースファイル内におい てソースコード中のあるひとつの機能を説明するコメントが複数の自然言語で記述さ れており、それぞれの自然言語の記述には機能を表す符号と自然言語の種類を表 す符号とを組み合わせた符号が付加されているソースファイルを入力する入力手段 と、入力されたソースファイルを解釈し、組み合わせた符号を識別してソースコード文 と対応づけてコメントをメモリ上に格納する格納手段と、使用者によって指定された出 力対象の自然言語の種類に相当する符号がつけられたコメントのみを抽出する抽出 手段と、前記抽出されたコメントに基づいて前記ソースコード文に対する出力対象の 自然言語のソフトウェア説明書を出力する出力手段とを備えることを特徴とするもの である。
[0018] また、第 2の態様として、本発明による複数自然言語のソフトウェア説明書生成シス テムは、プログラミング言語で書かれたソースコード文および前記ソースコード文に対 して付与されたコメントを含むソースファイル内においてソースコード中のあるひとつ の機能を説明するコメントが複数の自然言語で記述されており、それぞれの自然言 語の記述には機能を表す符号と自然言語の種類を表す符号と更に国もしくは地域を 示す符号とを組み合わせた符号が付加されているソースファイルを入力する入力手 段と、入力されたソースファイルを解釈し、組み合わせた符号を識別してソースコード 文と対応づけてコメントをメモリ上に格納する格納手段と、使用者によって指定された 出力対象の自然言語の種類に相当する符号がつけられたコメントのみを抽出する抽 出手段と、前記抽出されたコメントに基づいて前記ソースコード文に対する出力対象 の自然言語のソフトウェア説明書を出力する出力手段とを備えることを特徴とするも のである。
[0019] この場合に、ソフトウェア説明書生成システムは、更に、 1つの自然言語の文を他の 自然言語の文に翻訳処理する翻訳処理手段を備え、前記抽出手段が、使用者によ つて指定された出力対象の自然言語の種類に相当する符号がつけられたコメントが 存在しない場合に、所定の自然言語の種類に相当する符号がつけられたコメントを 前記ソースファイル力 抽出し、前記出力手段は、出力対象の自然言語のコメントを 、翻訳処理手段により所定の自然言語で記述されたコメントを機械翻訳し、使用者に よって指定された出力対象の自然言語のソフトウエア説明書を出力するように構成さ れる。
[0020] また、この場合に、機械翻訳の際に訳元として用いるコメントの自然言語の種類を デフォルトで示すための、主たる自然言語の種類を示す符号をソースファイル中に含 むように構成されてもよい。
[0021] また、本発明によるソフトウェア説明書生成システムにおいては、コメントに付ける符 号には、コメントが更新を必要とする旨の符号を含み、前記出力手段が、コメントが更 新を必要とする旨の符号に基づ 、て、ソースファイルにお 、て更新が必要な箇所もし くは更新が必要な言語にっ 、ての情報を出力するように構成されても良 、。本発明 の別の態様では、それぞれの処理要素(手段)がプログラムとして実現される。このプ ログラムが情報処理装置にインストールされることにより、本発明のソフトウェア説明書 生成システムとして機能する。この場合において、システムで用いられるソースフアイ ル構造を構成するためのデータ構造に特徴を有するものとなっている。その 1つのソ 一スファイルのデータ構造は、プログラミング言語で書かれたソースコード文および前 記ソースコード文に対して付与されたコメントを含むソースファイル内において、ソー スコード中のあるひとつの機能を説明するコメントが複数の自然言語で記述されてお り、それぞれの自然言語の記述には機能を表す符号と自然言語の種類を表す符号 とを組み合わせた符号が付加されているデータ構造であり、他の 1つのソースフアイ ルのデータ構造は、プログラミング言語で書かれたソースコード文および前記ソース コード文に対して付与されたコメントを含むソースファイル内において、ソースコード 中のあるひとつの機能を説明するコメントが、機能を表す符号に続いて複数の自然 言語で記述されており、前記コメントには、記述に用いられている自然言語の種類を 示す符号が付加されて ヽるデータ構造である。
発明の効果
[0022] 上記のような構成による本発明のソフトウェア説明書生成システムによれば、複数の 自然言語で書かれたコメントを、ソースコードと共にソースファイル中に含むことで、ソ フトウ ア開発者'各国語の編集者'各国語の翻訳者がそれぞれ誤った編集を行うこ とを防止できる。と共に、他国語で記述されたコメントなど翻訳を行う必要のある場所 を翻訳者に表示することが可能となり、編集を効率よく行うことができる。この結果とし て、次のような種々の課題が解決できることとなる。
[0023] (課題 1):これまでソフトウェア開発者は、プログラミング言語で書かれたソースコード にコメントを付与したソースファイルを作成し、そのソースファイルを入力してソフトゥェ ァ説明書を生成する Javadocのようなツールを用いてソフトウェア説明書を生成して きた。し力し、それらのツールは単一の自然言語についてのものであった。このため、 複数の自然言語で書かれたソフトウェア説明書への要求に対しては、個別に各自然 言語毎のファイルそれぞれに翻訳および整合性の確認を経るプロセスが必要であつ て、複数の自然言語で書かれたコメントを、後に処理しやすいようにソースファイル内 に保持することは行われていな力つた。これに対して、本発明のソフトウェア説明書生 成システムを用いることにより、ソースファイルのコメントを複数の自然言語で記述し、 複数の自然言語で書かれたソフトウェア説明書を生成するシステムが実現される。
[0024] (課題 2):自然言語と使用する国'地域が一対一に対応しない場合においても、使用 者の要求に応じて適切なソフトウェア説明書を提供する必要があるが、そのような要 求に応えるシステムは未だ実現されていな力つた。このような課題についても本発明 によるソフトウェア説明書生成システムを用いることにより解決される。
[0025] (課題 3):プログラミング言語で書かれたソースコードと、これらに対して自然言語で 書かれたコメントからなるソースファイルにおいて、翻訳が必要な箇所を適切に判断 する方法は現在のところ明らかにはなっておらず、人手による翻訳が必須となってい る。そのため、ソフトウェア製品の製作プロセスにおいては、ソフトウェア説明書を作成 するための多大な時間とコストが必要となっていた。このような課題についても本発明 によるソフトウェア説明書生成システムを用いることにより解決される。
[0026] (課題 4):ソースファイル中のコメントに関する機械翻訳が適用可能であった場合に おいても、翻訳元のコメントを適切に選択する事は困難であり、ソフトウェア開発者の 意図を反映させるための何らかの明示的な選択手段が必要である。本発明によるソ フトウェア説明書生成システムを用いることにより、このような課題についても解決され る。
[0027] (課題 5):複数の自然言語でコメントで記述されるソースファイルの記述方法および 処理方法のシステムがあつたとしても、ソフトウェアの仕様変更'ソースコードの実装 内容にあわせて、それぞれの自然言語で書かれたコメントの内容を適切に変更 '管 理していくことは、非常に困難な作業である。例えば、ある自然言語で記述されたコメ ントを変更した場合に、その他の自然言語で記述されたコメントとの不一致が起こる
1S どのコメントを最新の情報に修正するべきであるかという情報を管理することは困 難である。これまで、複数の自然言語でコメントが書かれたソースファイルを適切に変 更 ·管理して!/、くためのシステムは実現されて 、な 、。本発明によるソフトウェア説明 書生成システムを用いることにより、このような課題にっ ヽても解決される。
図面の簡単な説明
[0028] [図 1]本発明における説明書生成システムを示す概略図である。
[図 2]複数自然言語でコメントされた入力ソースファイルを示す図である。
[図 3]複数自然言語でコメントされ更に対象の国もしくは地域を指定された入力ソース ファイルの例を示す図である。
[図 4]説明書生成の処理手順を示す概略図である。
[図 5]説明書生成のもう一つの処理手順を示す概略図である。
[図 6]機械翻訳を含む説明書生成の処理手順を示す図である。
[図 7]主たる自然言語の種類を定めた符号を用いた機械翻訳を含む説明書生成の 処理手順を示す図である。
[図 8]更新が必要な箇所を示す符号を含む入力ソースファイルを示す図である。
[図 9]更新が必要な箇所を確認可能な説明書生成の処理手順を示す図である。
[図 10]コメント形式の例(XMLおよび CSV)を示す図である。
[図 11]電子ファイル変換システムの概要を示す図である。
[図 12]英語で書かれた説明書の出力例を示す図である。
[図 13]日本語で書かれた説明書の出力例を示す図である。
[図 14]主たる自然言語を示す符号を含む入力ソースファイルの例を示す図である。
[図 15]ソースファイル構造の別の例を示す図である。
発明を実施するための最良の形態
[0029] 以下、本発明の実施する場合の形態について具体的に実施例に基づき説明する 。実施例の説明において、ソフトウェア説明書生成システムは、コンピュータ (もしくは より広く言うと情報機器)上で実行されるソフトウェア (プログラム)力インストールされる ことにより、それぞれの処理手段として機能するシステム要素が実現されてシステム が動作する。ここでのファイルとは、コンピュータの記憶装置に格納される電子フアイ ルを想定している。なお、このソフトウェア説明書生成システムは、その機能を同じくし たまま大部分をノヽードウエアで構成した形のスタンドアローン型のソフトウェア説明書 生成装置として構成されても良い。
[0030] ソフトウェア説明書作成システムに入力するソースファイルには、プログラム開発に ぉ 、て記述されるプログラミング言語で書かれたソースコード文に加えて、そのソース コード文に対応して、これに付与されたコメントを含むソースファイルが入力される。そ れらのコメントは 2種類以上必要とされるだけの種類の自然言語により、必要な説明 が記述される。この場合に、次のようにして、ソースコードの機能を説明するコメントの 意味および自然言語の種類を示す符号が付けられる。
[0031] 通常のソフトウェア説明書作成システムに入力するソースファイルであれば、コメント にはコメントの意味を示す符号が付与される。通常は、入力されたソースファイルを構 文解析するなどして、意味を示す符号により識別してコメントを格納手段に格納する 。しかし、本発明の対象とするソースファイルにおいては、各々の自然言語で書かれ た各々のコメントには複数の自然言語で記述されるため、それらのコメントの自然言 語の種類を表す符号とコメントの意味を示す符号とを組み合わせた符号がつけられ、 これらの符号が併せて記述されている。そのため、コメントを格納する際には、 自然言 語の種類を表す符号とコメントの意味を示す符号とを組み合わせた符号により識別さ れて格納される。
[0032] このソフトウェア説明書生成システムにおいては、上述したようにして、組み合わせ た符号により識別されて格納手段に格納されたコメントから、ユーザによって指定され た出力対象の自然言語の種類に相当する符号がつけられたコメントのみを抽出する 。これにより、ソースコード文および実行可能ソフトウェアに対応するソフトウェア説明 書を、指定された出力対象の自然言語で出力することができるシステム構成とされる [0033] また、このソフトウェア説明書生成システムにおいては、入力するソースファイル中 の各々の自然言語で書かれた各々のコメントに対しては、その自然言語の種類を表 す符号とコメントの意味を示す符号に加えて、更に、国もしくは地域を示す符号とを 組み合わせた符号がつけられており、その符号を含むコメントを抽出してソフトウェア 説明書を出力するように構成される。
[0034] また、ここでのソフトウェア説明書生成システムにお 、ては、指定された自然言語の コメントを、別の自然言語で記述されたコメントを元に機械翻訳により生成して、ソフト ウェア説明書を出力するようなシステム構成とされるが、入力するソースファイルに主 たる自然言語の種類を示す符号を含むことと、指定された自然言語のコメントを、そこ で示された主たる自然言語を元にして機械翻訳することにより生成して、ソフトウェア 説明書を出力するようにも構成される。
[0035] 更に、入力するソースファイル中のソースコード文に付与された、コメントが更新を 必要とする旨の符号と組み合わせた符号を含むことと、その符号を含むコメントを解 釈して更新が必要な箇所の情報を出力するようにも構成される。
[0036] 既存のソフトウェア説明書作成システムに入力可能なソースファイルを、変換により 生成するシステムとすることも有用である。すなわち、目的とする自然言語で記述され たソフトウェア説明書を、複数言語で書かれたソースファイル力 直接生成するので はなぐまずは、目的とする自然言語で記述されたコメントとソースコードのみを抽出 することによって、目的とする自然言語のみでコメントされたソースファイルを出力する 。その後、出力されたソースファイルは、既存の説明書生成システムに入力すること で、最終的には目的とする自然言語で記述されたソフトウェア説明書が生成されるよ うに構成されても有用なシステムとなる。
[0037] 図中に現れるソースコードの例にぉ 、ては、 Java (登録商標)言語による記述が例 示されている力 しかし、本発明によるソフトウェア説明書作成システムは、 Java (登録 商標)言語で記述されたソフトウェアソースコードにおいてのみ適用されるものでなく 、 Java (登録商標)言語に限らず、あらゆるプログラミング言語に対しても適応可能で ある。
[0038] 図 1は、複数の自然言語で書かれたソフトウェア説明書を、単一のプログラムソース ファイルから生成するシステムの構成を示した図である。このシステムにおけるソース ファイル 101は、第 1自然言語から第 n自然言語までの種類の言語で記述されたコメ ントおよびプログラミング言語で書かれたソフトウェアプログラムを含む処理対象ソー スファイル (nは 2以上の自然数)である。
[0039] 本発明の実施例に係るソフトウェア説明書作成システムは、図 1に示されるように、 システム要素として、入力処理部 11、コメント格納処理部 12、コメント抽出処理部 13 、出力処理部 14、および翻訳処理部 15を備えている。説明書生成システム 102は、 コメント抽出処理部 13、出力処理部 14、翻訳処理部 15、および図示されない制御 処理部から構成されている。
[0040] 入力処理部 11は、プログラミング言語で書かれたソースコード文および前記ソース コード文に対して付与されたコメントを含むソースファイルを入力する。すなわち、入 力処理部 11により入力されるソースファイル 101のデータ構造は、プログラミング言 語で書かれたソースコード文および前記ソースコード文に対して付与されたコメントを 含むソースファイル内において、ソースコード中のあるひとつの機能を説明するコメン トが複数の自然言語で記述されて、それぞれの自然言語の記述には機能を表す符 号と自然言語の種類を表す符号とを組み合わせた符号が付加されて ヽるデータ構 造である。コメント格納処理部 12が、入力されたコメントおよびソースコード文を対応 づけてソースファイルを構文解析するなどして格納する。この場合に、例えば、 2種類 以上の自然言語で書かれるコメントにつ 、ては、各々の自然言語で書かれた各々の コメントに対して当該自然言語の種類を表す符号とコメントの意味を示す符号とを組 み合わせた符号 (例えば @u. jaなど)により識別して格納する。コメント抽出処理部 1 3は、使用者によって指定された出力対象の自然言語の種類に相当する符号 (例え ば jaなど)がつけられたコメントのみを前記コメント格納処理部 12から抽出する。出力 処理部 14は、前記抽出されたコメントに基づいて前記ソースコード文に対する出力 対象の自然言語のソフトウェア説明書を出力する。また、ここでの翻訳処理部 15は、 後述するように、 1つの自然言語の文を他の自然言語の文に機械翻訳処理する。
[0041] 入力処理部 11により利用者力 入力されたソースファイル、またはコメント格納処理 部 12に格納されているコメントを含む入力ソースファイル 101は、説明書生成システ ム 102に入力される。使用者は、説明書生成システム 102に対して出力したいソフト ウェア説明書の自然言語の種類を指定する。そして、説明書生成システム 102は、コ メント抽出処理部 13により、指定された出力対象の自然言語の種類に相当する符号 がつけられたコメントのみを抽出することによって、出力処理部 14により、ソースコー ド文および実行可能ソフトウェアに対応するソフトウェア説明書を、前記の出力対象 の自然言語で出力する。
[0042] 使用者が説明書生成システム 102に対して、第 1自然言語を指定した際は、第 1自 然言語で書かれた説明書 103が、第 2自然言語を指定した際は、第 2自然言語で書 かれた説明書 104が、また、第 n自然言語を指定した際は、第 n自然言語で書かれた 説明書 105が出力される。なお、この場合に指定する自然言語の種類は一つだけで も、複数を同時に指定しても構わない。
[0043] このように、このシステムは、ソースコード中に書かれた複数種類の自然言語からな るコメントから、対象自然言語で書かれたコメントを抽出し、ソースファイルから自動的 に対象自然言語のドキュメントを生成する。
[0044] 図 2は、処理対象となる入力ソースファイルの詳細を例示する図である。図 2に示す ように、ソースファイル 200には、プログラムのソースコードと共に各自然言語で書か れたコメントが、単一のソースファイル上に保持される。その際、ソースファイル 200に おいては、単一の電子ファイル上に多自然言語のテキストを格納する文字コード方 式を用いる。この実施例においては、 Unicode文字セット(ISO 10646)を用いた 例を示している。また、文字符号ィ匕方式としては UTF— 8 (RFC 3269)を用いる。し かし、多自然言語で書かれた文章を表現可能な文字セットおよび文字符号化方式を 用いる限り、本発明に適用可能である。
[0045] 図 2においては、書かれたコメントがどの自然言語用のコメントであるかを識別する 符号を、ソースファイル中に記述する方法の一例が示されて 、る。 Java (登録商標) などのプログラミング言語にお!、ては、「Z *」と「 * Z」で囲まれた領域が、本来のプ ログラムソースコードではなぐコメントとして処理される。この例においてコメントは「Z * *」で始まる力 これはドキュメントコメントと呼ばれ、通常のコメントとは区別されて 取り扱われる。ドキュメントコメントは、 Javadoc等のソフトウェア文書生成システムによ つて解釈されて出力される。ソフトウェア文書はこのドキュメントコメントの内容に基づ いて出力される。なお、この実施例における入力ソースコードの例としては、 Javadoc に倣ったコメント形式を用いている力 他のコメント形式'プログラムソースコード記述 形式、例えば、 XMLを用いたコメント 'プログラムソースコードの記述であっても、本 発明に適用可能である。他の記述形式の例については、図 10に示されている。
[0046] 図 10に示される記述形式の例は、 XMLファイル形式および CSVファイル形式の 一例である。図 10の上部に示すソースファイル 1101は、 XMLファイル形式におい てソースコードおよび複数の自然言語で記述されたコメントを、単一のファイル中に 保持している。また、ソースファイル 1102では、 CSV形式(Comma Separated V alues)ファイルにより同様の内容を保持している。この他にも、多数の類似する形式 によって、同様に適用できる。例えば、ソースファイル 1101の XML形式の適用につ いて説明すると、 <u. en>という符号は、自然言語を示す記号である「en」を XML タグの属性として扱い、く u lang = "en" >とする記述による符号とするようにしても よい。このような符号によっても、一つの組み合わせ符号の実施例として同様の効果 を示すものとなる。
[0047] 参照を図 2に戻すと、図 2に示すソースファイル 200において、 Helloクラスの定義 文 202に先立って示されているドキュメントコメント 201には、このクラスの概要説明が 書かれている。ここで符号として「@u. ja」タグが示されている力 これは符号のタグ に続くテキストが、 日本語で書かれたこのクラスの概要説明であることを示している。 また、別の種類の符号の「@u. ko」タグが示されている力 これはこのタグに続くテキ ストが、韓国語で書かれたこのクラスの概要説明であることを示している。同様に別の 種類の符号である「@u. zh」のタグは、同様にこのタグに続くテキストが、中国語で書 かれたこのクラスの概要説明であることを示して 、る。
[0048] ここでの符号「@u」は、コメントの概要説明を意味するタグとして定義したものであり 、コメントの意味を示す符号である。そして、これに続く「. jaj Γ. ko」「. zh」の符号は、 使用する自然言語の種類を示すための符号である。これらの符号は組み合わされて 、その組み合わせ符号「@u. ja」が、「コメントの意味を示す符号」および「自然言語 の種類を示すための符号」を組み合わせたものとなっており、コメントの意味と自然言 語の種類を同時に表現する符号として 、る。
[0049] 本発明においては、このような組み合わせ符号を用いることにより、複数の種類の 自然言語の説明書の編集作業および生成を効率ィ匕することができるものとなってい る。プログラム開発を行うプログラマがソースコードの編集中においても、これらの符 号を用いることにより、異なる種類の、また複数の種類の自然言語で書かれたコメント を提示することができる。
[0050] 次に、これらの符号の別の使用法の一例として、メソッド sayの定義 205に対して付 与されたドキュメントコメントについて説明する。前半部分 203は、クラスに付与された コメントと同様であり、メソッドの概要を説明している。ここでの符号の「@param」タグ は、 Javadocにおいては、メソッドの引数についての説明を行うコメントに先立って付 与されるタグである。これは、この符号についても「コメントの意味を示す符号」となる。 この場合においては、複数の種類の自然言語に対応するため「@param」タグに対し て、自然言語の種類を示す符号を組み合わせて、その組み合わせ符号を用いる。つ まり、コメント 204における組み合わせ符号である「@param. ja (日本語)」タグ、「@p aram. ko (韓国語)」タグ、および「@param. zh (中国語)」タグにより、複数の種類 の自然言語に対応した組み合わせ符号とする。これらのタグにより説明書生成システ ムは、それぞれのコメントが、メソッドの引数についての説明であって、更に、それぞ れの自然言語用のコメントであると識別することができる。
[0051] なお、自然言語名の国際規格としては IS0639が規定されており、アルファベット 2 文字で示すためには IS0639— 1力 3文字で示すためには IS0639— 2が規定さ れている。この実施例においては、 IS0639— 1を使用している力 適切な自然言語 名を規定すれば ISO標準に限らずに、本発明のソフトウェア説明書生成システムに 用いることができる。以上の表記法の採用により、本発明におけるソフトウエア説明書 生成システムは、生成対象の自然言語に関連するコメントだけを抽出することができ る。
[0052] 図 2のソースファイルを入力とし、出力対象言語を英語 (en)とした場合の説明書出 力例を、図 12に示している。説明書の生成には既存の生成システムである Javadoc を用いた。また、図 2のソースファイルを入力とし、出力対象言語を日本語 (ja)とした 場合の説明書の出力例を図 13に示している。それぞれ、ソースファイル中のコメント 力も対応する言語の説明が抽出されて出力されたものとなっている。
[0053] 図 3は、複数自然言語でコメントされ更に対象の国もしくは地域を指定された入力ソ 一スファイルの例を示す図である。図 3に例示される入力ソースファイルは、複数の種 類の自然言語でコメントされ、更に、対象の国もしくは地域を指定されたコメントを含 む入力ソースファイルである。ここでのコメントに付加する符号として、図 3に示すよう に、自然言語コードに加えて更に国コードが更に組み合わせられて使用される。これ により、処理の対象となる自然言語と国とを共に指定することが可能になる。
[0054] 図 3に示すソースファイル 300において、 Helloクラスの定義 302に付与されたドキ ュメントコメント 301においては、組み合わせ符号の「@u. de— be」タグおよび「@u. fr— be」タグが用いられている力 この「@u. de— be」タグは、メソッド引数の説明を 行う目的であって、ベルギー王国においてドイツ語を第一自然言語とする人に向け たコメントであることを示している。また、「@u. fr— be」は対象とする自然言語の種類 力 ドイツ語ではなくてフランス語であることを示して 、る。
[0055] 以上の例により、自然言語の種類を示す符号 (言語コード)に加えて国の種類を示 す符号 (国コード)を、更に、組み合わせて使用することにより、対象となる自然言語と 国とを共に指定する符号とすることができる。このため、ソースコードと対応づけるコメ ントに付加する符号によりキメ細やかなドキュメントの書き分けが可能となる。
[0056] 図 4は、入力ソースファイル力 ソフトウェア説明書を生成する処理を説明するフロ 一チャートである。これまでに説明したような入力ソースファイルがあった場合に、説 明書生成処理がどのように行われるかを示す図となっている。説明書生成システム 1 02は、初めにソースファイルの読み込み (ステップ 401)を行う。その読み込み処理の 後に (若しくは並行して)、説明書のシステム内部モデルを生成する (ステップ 402)。 ここでいう説明書のシステム内部モデルとは、この処理を行うコンピュータのメモリ上 に説明書の構造を表現したものである。なお、この過程は多くの説明書生成システム に共通のものであり、詳細な説明は省略するが、本発明において特徴的な点は、説 明書のシステム内部モデルカゝら指定された自然言語 (国'地域)を示す符号がつけら れたコメントを抽出し、抽出したコメントのみを用いて、説明書を生成する (ステップ 40 3)ことである。これにより、各国 ·地域向けのドキュメントを使用者の指定に応じて出力 することが可能になる。
[0057] 図 5は、ソースファイル力 ソフトウェア説明書を生成する処理の別の例を説明する フローチャートである。この場合の説明書生成処理の処理手順においては、ソースフ アイルを読み込み (ステップ 501)、説明書のシステム内部モデルを生成する (ステツ プ 502)時点で、既に必要な情報(ドキュメントコメント)のみを取り込む。この時点にお V、て、使用者によって指定されて 、な 、自然言語に関するドキュメントコメントはフィ ルタアウトされる。そのため、説明書のシステム内部モデルから出力する説明書を生 成する処理 (ステップ 503)は、従来の説明書生成システムと全く同様の処理プロセス を用いることが可能となって 、る。
[0058] 図 6は、ソースファイル力 ソフトウェア説明書を生成する処理の更に別の例を説明 するフローチャートである。この処理の例では、機械翻訳を含む説明書生成の処理 手順を示している。説明書生成システムは、初めにソースファイルの読み込み (ステツ プ 601)を行う。その読み込み処理の後に説明書のシステム内部モデルを作成する( ステップ 602)。次に、作成したシステム内部モデルにおいて指定された自然言語( 国'地域)に対応するコメントがない場合、もしくは古い場合は機械翻訳によりコメント を作成する (ステップ 603)。そして、説明書のシステム内部モデル力も指定された自 然言語 (国'地域)を示す符号が付けられたコメントのみを用いて説明書を生成する( ステップ 604)。これにより、各国 ·地域向けのドキュメントを使用者の指定に応じて出 力することができる。図 6に示される処理手順は、図 4の手順のステップ 402がステツ プ 602に、ステップ 403がステップ 604にそれぞれ対応する。ステップ 602とステップ 604の間に、ステップ 603の処理プロセスが挿入された処理手順となっている。ステツ プ 603の処理においては、説明書のシステム内部モデルにおいて、指定された自然 言語 (国'地域)に対応するコメントがない若しくは古い場合に、機械翻訳により生成 する処理を行う。
[0059] このような処理を行うことによって、人手による翻訳を介さずに必要な自然言語の説 明書が生成可能になるため、非常に大きい利点となる。ここでの機械翻訳とは、別の 言い方では電子翻訳'コンピュータ翻訳などに相当するものを想定しており、人間の 翻訳者ではな 、翻訳機械による処理により翻訳作業を行わせるものである。機械翻 訳における訳文の正当性'妥当性に関する信頼性が十分に高くない場合には、機械 翻訳による訳文にっ 、ては、その文が機械翻訳によるものである旨を示す符号を併 せて付加することが好ましい。この符号により、後に機械翻訳文の見直しが可能にな る。
[0060] また、機械翻訳の処理を行うシステム要素 (機械翻訳処理モジュール)は、システム 内に含有する必要は必ずしもない。内部データ表現だけで処理するのではなぐ外 部ファイルやクリップボードを用いて、システム外部のソフトウェア ·サービスを利用す る方法であっても良い。また、 OLE (Object Linking and Embedding)の枠組 みを用いるなどして機械翻訳の機能を追加する方法によりシステムが構成されても良 い。
[0061] 本発明によるソフトウェア説明書作成システムを用いて、複数の種類の自然言語で 書かれたコメントを含むソースコードを用いたプログラム開発を行う際の重要な点は、 ソースファイルを作成する際に、実際にはどのようにして、複数の種類の自然言語で 書かれたコメントを含むソースファイルを作成して 、く力、 t\、うことである。
[0062] 例えば、本発明によるソフトウェア説明書作成システムを用いない一般的な開発モ デルにおいては、ソフトウェア設計者により設計されたソフトウェアは、ソフトウェア実 装者によってソースファイルの形に具現ィ匕される。その際、ソースコードに付与される コメントの自然言語は、該当プロジェクトにおいて規定される第 1自然言語となる。当 初のコメントは、その第 1自然言語で記述されるのが通常である。
[0063] しかし、本発明によるソフトウェア説明書作成システムを用いると、この場合には、ソ 一スファイル毎に主とする自然言語を設定できることと、ソースコード中に含まれる翻 訳作業を完全分業ィ匕できることから、必ずしもプロジヱ外単位で自然言語の統一を 図る必要が無い。そのため、プロジェクトのメンバーには最も理解が容易であり、作業 が効率的に進む自然言語を選択することにより、作業が効率よく進められる。
[0064] また、前述した翻訳作業にぉ 、て、翻訳の元となるオリジナル自然言語としてどの 種類の言語を使うか、という点についても重要である。決定方法としては、 1 :使用者 が指定する、 2 :使用者の作業環境の使用自然言語をオリジナル自然言語として指 定する、などが考えられる。
[0065] しかし、ソースファイルもしくはクラスやメソッドという単位で開発者が違うという状況 は多くの場合に起こりうる。これに対しては、そのため、ソースファイルに、主たる自然 言語の種類を示す符号を含ませることで、説明書生成システムに対して情報を与え る方式の採用が望ましい。
[0066] 図 7は主たる自然言語の種類を定めた符号を用いた機械翻訳を含む説明書生成 の処理手順を示す図である。この処理では、ステップ 701において、主とした自然言 語を示す符号を含んだソースファイルを読み込む。次のステップ 702において、内部 モデルの生成を行い、ステップ 703においては、内部モデルにおいて、指定された 自然言語 (国'地域)に対応するコメントがない若しくは古い場合は、機械翻訳により コメントを生成する過程である。その際の訳元の自然言語としては、主たる自然言語 を用いる。次のステップ 704の処理においては、これまでと同様に説明書の生成を行
[0067] このようなソースファイルの例として、主たる自然言語を示す符号を含む入力ソース ファイルの一例を、図 14に示している。ソースファイル 1500の冒頭部分 1503におい て、コメント中に @mainlang. jaが含まれている。これは主たる自然言語として、 日本 語を用いるという意味である。例えばこのソースファイル 1500のコメントとして存在し ないドイツ語のソフトウェア説明書を出力したい場合を考えてみる。システムの使用者 が訳元の言語を特に指定しな力つた場合、仮にこの符号がない場合を考えると、訳 元として複数の自然言語のコメント部分 1501の日本語 ·韓国語 ·中国語のうち、どれ を用いたらよいか不明である。この場合、冒頭部分 1503に @mainlang. jaがあるこ とにより、訳元のコメントとしては、デフォルトとして @u. jaで示される日本語コメントを 選択すれば良いことが明らかとなる。結果として、説明書生成システムは、そこで示さ れた主たる自然言語を元にして機械翻訳することにより適切なコメントが得られ、ソフ トウ ア説明書を出力する事が可能になる。これにより、翻訳割り当て作業の簡易化 を図ることができる。
[0068] また、本発明によるソフトウェア説明書生成システムにおいては、入力するソースフ アイルにお 、て、各自然言語で書かれたコメント (コメント)間での意味の一貫性を保 つことが重要である。
[0069] 図 8は、各自然言語で書かれたコメントについて、更新が必要な箇所を示す符号を 含む入力ソースファイルの例を示す図である。図 8に示すソースファイルの例は、全 体が Helloクラスの定義を示しており、その中のメソッド sayの定義 902に対して、コメ ント 901が付与されている。ソフトウェアの仕様変更に伴いメソッド定義 902に変更が 生じた際、もしくはコメント 901に修正が加わる、という状況は、ソフトウェア開発の現 場においては頻繁に起こり得る。図 8に示すソースファイルの一例は、図 2に示された ソースファイルにおいて sayメソッドの引数の名称が repeatから linesに変更になった 状況を示している。以下に、ソースコード編集の順序を示す。
(1) :「say (int repeat)」を「say(int lines)」と変更した。
(2):それに伴い、コメント中の「@param repeat Repeating number of the greetingjを、「@param lines Number of lines for the greetingjと、英 語で記述されたコメントの内容を変更した。
(3):英語のコメントの内容を変更したが、編集者は英語以外の自然言語が読み書き できない。そのため、他の自然言語については、「@param. ja」などのタグの後ろに 、「Zupdate」という符号を付カ卩し、「@param. jaZupdateJとした。
[0070] 以上の編集作業を行うことにより、英語以外の他の自然言語について、少なくとも再 度翻訳の必要があるかどうかの判断が可能となる。このような方法の採用によって、 各自然言語で書かれたコメント間での意味の一貫性を保つことが容易になる。
[0071] 図 9は、本発明によるソフトウェア説明書生成システムにおいて更新が必要な箇所 が確認可能な説明書生成の処理手順を示す図である。この処理手順においては、こ れまでと同様に、ステップ 1001においてソースファイルを読み込み、次のステップ 10 02においてシステム内部モデルの生成を行う。そして、次のステップ 1003において 、図 4の手順に加えて、システム内部モデルにおいて、指定された自然言語(国'地 域)に、「更新が必要な旨の符号」があった場合に記録を行う過程が追加される。ステ ップ 1004においては、これまでと同様に説明書の生成を行う力 次のステップ 1005 において、更新が必要なコメントの箇所に関する情報、もしくは更新が必要な自然言 語がどれであるかを、全ステップで記録された情報を元に出力する。本発明によるソ フトウェア説明書生成システムにおいては、使用者は、この情報を元に翻訳作業を完 全に分業ィ匕することが可能になる。
[0072] なお、本発明のソフトウェア説明書生成システムにおいて、ここでの本質は、更新が 必要な旨を示す符号を付与することにあるため、本発明の適用範囲が、この実施例 で説明した例に限定されるわけではない。
[0073] また、本発明によるソフトウェア説明書生成システムは、以上で説明したそれぞれの 手段により直接、目的とする自然言語で記述されたソフトウェア説明書を生成するシ ステム ·装置 ·方法として実施しても良いが、必ずしも直接生成する実施形態を取る必 要はない。複数の種類の自然言語を用いて記述されたコメントから、目的とする自然 言語で記述されたコメントのみを抽出することによって、単一自然言語でコメントされ たソースファイルを出力する電子ファイルの変換を行う実現形態も、本発明のソフトゥ ア説明書生成システムの有効な実装である。
[0074] その概要を図 11に示す。図 11において、参照符号 1201は、これまで説明したソフ トウエア説明書生成システム ·装置 ·方法におけるものと同様のソースファイルである。 電子ファイル変換システム 1202に、その複数自然言語でコメントされたソースフアイ ル 1201が入力され、使用者が第 1自然言語を選択した場合は、コメントが第 1自然 言語で書かれたソースファイル 1203を出力し、また、使用者が第 2自然言語を選択 した場合は、コメントが第 2自然言語で書かれたソースファイル 1204を出力する。同 様に第 n自然言語で書かれたソースファイル 1205を出力する。
[0075] 出力されたソースファイル(1203、 1204、 · ··、 1205)は、それぞれ既存のソフトゥェ ァ説明書生成システム(1213、 1214、 · ··、 1215)に入力することで、目標とする各 自然言語で書かれたソフトウェア説明書(1223、 1224、 · ··、 1225)を生成することが でき、目的が達成される。既存のソフトウェア説明書生成システムを利用できるという ことは、本発明を適用して新たにシステムを開発することなしに様々な表現形態での ソフトウェア説明書が生成可能であるため、非常に有用である。
[0076] 本発明にお ヽて入力対象となるソースファイルには、自然言語の種類を表す符号と コメントの意味を示す符号とを組み合わせた符号が数多く含まれることになる。従来 のテキストエディタ上でこの種のファイルを編集作業する場合には、各自然言語でコ メントを記述する作業に加えて、上記の組み合わせ符号を記述する作業の量が増大 するため、編集作業の効率が低下するおそれがある。そのため、符号を挿入する機 構を、既存のテキストエディタのようなソフトウェア開発用の編集システムに設けること により、この問題を回避することが可能である。
[0077] さらに、多くの自然言語を用いてコメントが記述されたソースファイルをテキストェデ イタ上で編集作業することを考えてみると、取り扱う自然言語の種類が増加するにつ れてコメントとソースコードの画面上での位置が離れてしまい、編集作業が困難にな る。また、編集作業中に、編集者が自分では理解できない自然言語のコメントの一部 を誤って削除もしくは変更してしまって、そのことに気づかないという危険性がある。 そのため、必要とされる自然言語のみを編集画面上に提示する機構を、既存のテキ ストエディタのようなソフトウェア開発用の編集システムに設けることにより、この問題を 回避することが可能である。
[0078] 具体的には、多くの自然言語でコメントされたソースコードを編集する際には、本発 明における入力ソースファイルに用いる形式で記述を行 、、そのソースファイルを編 集対象として用いる。テキストエディタは、自然言語の種類を表す符号とコメントの意 味を示す符号とを組み合わせた符号を利用してコメントを各自然言語毎に識別可能 であり、必要な自然言語で記述されたコメントのみを編集者に対して提示することが 可能になる。その結果、多くの自然言語でコメントが記述されたソースコードの編集効 率の向上を図り、品質の向上を行うことが出来る。
[0079] 図 15は、ソースファイル構造の別の例を示す図である。本発明によるソフトウェア説 明書生成システムにおいて利用されるソースファイル構造としては、図 15に示すよう な形態のソースファイル構造が利用できる。図 15に示すソースファイル構造のソース ファイル 1600においては、クラス Helloのメソッド sayの説明としてコメント 1603力 引 数 paramに対する説明としてコメント 1604が付カ卩されている。これらのコメント 1603 およびコメント 1604のデータ構造は、それぞれ、機能を説明するコメント内容が機能 を表す符号「 @ ujおよび「 @ param」に続 、て複数の自然言語で記述されており、更 にその記述に用いられている自然言語の種類を示す符号「@ja」、 「@ko」、 「@ zh」 が付加されて 、るものとなって 、る。 [0080] 本発明によるソフトウェア説明書生成システムは、図 15で示されるソースファイル構 造のソースファイルを入力として用いることも有用である。すなわち、ソースコード中の あるひとつの機能を説明するコメントが、機能を表す符号に続いて複数の自然言語 で記述されており、前記コメントには、記述に用いられている自然言語の種類を示す 符号が付加されているので、複数の自然言語によるコメントを追加して記述する場合 に有効に利用できる。このようなデータ構造を入力フアイルとして用 Vヽる実現形態も、 本発明のソフトウェア説明書生成システムの有効な実装となる。 産業上の利用可能性
[0081] このように本発明のソフトウェア説明書生成システムによれば、各自然言語で書か れたコメントおよびソースコードを単一のファイル中に含むことで、各国.地域向けのソ フトウェア説明書を、単一のソースファイルから生成することができる。単一のソースフ アイルに、すべての自然言語のバージョンを保持するということは、情報源の分散を 防ぐことを意味し、一致性を保つ効果がある。ひいては各自然言語バージョン間での 不一致を削減することにつながり、説明書の作成時間の短縮、および説明書の品質 向上を同時に達成することが可能となる。
[0082] また、ソフトウェア説明書をそれぞれの自然言語別に生成することに加えて、国-地 域に応じて適切なソフトウェア説明書を生成することができ、更にきめ細力な顧客へ の対応が可能になる。更に、明示的に自然言語の種類をソースコードコメントに付与 することによって、従来は全く不可能であったソースコードコメントの機械翻訳による 生成が可能になる。これは、ソフトウェア製品を全世界的に展開する際の、コストおよ び時間の大幅な節約につながる。
[0083] また、機械翻訳を行う際に問題となる適切な訳元文章の選択に関しても、明示的な 符号の使用によって、ソフトウェアプロジェクトの意図を反映させることが可能であり、 生成されるソフトウェア説明書の品質向上に貢献する。スペルチェックもしくは文法チ エックは、従来、単一の自然言語に対して行われるものであつたが、複数の自然言語 が混在するファイルに対してスペルチェックおよび文法チェックを可能にすることで、 コメントの質を向上することができる。また、複数の自然言語によりコメントが記述され た際に問題となるコメントの不整合性についても、更新が必要となる符号を用いること により効率的に修正箇所を判断することが可能になり、更に、コメントが複数の自然 1 語で記述されたソースファイルから、単一の自然言語で記述されたソースファイルへ 変換するシステムを用いることで、既存のソフトウェア説明書生成システムの有効利 用が可能になる。

Claims

請求の範囲
[1] プログラミング言語で書かれたソースコード文および前記ソースコード文に対して付 与されたコメントを含むソースファイル内においてソースコード中のあるひとつの機能 を説明するコメントが複数の自然言語で記述されており、それぞれの自然言語の記 述には機能を表す符号と自然言語の種類を表す符号とを組み合わせた符号が付加 されて 、るソースファイルを入力する入力手段と、
入力されたソースファイルを解釈し、組み合わせた符号を識別してソースコード文と 対応づけてコメントをメモリ上に格納する格納手段と、
使用者によって指定された出力対象の自然言語の種類に相当する符号がつけら れたコメントのみを抽出する抽出手段と、
前記抽出されたコメントに基づ!/、て前記ソースコード文に対する出力対象の自然言 語のソフトウェア説明書を出力する出力手段と、
を備えることを特徴とするソフトウェア説明書生成システム。
[2] プログラミング言語で書かれたソースコード文および前記ソースコード文に対して付 与されたコメントを含むソースファイル内においてソースコード中のあるひとつの機能 を説明するコメントが複数の自然言語で記述されており、それぞれの自然言語の記 述には機能を表す符号と自然言語の種類を表す符号と更に国もしくは地域を示す符 号とを組み合わせた符号が付加されているソースファイルを入力する入力手段と、 入力されたソースファイルを解釈し、組み合わせた符号を識別してソースコード文と 対応づけてコメントをメモリ上に格納する格納手段と、
使用者によって指定された出力対象の自然言語の種類に相当する符号がつけら れたコメントのみを抽出する抽出手段と、
前記抽出されたコメントに基づ!/、て前記ソースコード文に対する出力対象の自然言 語のソフトウェア説明書を出力する出力手段と、
を備えることを特徴とするソフトウェア説明書生成システム。
[3] 請求項 1に記載のソフトウェア説明書生成システムにおいて、更に、
1つの自然言語の文を他の自然言語の文に翻訳処理する翻訳処理手段を備え、 前記抽出手段が、使用者によって指定された出力対象の自然言語の種類に相当 する符号がつけられたコメントが存在しない場合に、所定の自然言語の種類に相当 する符号がつけられたコメントを前記ソースファイル力 抽出し、
前記出力手段は、出力対象の自然言語のコメントを、翻訳処理手段により所定の自 然言語で記述されたコメントを機械翻訳し、使用者によって指定された出力対象の自 然言語のソフトウェア説明書を出力する、
ことを特徴とするソフトウェア説明書生成システム。
[4] 請求項 3に記載のソフトウェア説明書生成システムにおいて、
機械翻訳の際に訳元として用いるコメントの自然言語の種類をデフォルトで示すた めの、主たる自然言語の種類を示す符号をソースファイル中に含む
ことを特徴とするソフトウェア説明書生成システム。
[5] 請求項 1に記載のソフトウェア説明書生成システムにおいて、
コメントに付ける符号には、コメントが更新を必要とする旨の符号を含み、 前記出力手段が、コメントが更新を必要とする旨の符号に基づいて、ソースファイル にお 、て更新が必要な箇所もしくは更新が必要な言語にっ 、ての情報を出力する ことを特徴とするソフトウェア説明書生成システム。
[6] 複数の自然言語のソフトウェア説明書を出力するソフトウェア説明書生成システムを 構成するためのプログラムであり、
コンピュータを、
プログラミング言語で書かれたソースコード文および前記ソースコード文に対して付 与されたコメントを含むソースファイル内においてソースコード中のあるひとつの機能 を説明するコメントが複数の自然言語で記述されており、それぞれの自然言語の記 述には機能を表す符号と自然言語の種類を表す符号とを組み合わせた符号が付加 されて 、るソースファイルを入力する入力手段と、
入力されたソースファイルを解釈し、組み合わせた符号を識別してソースコード文と 対応づけてコメントをメモリ上に格納する格納手段と、
使用者によって指定された出力対象の自然言語の種類に相当する符号がつけら れたコメントのみを抽出する抽出手段と、
前記抽出されたコメントに基づ!/、て前記ソースコード文に対する出力対象の自然言 語のソフトウェア説明書を出力する出力手段と、
して機能させるためのプログラム。
[7] 複数の自然言語のソフトウェア説明書を出力するソフトウェア説明書生成システムを 構成するためのプログラムであり、
コンピュータを、
プログラミング言語で書かれたソースコード文および前記ソースコード文に対して付 与されたコメントを含むソースファイル内においてソースコード中のあるひとつの機能 を説明するコメントが複数の自然言語で記述されており、それぞれの自然言語の記 述には機能を表す符号と自然言語の種類を表す符号と更に国もしくは地域を示す符 号とを組み合わせた符号が付加されているソースファイルを入力する入力手段と、 入力されたソースファイルを解釈し、組み合わせた符号を識別してソースコード文と 対応づけてコメントをメモリ上に格納する格納手段と、
使用者によって指定された出力対象の自然言語の種類に相当する符号がつけら れたコメントのみを抽出する抽出手段と、
前記抽出されたコメントに基づ!/、て前記ソースコード文に対する出力対象の自然言 語のソフトウェア説明書を出力する出力手段と、
して機能させるためのプログラム。
[8] 請求項 6に記載のプログラムにおいて、
コンピュータを、更に、
1つの自然言語の文を他の自然言語の文に翻訳処理する翻訳処理手段として機 能させるサブプログラムを備え、
前記抽出手段として機能するサブプログラムは、コンピュータを、使用者によって指 定された出力対象の自然言語の種類に相当する符号がつけられたコメントが存在し ない場合に、所定の自然言語の種類に相当する符号がつけられたコメントを前記ソ 一スフアイルカ 抽出する手段として機能させ、
前記出力手段として機能するサブプログラムは、出力対象の自然言語のコメントを、 翻訳処理手段により所定の自然言語で記述されたコメントを機械翻訳し、使用者によ つて指定された出力対象の自然言語のソフトウェア説明書を出力する手段として機 能させる、
ことを特徴とするプログラム。
[9] 請求項 6に記載のプログラムにおいて、
機械翻訳の際に訳元として用いるコメントの自然言語の種類をデフォルトで示すた めの、主たる自然言語の種類を示す符号をソースファイル中に含む
ことを特徴とするプログラム。
[10] 請求項 6に記載のプログラムにおいて、
コメントに付ける符号には、コメントが更新を必要とする旨の符号を含み、 前記出力手段として機能するサブプログラムは、コンピュータを、コメントが更新を必 要とする旨の符号に基づ 、て、ソースファイルにお 、て更新が必要な箇所もしくは更 新が必要な言語についての情報を出力する手段として機能させる
ことを特徴とするプログラム。
[11] プログラミング言語で書かれたソースコード文および前記ソースコード文に対して付 与されたコメントを含むソースファイル内において、ソースコード中のあるひとつの機 能を説明するコメントが複数の自然言語で記述されており、それぞれの自然言語の 記述には機能を表す符号と自然言語の種類を表す符号とを組み合わせた符号が付 カロされていることを特徴とするソースファイルのデータ構造。
[12] プログラミング言語で書かれたソースコード文および前記ソースコード文に対して付 与されたコメントを含むソースファイル内において、ソースコード中のあるひとつの機 能を説明するコメントが、機能を表す符号に続 ヽて複数の自然言語で記述されてお り、前記コメントには、記述に用いられている自然言語の種類を示す符号が付加され て 、ることを特徴とするソースファイルのデータ構造。
PCT/JP2006/314607 2005-07-28 2006-07-25 複数自然言語のソフトウェア説明書生成システム WO2007013418A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US11/996,809 US20100146491A1 (en) 2005-07-28 2006-07-25 System for Preparing Software Documentation in Natural Languages

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005-218993 2005-07-28
JP2005218993A JP2007034813A (ja) 2005-07-28 2005-07-28 複数自然言語のソフトウェア説明書生成システム

Publications (1)

Publication Number Publication Date
WO2007013418A1 true WO2007013418A1 (ja) 2007-02-01

Family

ID=37683314

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/314607 WO2007013418A1 (ja) 2005-07-28 2006-07-25 複数自然言語のソフトウェア説明書生成システム

Country Status (3)

Country Link
US (1) US20100146491A1 (ja)
JP (1) JP2007034813A (ja)
WO (1) WO2007013418A1 (ja)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287728A (zh) * 2018-01-15 2018-07-17 武汉斗鱼网络科技有限公司 文档处理方法、文档处理装置及终端设备
US20220206759A1 (en) * 2020-12-28 2022-06-30 Temper Systems, Inc. Producing idiomatic software documentation for many programming languages from a common specification
US11836069B2 (en) 2021-02-24 2023-12-05 Open Weaver Inc. Methods and systems for assessing functional validation of software components comparing source code and feature documentation
US11836202B2 (en) 2021-02-24 2023-12-05 Open Weaver Inc. Methods and systems for dynamic search listing ranking of software components
US11853745B2 (en) 2021-02-26 2023-12-26 Open Weaver Inc. Methods and systems for automated open source software reuse scoring
US11893385B2 (en) 2021-02-17 2024-02-06 Open Weaver Inc. Methods and systems for automated software natural language documentation
US11921763B2 (en) 2021-02-24 2024-03-05 Open Weaver Inc. Methods and systems to parse a software component search query to enable multi entity search
US11947530B2 (en) 2021-02-24 2024-04-02 Open Weaver Inc. Methods and systems to automatically generate search queries from software documents to validate software component search engines
US11960492B2 (en) 2021-02-24 2024-04-16 Open Weaver Inc. Methods and systems for display of search item scores and related information for easier search result selection
US12032927B2 (en) * 2022-02-04 2024-07-09 Temper Systems, Inc. Producing idiomatic software documentation for many programming languages from a common specification

Families Citing this family (49)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7672740B1 (en) * 2006-09-28 2010-03-02 Rockwell Automation Technologies, Inc. Conditional download of data from embedded historians
US7742833B1 (en) 2006-09-28 2010-06-22 Rockwell Automation Technologies, Inc. Auto discovery of embedded historians in network
US8181157B2 (en) * 2006-09-29 2012-05-15 Rockwell Automation Technologies, Inc. Custom language support for project documentation and editing
JP2008186311A (ja) * 2007-01-31 2008-08-14 National Institute Of Advanced Industrial & Technology 複数種類の自然言語でコメントが記述されたソースファイルのファイル変換システム
US8429626B2 (en) 2007-02-15 2013-04-23 Microsoft Corporation Packaging content updates
JP2008269517A (ja) * 2007-04-25 2008-11-06 Funai Electric Co Ltd ファイル管理方法
US7930261B2 (en) 2007-09-26 2011-04-19 Rockwell Automation Technologies, Inc. Historians embedded in industrial units
WO2009088286A2 (en) * 2008-01-09 2009-07-16 Thranx Investment B.V. Method for creating sub-query related memory stores
US9141393B2 (en) * 2011-11-17 2015-09-22 EnterCalo, Inc. Business content authoring and distribution
US8607193B2 (en) 2012-01-16 2013-12-10 International Business Machines Corporation Tracking stale comments in source code listings
US9468162B2 (en) 2012-08-01 2016-10-18 Rain Bird Corporation Irrigation controller wireless network adapter and networked remote service
US8762133B2 (en) 2012-08-30 2014-06-24 Arria Data2Text Limited Method and apparatus for alert validation
US9355093B2 (en) 2012-08-30 2016-05-31 Arria Data2Text Limited Method and apparatus for referring expression generation
US9336193B2 (en) 2012-08-30 2016-05-10 Arria Data2Text Limited Method and apparatus for updating a previously generated text
US9135244B2 (en) 2012-08-30 2015-09-15 Arria Data2Text Limited Method and apparatus for configurable microplanning
US8762134B2 (en) 2012-08-30 2014-06-24 Arria Data2Text Limited Method and apparatus for situational analysis text generation
US9405448B2 (en) 2012-08-30 2016-08-02 Arria Data2Text Limited Method and apparatus for annotating a graphical output
US9323736B2 (en) 2012-10-05 2016-04-26 Successfactors, Inc. Natural language metric condition alerts generation
US20140100923A1 (en) * 2012-10-05 2014-04-10 Successfactors, Inc. Natural language metric condition alerts orchestration
US9600471B2 (en) 2012-11-02 2017-03-21 Arria Data2Text Limited Method and apparatus for aggregating with information generalization
EP2730159B1 (en) 2012-11-07 2019-03-20 Rain Bird Corporation Irrigation control system
WO2014076525A1 (en) 2012-11-16 2014-05-22 Data2Text Limited Method and apparatus for expressing time in an output text
WO2014076524A1 (en) 2012-11-16 2014-05-22 Data2Text Limited Method and apparatus for spatial descriptions in an output text
WO2014102568A1 (en) 2012-12-27 2014-07-03 Arria Data2Text Limited Method and apparatus for motion detection
WO2014102569A1 (en) 2012-12-27 2014-07-03 Arria Data2Text Limited Method and apparatus for motion description
WO2014111753A1 (en) 2013-01-15 2014-07-24 Arria Data2Text Limited Method and apparatus for document planning
WO2015028844A1 (en) 2013-08-29 2015-03-05 Arria Data2Text Limited Text generation from correlated alerts
US9396181B1 (en) 2013-09-16 2016-07-19 Arria Data2Text Limited Method, apparatus, and computer program product for user-directed reporting
US9244894B1 (en) 2013-09-16 2016-01-26 Arria Data2Text Limited Method and apparatus for interactive reports
US9519477B2 (en) * 2013-09-16 2016-12-13 International Business Machines Corporation Automatic pre-detection of potential coding issues and recommendation for resolution actions
US9710263B2 (en) * 2013-09-26 2017-07-18 International Business Machines Corporation Understanding computer code with human language assistance
US9038004B2 (en) 2013-10-23 2015-05-19 International Business Machines Corporation Automated integrated circuit design documentation
US9442720B2 (en) * 2014-02-26 2016-09-13 Paypal, Inc. Adding on-the-fly comments to code
US10664558B2 (en) 2014-04-18 2020-05-26 Arria Data2Text Limited Method and apparatus for document planning
KR101588027B1 (ko) * 2014-10-10 2016-01-25 (주)씽크포비엘 소프트웨어 현지화를 위한 테스트 케이스 생성 장치 및 방법
US10120661B2 (en) * 2015-07-16 2018-11-06 Sugarcrm Inc. Multi-flavored software execution from a singular code base
CN107526742B (zh) * 2016-06-21 2021-10-08 伊姆西Ip控股有限责任公司 用于处理多语言文本的方法和设备
WO2018013964A1 (en) 2016-07-15 2018-01-18 Rain Bird Corporation Wireless remote irrigation control
US10445432B1 (en) 2016-08-31 2019-10-15 Arria Data2Text Limited Method and apparatus for lightweight multilingual natural language realizer
US10467347B1 (en) 2016-10-31 2019-11-05 Arria Data2Text Limited Method and apparatus for natural language document orchestrator
US10331415B2 (en) * 2016-11-08 2019-06-25 International Business Machines Corporation Formal specification generation using examples
US10656938B2 (en) 2018-09-25 2020-05-19 International Business Machines Corporation External comment storage and organization
US10877737B2 (en) 2018-12-26 2020-12-29 Paypal, Inc. Automatic translation of computer code
US11630655B2 (en) * 2019-06-26 2023-04-18 International Business Machines Corporation Merging data structure definitions
US11176329B2 (en) 2020-02-18 2021-11-16 Bank Of America Corporation Source code compiler using natural language input
US11250128B2 (en) 2020-02-18 2022-02-15 Bank Of America Corporation System and method for detecting source code anomalies
US11468223B2 (en) * 2020-08-19 2022-10-11 Wells Fargo Bank, N.A. Model documentation generation system
CN112925563B (zh) * 2021-02-24 2022-01-04 南通大学 一种面向代码重用的源代码推荐方法
US11620127B2 (en) * 2021-05-11 2023-04-04 Sap Se Measuring documentation completeness in multiple languages

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06242935A (ja) * 1993-02-16 1994-09-02 Nec Software Ltd 操作手順書作成システム
JP2000020525A (ja) * 1998-07-07 2000-01-21 Toshiba Corp プログラム注釈機械翻訳装置とこの装置を動作させるプログラムを記録した記録媒体
WO2000050988A1 (fr) * 1999-02-24 2000-08-31 Fujitsu Limited Appareil pour preparer des specifications de programmes, procedes pour preparer des specifications de programmes et support d'informations servant a enregistrer un programme destine a preparer des specifications de programmes
JP2004192330A (ja) * 2002-12-11 2004-07-08 Fuji Photo Film Co Ltd 文字情報表示方法および装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03226834A (ja) * 1990-02-01 1991-10-07 Mitsubishi Electric Corp プログラム図生成ツール
US5452206A (en) * 1991-09-19 1995-09-19 Pacific Bell Method for generating documentation for computer software
US5408667A (en) * 1993-07-19 1995-04-18 Motorola, Inc. Method for unified design documentation
US7107206B1 (en) * 1999-11-17 2006-09-12 United Nations Language conversion system
US6951010B2 (en) * 2000-09-19 2005-09-27 Fujitsu Limited Program specification generating system
US6674639B2 (en) * 2001-09-06 2004-01-06 High Tech Computer, Corp. Protective cover with ternary structure
JP2003099260A (ja) * 2001-09-26 2003-04-04 Seiko Epson Corp 対話型エキスパートシステム及びプログラム
JP2004280585A (ja) * 2003-03-17 2004-10-07 Koyo Seiko Co Ltd ラダープログラム編集装置
JP2004280995A (ja) * 2003-03-18 2004-10-07 Matsushita Electric Ind Co Ltd デジタルデータ再生装置
US20050010895A1 (en) * 2003-07-09 2005-01-13 Mr. Parama Reddappagari Software Specification Processing System
JP2005063121A (ja) * 2003-08-11 2005-03-10 Ricoh Co Ltd ソースコード変換装置、及びソースコード変換方法、ソースコード変換プログラム、記憶媒体

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06242935A (ja) * 1993-02-16 1994-09-02 Nec Software Ltd 操作手順書作成システム
JP2000020525A (ja) * 1998-07-07 2000-01-21 Toshiba Corp プログラム注釈機械翻訳装置とこの装置を動作させるプログラムを記録した記録媒体
WO2000050988A1 (fr) * 1999-02-24 2000-08-31 Fujitsu Limited Appareil pour preparer des specifications de programmes, procedes pour preparer des specifications de programmes et support d'informations servant a enregistrer un programme destine a preparer des specifications de programmes
JP2004192330A (ja) * 2002-12-11 2004-07-08 Fuji Photo Film Co Ltd 文字情報表示方法および装置

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287728A (zh) * 2018-01-15 2018-07-17 武汉斗鱼网络科技有限公司 文档处理方法、文档处理装置及终端设备
US20220206759A1 (en) * 2020-12-28 2022-06-30 Temper Systems, Inc. Producing idiomatic software documentation for many programming languages from a common specification
US11893385B2 (en) 2021-02-17 2024-02-06 Open Weaver Inc. Methods and systems for automated software natural language documentation
US11836069B2 (en) 2021-02-24 2023-12-05 Open Weaver Inc. Methods and systems for assessing functional validation of software components comparing source code and feature documentation
US11836202B2 (en) 2021-02-24 2023-12-05 Open Weaver Inc. Methods and systems for dynamic search listing ranking of software components
US11921763B2 (en) 2021-02-24 2024-03-05 Open Weaver Inc. Methods and systems to parse a software component search query to enable multi entity search
US11947530B2 (en) 2021-02-24 2024-04-02 Open Weaver Inc. Methods and systems to automatically generate search queries from software documents to validate software component search engines
US11960492B2 (en) 2021-02-24 2024-04-16 Open Weaver Inc. Methods and systems for display of search item scores and related information for easier search result selection
US11853745B2 (en) 2021-02-26 2023-12-26 Open Weaver Inc. Methods and systems for automated open source software reuse scoring
US12032927B2 (en) * 2022-02-04 2024-07-09 Temper Systems, Inc. Producing idiomatic software documentation for many programming languages from a common specification

Also Published As

Publication number Publication date
US20100146491A1 (en) 2010-06-10
JP2007034813A (ja) 2007-02-08

Similar Documents

Publication Publication Date Title
WO2007013418A1 (ja) 複数自然言語のソフトウェア説明書生成システム
KR100661393B1 (ko) 웹 프로그래밍 환경을 응용한 웹사이트 관리 시스템 및방법
JP4396994B2 (ja) リソース・ファイルの翻訳検証方法、装置、およびプログラム
EP0528640A2 (en) Computer system for generating a user interface
US8468494B2 (en) In-line editor
US20080288239A1 (en) Localization and internationalization of document resources
US20140006913A1 (en) Visual template extraction
US7784026B1 (en) Web application internationalization
US9817887B2 (en) Universal text representation with import/export support for various document formats
JP2004502241A (ja) オンライン環境内で複数言語コンテンツを提供する装置及びその方法
CA2764012A1 (en) Computer-implemented method, system and computer program product for displaying a user interface component
US20040237036A1 (en) Methods and systems for generating supporting files for commands
JP4724387B2 (ja) プログラム変換プログラム、プログラム変換装置およびプログラム変換方法
Antonelli et al. A model-driven development for creating accessible web menus
Schröpfer et al. A Generic Projectional Editor for EMF Models.
JP5994150B2 (ja) 文書作成方法、文書作成装置及び文書作成プログラム
Poore Codebraid: Live Code in Pandoc Markdown.
Mittelbach et al. LATEX Tagged PDF Feasibility Evaluation
WO2001077882A1 (en) System and method for generating computer source code
JP2008186311A (ja) 複数種類の自然言語でコメントが記述されたソースファイルのファイル変換システム
CN113741900B (zh) 一种前端页面应用的开发方法、装置及相关设备
EP4261678A1 (en) Generation of a technical instruction
Söderberg Automation of non-code documentation in a DevOps environment
JP2008204446A (ja) ソースファイル編集システム
Wiriyakul et al. A visual editor for language-independent scripting for BPMN modeling

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 11996809

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06781519

Country of ref document: EP

Kind code of ref document: A1