













本発明の実施形態は、文書不備検出プログラム、文書不備検出装置および文書不備検出方法に関する。 Embodiments described herein relate generally to a document defect detection program, a document defect detection apparatus, and a document defect detection method.
ソフトウェア開発では、仕様を記述した仕様書をもとにソフトウェアが構築されている。このようなソフトウェアの仕様書の多くは自然言語で記述される。仕様作成者が自然言語で仕様を記述するとき、意図した通りに記述することが難しく、仕様書内に不備が存在してしまうことがある。仕様書の不備を見つけるために人手によるレビューなども行われるが、近年のソフトウェア開発の大規模、複雑化に伴い仕様の規模が大きくなっているため、すべてを人手でチェックすることは難しい。このため、仕様作成者が意図した通りの内容となっていない仕様書の不備を自動で検出できる仕組みの構築が望まれている。 In software development, software is built on the basis of specifications describing specifications. Many of these software specifications are written in natural language. When a specification writer writes a specification in a natural language, it is difficult to write it as intended, and there may be deficiencies in the specification. Manual reviews are performed to find deficiencies in specifications, but it is difficult to check everything manually because the scale of specifications has increased with the recent large-scale and complex software development. For this reason, there is a demand for the construction of a mechanism that can automatically detect deficiencies in specifications that are not as intended by the specification creator.
なお、このようなニーズはソフトウェアの仕様書に限らず、文書作成者がある意図をもって自然言語で記述した文書において共通のニーズである。 Such needs are not limited to software specifications, but are common needs for documents written in natural language with the intention of the document creator.
本発明が解決しようとする課題は、自然言語で記述された文書の不備、特にその文書が文書作成者の意図した通りの内容となっていない不備を自動で検出できる文書不備検出プログラム、文書不備検出装置および文書不備検出方法を提供することである。 The problem to be solved by the present invention is a document defect detection program capable of automatically detecting a defect in a document described in a natural language, particularly a defect in which the document does not have the content intended by the document creator. To provide a detection device and a document defect detection method.
実施形態の文書不備検出プログラムは、コンピュータに、カテゴリ判定部の機能と、カテゴリ関係判定部の機能と、不備検出部の機能と、を実現させる。カテゴリ判定部は、前記文書中の文節に対応するノード要素と、2つのノード要素を繋ぐエッジ要素とを含むモデル要素から構成され、前記文書の内容を有向グラフで表した文書分析モデルと、前記文書における文節よりも大きい所定単位の文書要素ごとに意味的な分類を表すカテゴリを対応付けたカテゴリ情報とを取得し、前記文書分析モデルを構成する各モデル要素が属するカテゴリを、前記カテゴリ情報に基づいて判定する。カテゴリ関係判定部は、前記カテゴリ判定部の判定結果を、予め定められたカテゴリ関係判定ルールと照合して、前記文書分析モデルにおける複数のカテゴリ間の関係を判定する。不備検出部は、前記文書の作成者が意図する複数のカテゴリ間の関係を示すカテゴリ関係制約情報を取得し、前記カテゴリ関係判定部により判定された複数のカテゴリ間の関係を、前記カテゴリ関係制約情報と照合して、前記文書の不備を検出する。前記文書分析モデルの各ノード要素は、前記文書中で当該ノード要素に対応する文節が出現する前記文書要素の識別情報を保持する。前記カテゴリ判定部は、前記識別情報と前記カテゴリ情報とに基づいて前記文書分析モデルの各ノード要素が属するカテゴリを判定し、同じカテゴリに属すると判定した2つのノード要素を繋ぐエッジ要素を、2つのノード要素と同じカテゴリに属すると判定する。前記カテゴリ関係判定ルールは、ノード要素の入力側のエッジ要素が属するカテゴリと、当該ノード要素の出力側のエッジ要素が属するカテゴリとが異なる場合に、これら2つのカテゴリ間に順序関係があると判定するルールを含む。The document defect detection program according to the embodiment causes a computer to realize a function of a category determination unit, a function of a category relationship determination unit, and a function of a defect detection unit. The category determination unitincludes a model element including a node element corresponding to a clause in the document and an edge element that connects two node elements, and a document analysis model that represents the content of the document in a directed graph; and the document Category information in which a category representing a semantic classification is associated with each document element in a predetermined unitlarger than a clause in the category, and a category to which each model element constituting the document analysis model belongs is based on the category information. Judgment. The category relationship determination unit determines the relationship between a plurality of categories in the document analysis model by comparing the determination result of the category determination unit with a predetermined category relationship determination rule. The deficiency detection unit acquires category relationship constraint information indicating a relationship between a plurality of categories intended by the creator of the document, and the relationship between the plurality of categories determined by the category relationship determination unit is determined as the category relationship constraint. The deficiency of the document is detected by collating with the information.Each node element of the document analysis model holds identification information of the document element in which a clause corresponding to the node element appears in the document. The category determination unit determines a category to which each node element of the document analysis model belongs based on the identification information and the category information, and determines an edge element connecting two node elements determined to belong to the same category as 2 Judged to belong to the same category as one node element. When the category to which the edge element on the input side of the node element belongs and the category to which the edge element on the output side of the node element are different from each other, the category relationship determination rule determines that there is an order relationship between the two categories. Including rules to do.
以下、実施形態の文書不備検出プログラム、文書不備検出装置および文書不備検出方法を、図面を参照して詳細に説明する。 Hereinafter, a document defect detection program, a document defect detection apparatus, and a document defect detection method according to an embodiment will be described in detail with reference to the drawings.
<実施形態の概要>
  まず、本実施形態の概要について説明する。本実施形態は、自然言語で記述された文書の不備、特にその文書が文書作成者の意図した通りの内容となっていない不備を自動で検出するものである。以下では、自然言語で記述された文書の一例として、ソフトウェア開発において作成される仕様書を例に挙げて説明する。仕様書は仕様を記述した文書である。本実施形態では、仕様書に含まれる個々の文をそれぞれ「仕様文」と呼ぶ。文は句点間の文字列であり、1以上の文節を含む。仕様書は通常、複数の仕様文の集合として作成される。<Outline of Embodiment>
 First, an outline of the present embodiment will be described. In the present embodiment, a defect in a document described in a natural language, particularly a defect in which the document does not have the contents intended by the document creator, is automatically detected. Hereinafter, as an example of a document written in a natural language, a description will be given taking a specification created in software development as an example. The specification is a document describing the specification. In this embodiment, each sentence included in the specification is called a “specification sentence”. A sentence is a character string between punctuation marks and includes one or more clauses. The specification is usually created as a set of a plurality of specification sentences.
本実施形態では、仕様作成者が仕様を記述する上で想定しているソフトウェアが満たすべき大局的な振る舞いを、「仕様の意図」と呼ぶ。この仕様の意図は、仕様をカテゴリに分類したときのカテゴリ間の関係(特に因果関係)で表現することができる。ここでカテゴリとは、仕様の意味的な分類を表す。例えば、複数の機能を実現するソフトウェアの仕様では、各機能のそれぞれを1つのカテゴリと捉えることができる。また、機能以外にも、例えば、機器構成や状態ごとにカテゴリを設定することもできる。 In the present embodiment, the global behavior that should be satisfied by the software assumed by the specification creator in describing the specification is referred to as “specification intention”. The intention of this specification can be expressed by a relationship between categories (particularly a causal relationship) when the specification is classified into categories. Here, the category represents a semantic classification of the specification. For example, in the specification of software that realizes a plurality of functions, each function can be regarded as one category. In addition to functions, for example, a category can be set for each device configuration and state.
カテゴリ間の因果関係とは、あるカテゴリと別のカテゴリとの間に存在する因果の関係性を表す。カテゴリ間の因果関係には、「順序関係」と「並行・選択の関係」とが含まれる。順序関係は、あるカテゴリに属する仕様と別のカテゴリに属する仕様とが順番に実施されるという関係性を表す。並行・選択の関係は、あるカテゴリに属する仕様と別のカテゴリに属する仕様とが同じタイミングで実施される、または、ある共通した条件をもとにどちらかの仕様のみが実施されるという関係性を表す。 The causal relationship between categories represents a causal relationship existing between a certain category and another category. The causal relationship between categories includes “order relationship” and “parallel / selection relationship”. The order relationship represents a relationship in which specifications belonging to a certain category and specifications belonging to another category are executed in order. The parallel / selection relationship is such that a specification belonging to one category and a specification belonging to another category are executed at the same timing, or only one of the specifications is executed based on a certain common condition. Represents.
カテゴリ間に因果関係があるならば、それらのカテゴリに属する仕様間にも因果関係が存在する。仕様書が仕様作成者の意図した通りの内容となっていない不備を検出するとは、仕様書が仕様の意図、つまり仕様作成者が意図したカテゴリ間の因果関係を満たしていないことを検出することである。 If there is a causal relationship between categories, there is also a causal relationship between specifications belonging to those categories. Detecting a deficiency that the specification does not have the contents intended by the specification creator means detecting that the specification does not satisfy the intention of the specification, that is, the causal relationship between categories intended by the specification creator. It is.
本実施形態では、仕様書の分析に「文書分析モデル」を用いる。文書分析モデルは、文書(本実施形態では仕様書)の内容を有向グラフで表したモデルである。本実施形態では、文書分析モデルを用いて仕様を分析することにより、文書分析モデルにおける複数のカテゴリ間の因果関係を判定する。この判定には、「カテゴリ情報」と「カテゴリ関係判定ルール」とを用いる。カテゴリ情報は、仕様書に含まれる各仕様文に対してカテゴリを対応付けた情報であり、例えば仕様作成者によって仕様書とは別途作成され、本実施形態の文書不備検出装置に対して外部入力される。また、カテゴリ関係判定ルールは、文書分析モデルを構成する各モデル要素が属しているカテゴリをもとに、文書分析モデルにおける複数のカテゴリ間の因果関係を判定するためのルールであり、予め定められて本実施形態の文書不備検出装置に保持されている。 In the present embodiment, a “document analysis model” is used for the analysis of specifications. The document analysis model is a model in which the contents of a document (specifications in this embodiment) are represented by a directed graph. In the present embodiment, the causal relationship between a plurality of categories in the document analysis model is determined by analyzing the specification using the document analysis model. For this determination, “category information” and “category relationship determination rule” are used. The category information is information in which a category is associated with each specification sentence included in the specification, for example, created separately from the specification by the specification creator, and externally input to the document defect detection device of this embodiment. Is done. The category relationship determination rule is a rule for determining the causal relationship between a plurality of categories in the document analysis model based on the category to which each model element constituting the document analysis model belongs. Are held in the document defect detection device of this embodiment.
本実施形態の文書不備検出装置は、カテゴリ情報に基づいて文書分析モデルを構成する各モデル要素が属するカテゴリを判定する。そして、その判定結果をカテゴリ関係判定ルールと照合することにより、文書分析モデルにおける複数のカテゴリ間の因果関係を判定する。なお、カテゴリ情報は仕様文単位に限らず、仕様書における所定単位の文書要素ごとにカテゴリが対応付けられた情報であればよい。所定単位は文よりも小さな単位である文節であってもよいし、文よりも大きな単位である段落などであってもよい。 The document defect detection device of this embodiment determines a category to which each model element constituting the document analysis model belongs based on the category information. And the causal relationship between the some categories in a document analysis model is determined by collating the determination result with a category relationship determination rule. The category information is not limited to a specification sentence unit, and may be information in which a category is associated with each predetermined document element in the specification. The predetermined unit may be a clause that is a unit smaller than a sentence, or may be a paragraph that is a unit larger than a sentence.
また、本実施形態では、以上のように判定した文書分析モデルにおけるカテゴリ間の因果関係が、仕様作成者の意図したカテゴリ間の因果関係と一致するか否かを検査することにより、仕様書の不備を検出する。仕様作成者の意図したカテゴリ間の因果関係は、「カテゴリ関係制約情報」によって示される。カテゴリ関係制約情報は、カテゴリ情報と同様に、例えば仕様作成者によって仕様書とは別途作成され、本実施形態の文書不備検出装置に対して外部入力される。つまり、このカテゴリ関係制約情報は、上述のカテゴリ情報とともに、仕様の意図を表す情報として本実施形態の文書不備検出装置に入力される。本実施形態の文書不備検出装置は、カテゴリ関係判定ルールを用いて判定した文書分析モデルにおける複数のカテゴリ間の因果関係をカテゴリ関係制約情報と照合することにより、カテゴリ関係制約情報で示されるカテゴリ間の因果関係(これを「カテゴリ関係制約」と呼ぶ)を仕様書が満たしているかどうかを判定し、カテゴリ関係制約を満たしていない場合にそれを仕様書の不備として検出する。 In the present embodiment, by checking whether the causal relationship between categories in the document analysis model determined as described above matches the causal relationship between categories intended by the specification creator, Detect deficiencies. The causal relationship between categories intended by the specification creator is indicated by “category relationship constraint information”. Like the category information, the category relationship constraint information is created separately from the specification document by, for example, a specification creator, and is externally input to the document defect detection device of this embodiment. That is, this category relationship constraint information is input to the document defect detection apparatus of the present embodiment as information indicating the intention of the specification together with the above-described category information. The document defect detection device according to the present embodiment compares the causal relationship between a plurality of categories in the document analysis model determined using the category relationship determination rule with the category relationship constraint information, so that the categories between the categories indicated by the category relationship constraint information It is determined whether or not the specification satisfies the causal relationship (referred to as “category relationship constraint”), and if the category relationship constraint is not satisfied, it is detected as an incomplete specification.
  仕様書の内容を有向グラフで表した文書分析モデルとしては、下記の参考文献に記載されている「要求分析モデル」を利用することができる。本実施形態では、下記の参考文献に記載されている装置によって検証の対象となる仕様書の文書分析モデルが事前に生成され、文書不備検出装置に対して外部入力されるものとする。仕様書から文書分析モデルを生成する処理は、文書不備検出装置の内部で行ってもよい。なお、本実施形態では、下記の参考文献において「要求分析モデル要素の構成部品」と呼んでいるノードやエッジを、モデル要素(「ノード要素」、「エッジ要素」)と呼ぶ。文書分析モデルは、ノード要素とエッジ要素とを含む複数のモデル要素により構成される。
  参考文献:特開2014−238697号公報As a document analysis model in which the contents of the specification are represented by a directed graph, a “requirement analysis model” described in the following reference can be used. In the present embodiment, it is assumed that a document analysis model of a specification to be verified is generated in advance by an apparatus described in the following reference and is externally input to the document defect detection apparatus. The process of generating the document analysis model from the specification document may be performed inside the document defect detection device. In this embodiment, nodes and edges called “components of requirement analysis model elements” in the following references are called model elements (“node elements” and “edge elements”). The document analysis model is composed of a plurality of model elements including node elements and edge elements.
 Reference: JP 2014-238697 A
なお、文書分析モデルは、文書の内容を有向グラフで表したモデルであればよく、参考文献に記載の要求分析モデル以外の他のモデルを用いてもよい。文書の内容を有向フラグで表したモデルとは、例えば、データフローダイヤグラムをベースに制御の主体が切り替わることを表したモデル、異なるノード間でデータの授受が存在することを表したモデルなどである。 Note that the document analysis model may be a model in which the content of the document is represented by a directed graph, and other models than the requirement analysis model described in the reference may be used. A model that represents the contents of a document with a directed flag is, for example, a model that indicates that the subject of control is switched based on a data flow diagram, or a model that indicates that data is exchanged between different nodes. is there.
<装置構成>
  次に、本実施形態の文書不備検出装置の具体的な構成例について説明する。図1は、本実施形態の文書不備検出装置10のハードウェア構成例を示すブロック図である。本実施形態の文書不備検出装置10は、例えば、通常のコンピュータとしてのハードウェアを備え、このハードウェアとソフトウェア(文書不備検出プログラム)との協働により、自然言語で記述された仕様書の不備、特にその仕様書が仕様作成者の意図した通りの内容となっていない不備を自動で検出する。<Device configuration>
 Next, a specific configuration example of the document defect detection device of this embodiment will be described. FIG. 1 is a block diagram illustrating a hardware configuration example of a document
  すなわち、本実施形態の文書不備検出装置10は、例えば図1に示すように、情報処理を行うCPU101、BIOSなどを記憶した読み出し専用メモリであるROM102、各種データを書き換え可能に記憶するRAM103、各種のデータやプログラムを格納するHDD104、記憶媒体110を用いて情報を保管したり外部に情報を配布したり外部から情報を入手するための媒体駆動装置105、ユーザがCPU101に命令や情報などを入力するためのキーボードやマウスなどの入力装置106、および、処理経過や結果などをユーザに表示する液晶ディスプレイなどの表示装置107などを備え、これら各部間で送受信されるデータをバスコントローラ108が調停して動作する。  That is, the document
  このようなハードウェア構成を有する文書不備検出装置10では、ユーザが電源を投入するとCPU101がROM102内のローダーというプログラムを起動させ、HDD104よりOS(Operating  System)というコンピュータのハードウェアとソフトウェアとを管理するプログラムをRAM103に読み込み、このOSを起動させる。このようなOSは、ユーザの操作に応じてプログラムを起動したり、情報を読み込んだり、保存を行ったりする。OSのうち代表的なものとしては、Windows(登録商標)、UNIX(登録商標)などが知られている。これらのOS上で動作するプログラムをアプリケーションプログラムと呼んでいる。なお、アプリケーションプログラムは、所定のOS上で動作するものに限らず、後述の各種処理の一部の実行をOSに肩代わりさせるものであってもよいし、所定のアプリケーションソフトやOSなどを構成する一群のプログラムファイルの一部として含まれているものであってもよい。  In the document
  ここで、本実施形態の文書不備検出装置10は、アプリケーションプログラムとして、本実施形態の文書不備検出プログラムをHDD104に記憶している。本実施形態の文書不備検出プログラムは、例えば、CD−ROMやDVDなどの各種の光ディスク、各種光磁気ディスク、フレキシブルディスクなどの各種磁気ディスク、半導体メモリなどの各種方式のメディアなどの記憶媒体110に記録されて提供され、HDD104にインストールされる。また、本実施形態の文書不備検出プログラムは、例えばネットワークを利用した通信により外部からダウンロードされ、HDD104にインストールされてもよい。  Here, the document
  以上のようなハードウェア構成を採用する場合、CPU101がOS上で動作する文書不備検出プログラムに従って各種の演算処理を実行することにより、コンピュータを本実施形態の文書不備検出装置10として動作させて、後述の機能的な構成要素をコンピュータ上で実現させることができる。なお、本実施形態では、文書不備検出装置10を構成する後述の機能的な構成要素のすべてをコンピュータ上で実現することを想定するが、これら機能的な構成要素の一部あるいは全部を、例えば、ASIC(Application  Specific  Integrated  Circuit)やFPGA(Field-programmable  Gate  Array)などの専用のハードウェアを用いて実現することもできる。  When adopting the hardware configuration as described above, the
  また、本実施形態では、文書不備検出装置10が単体の装置として構成されていることを想定するが、文書不備検出装置10は単体の装置として構成されている必要はなく、物理的に分離されてネットワークを介して接続された複数の装置により構成されていてもよい。また、文書不備検出装置10は、例えば、クラウドシステム上で動作する仮想マシンとして実現されていてもよい。  In this embodiment, it is assumed that the document
  図2は、本実施形態の文書不備検出装置10の機能的な構成例を示すブロック図である。本実施形態の文書不備検出装置10は、上述の文書不備検出プログラムを実行することにより実現される機能的な構成要素として、カテゴリ判定部11と、カテゴリ関係判定部12と、不備検出部13とを備える。  FIG. 2 is a block diagram illustrating a functional configuration example of the document
カテゴリ判定部11は、文書分析モデルD1とカテゴリ情報D2とを取得し、カテゴリ情報D2に基づいて文書分析モデルD1を構成する各モデル要素が属するカテゴリを判定し、カテゴリ判定結果D3を生成する。 The category determination unit 11 acquires the document analysis model D1 and the category information D2, determines a category to which each model element constituting the document analysis model D1 belongs based on the category information D2, and generates a category determination result D3.
  文書分析モデルD1は、上述のように、検証の対象となる仕様書の内容を有向グラフで表したものであり、本実施形態の文書不備検出装置10に対して外部入力されて、カテゴリ判定部11により取得される。文書分析モデルD1は、複数のモデル要素から構成される。モデル要素には、検証の対象となる仕様書の仕様文中に出現する文節に対応したノード要素と、2つのノード要素を繋ぐエッジ要素とが含まれる。  As described above, the document analysis model D1 represents the contents of the specification to be verified as a directed graph. The document analysis model D1 is externally input to the document
ノード要素は、要素名、要素タイプ、および出現箇所データを持つ。要素名は、当該ノード要素を一意に識別するための文字列である。要素タイプは、当該ノード要素のタイプを示す。本実施形態では、ノード要素のタイプは、データフローダイヤグラムの形式における「プロセス」または「データストア」であることを想定するが、これに限らない。出現箇所データは、検証の対象となる仕様書において当該ノード要素に対応する文節が出現する仕様文の識別情報(仕様文識別子)である。当該ノード要素が複数の仕様文で出現する場合は、それら複数の仕様文の識別情報のすべてが出現箇所データに含まれる。なお、カテゴリ情報D2が仕様文単位ではなく、ノード要素に対応する文節単位でカテゴリを対応付けた情報である場合は、ノード要素が出現箇所データを持たない構成であってもよい。 A node element has an element name, an element type, and appearance location data. The element name is a character string for uniquely identifying the node element. The element type indicates the type of the node element. In the present embodiment, it is assumed that the type of the node element is “process” or “data store” in the form of a data flow diagram, but is not limited thereto. The appearance location data is identification information (specification sentence identifier) of a specification sentence in which a clause corresponding to the node element appears in the specification to be verified. When the node element appears in a plurality of specification sentences, all the identification information of the plurality of specification sentences is included in the appearance location data. In addition, when the category information D2 is information that associates a category with a phrase unit corresponding to a node element instead of a specification sentence unit, the node element may have a configuration that does not have appearance location data.
エッジ要素は、要素名、要素タイプ、ソースノード名、およびターゲットノード名を持つ。要素名は、当該エッジ要素を一意に識別するための文字列である。要素タイプは、当該エッジ要素のタイプを示す。本実施形態では、エッジ要素のタイプは、データフローダイヤグラムの形式における「データフロー」であることを想定するが、これに限らない。ソースノード名は、当該エッジ要素の尾側のノード要素の要素名である。ターゲットノード名は、当該エッジ要素の頭側のノード要素の要素名である。 An edge element has an element name, an element type, a source node name, and a target node name. The element name is a character string for uniquely identifying the edge element. The element type indicates the type of the edge element. In the present embodiment, it is assumed that the edge element type is “data flow” in the form of a data flow diagram, but the present invention is not limited to this. The source node name is the element name of the node element on the tail side of the edge element. The target node name is the element name of the node element on the head side of the edge element.
図3は、検証の対象となる仕様書の具体例を示す図であり、図4は、図3に示す仕様書から生成される文書分析モデルD1の一例を示す図である。図3に例示する仕様書は、エレベータのフロアボタンを押したときのリフトの移動に関する仕様、特に、フロアボタンを2回押したときにキャンセルする処理を含む仕様を記述したものである。この図3に示す仕様書に対して構文解析を含む自然言語解析を行うことにより、例えば図4に示すように、データフローダイヤグラムの形式で表現可能な文書分析モデルD1が生成される。この図4に例示する文書分析モデルD1において、プロセスやデータストアで表されるモデル要素がノード要素であり、データフローで表されるモデル要素がエッジ要素である。なお、検証の対象となる仕様書から文書分析モデルD1を生成する処理の具体的な内容については、上述の参考文献に記載されているため、ここでは詳細な説明を省略する。 FIG. 3 is a diagram showing a specific example of a specification to be verified, and FIG. 4 is a diagram showing an example of a document analysis model D1 generated from the specification shown in FIG. The specification document illustrated in FIG. 3 describes the specifications relating to the movement of the lift when the floor button of the elevator is pressed, particularly the specifications including the process of canceling when the floor button is pressed twice. By performing natural language analysis including syntactic analysis on the specification shown in FIG. 3, for example, as shown in FIG. 4, a document analysis model D1 that can be expressed in the form of a data flow diagram is generated. In the document analysis model D1 illustrated in FIG. 4, model elements represented by processes and data stores are node elements, and model elements represented by data flows are edge elements. Note that the specific contents of the process of generating the document analysis model D1 from the specification to be verified are described in the above-mentioned reference, and thus detailed description thereof is omitted here.
  カテゴリ情報D2は、上述のように、検証の対象となる仕様書に含まれる各仕様文に対してカテゴリを対応付けた情報であり、例えば、仕様作成者によって仕様書とは別途作成される。このカテゴリ情報D2は、本実施形態の文書不備検出装置10に対して外部入力されて、カテゴリ判定部11により取得される。  As described above, the category information D2 is information in which a category is associated with each specification sentence included in the specification to be verified. For example, the category information D2 is created separately from the specification by the specification creator. The category information D2 is externally input to the document
図5は、カテゴリ情報D2の一例を示す図であり、図3に示した仕様書に含まれる各仕様文にカテゴリを対応付けたものである。図5に例示するカテゴリ情報D2では、仕様文を識別する仕様文識別子とカテゴリの識別子とが対応付けられている。この図5に示すカテゴリ情報D2により、仕様文1および仕様文2は「ボタン」のカテゴリに属する仕様を記述したものであり、仕様文3および仕様文6は「ランプ」のカテゴリに属する仕様を記述したものであり、仕様文4は「スケジューラ」のカテゴリに属する仕様を記述したものであり、仕様文5は「リフト」のカテゴリに属する仕様を記述したものであることが示される。 FIG. 5 is a diagram illustrating an example of the category information D2, in which a category is associated with each specification sentence included in the specification shown in FIG. In the category information D2 illustrated in FIG. 5, the specification sentence identifier for identifying the specification sentence and the category identifier are associated with each other. Based on the category information D2 shown in FIG. 5, the specification statement 1 and the specification statement 2 describe the specification belonging to the “button” category, and the specification statement 3 and the specification statement 6 indicate the specification belonging to the “lamp” category. It is described that the specification statement 4 describes the specification belonging to the “scheduler” category and the specification statement 5 describes the specification belonging to the “lift” category.
カテゴリ判定部11は、例えば、文書分析モデルD1に含まれるノード要素の出現箇所データをもとに、検証の対象となる仕様書において当該ノード要素に対応する文節が出現する仕様文を特定する。そして、カテゴリ判定部11は、特定した仕様文の仕様文識別子をキーとしてカテゴリ情報D2を検索することにより、当該ノード要素が属するカテゴリを判定する。 For example, based on the appearance location data of the node element included in the document analysis model D1, the category determination unit 11 specifies a specification sentence in which a clause corresponding to the node element appears in the specification to be verified. Then, the category determination unit 11 determines the category to which the node element belongs by searching the category information D2 using the specification sentence identifier of the specified specification sentence as a key.
図6は、カテゴリ判定部11の処理を説明する図である。この図6では、図4に示した文書分析モデルD1に含まれる「行き先リスト」のノード要素が属するカテゴリを判定する例を示している。「行き先リスト」のノード要素の出現箇所データから、検証の対象となる仕様書において、「行き先リスト」のノード要素に対応する文節が仕様文1、仕様文2および仕様文4で出現することが分かる。そして、図5に示したカテゴリ情報D2から、仕様文1と仕様文2に対応するカテゴリは「ボタン」であり、仕様文4に対応するカテゴリは「スケジューラ」であることが分かるので、カテゴリ判定部11は、「行き先リスト」のノード要素が「ボタン」と「スケジューラ」のカテゴリに属すると判定する。 FIG. 6 is a diagram for explaining processing of the category determination unit 11. FIG. 6 shows an example in which the category to which the node element of the “destination list” included in the document analysis model D1 shown in FIG. 4 belongs is determined. From the appearance data of the node element of the “destination list”, the clause corresponding to the node element of the “destination list” may appear in the specification sentence 1, the specification sentence 2 and the specification sentence 4 in the specification to be verified. I understand. Then, it can be seen from the category information D2 shown in FIG. 5 that the category corresponding to the specification sentence 1 and the specification sentence 2 is “button” and the category corresponding to the specification sentence 4 is “scheduler”. The unit 11 determines that the node element of the “destination list” belongs to the “button” and “scheduler” categories.
カテゴリ判定部11は、文書分析モデルD1に含まれるすべてのノード要素について以上の処理を繰り返すことで、各ノード要素のカテゴリを判定する。そして、同じカテゴリに属すると判定した2つのノード要素を繋ぐエッジ要素を、それら2つのノード要素と同じカテゴリに属すると判定する。このカテゴリ判定部11の処理により、文書分析モデルD1を構成するすべてのモデル要素を複数のカテゴリに分類することができる。カテゴリ判定結果D3は、カテゴリ判定部11による判定の結果を登録したデータであり、例えば、文書分析モデルD1の各モデル要素に対して、当該モデル要素が属するカテゴリの識別子を付加したデータとして生成することができる。 The category determination unit 11 determines the category of each node element by repeating the above processing for all the node elements included in the document analysis model D1. Then, an edge element that connects two node elements determined to belong to the same category is determined to belong to the same category as those two node elements. By the processing of the category determination unit 11, all model elements constituting the document analysis model D1 can be classified into a plurality of categories. The category determination result D3 is data in which the determination result by the category determination unit 11 is registered. For example, the category determination result D3 is generated as data obtained by adding the identifier of the category to which the model element belongs to each model element of the document analysis model D1. be able to.
図7は、カテゴリ判定結果D3の一例を示す図であり、図4に示した文書分析モデルD1を構成する各モデル要素が属するカテゴリを、図5に示したカテゴリ情報D2に基づいて判定した結果を示している。この図7に例示するカテゴリ判定結果D3から、図4に示した文書分析モデルD1を構成する各モデル要素は、「ボタン」、「ランプ」、「スケジューラ」および「リフト」の複数のカテゴリのうちの少なくともいずれかに属することが分かる。文書分析モデルD1を構成するノード要素は、2以上のカテゴリに属する場合もある。図7の例では、「ユーザ」のノード要素および「フロアボタンを押す」のノード要素は「ボタン」と「ランプ」の2つのカテゴリに属し、「行き先リスト」のノード要素は「ボタン」と「スケジューラ」の2つのカテゴリに属している。 FIG. 7 is a diagram illustrating an example of the category determination result D3. The result of determining the category to which each model element constituting the document analysis model D1 illustrated in FIG. 4 belongs is determined based on the category information D2 illustrated in FIG. Is shown. From the category determination result D3 illustrated in FIG. 7, each model element constituting the document analysis model D1 illustrated in FIG. 4 includes a plurality of categories of “button”, “lamp”, “scheduler”, and “lift”. It turns out that it belongs to at least one of these. The node elements constituting the document analysis model D1 may belong to two or more categories. In the example of FIG. 7, the node element “user” and the node element “press the floor button” belong to two categories “button” and “lamp”, and the node elements “destination list” are “button” and “ It belongs to two categories of “scheduler”.
カテゴリ関係判定部12は、カテゴリ判定部11により生成されたカテゴリ判定結果D3をカテゴリ関係判定ルールD4と照合して、文書分析モデルD1における複数のカテゴリ間の因果関係を判定し、カテゴリ関係判定結果D5を生成する。 The category relationship determination unit 12 compares the category determination result D3 generated by the category determination unit 11 with the category relationship determination rule D4, determines the causal relationship between the plurality of categories in the document analysis model D1, and determines the category relationship determination result. D5 is generated.
カテゴリ関係判定ルールD4は、上述のように、文書分析モデルD1を構成する各モデル要素が属しているカテゴリをもとに、文書分析モデルD1における複数のカテゴリ間の因果関係を判定するための予め定められたルールである。本実施形態では、カテゴリ関係判定ルールD4が、カテゴリ間の順序関係を判定するルールと並行・選択の関係を判定するルールとを含むものとする。 As described above, the category relationship determination rule D4 is used in advance to determine the causal relationship between a plurality of categories in the document analysis model D1 based on the category to which each model element constituting the document analysis model D1 belongs. It is a set rule. In the present embodiment, the category relationship determination rule D4 includes a rule for determining an order relationship between categories and a rule for determining a parallel / selection relationship.
図8は、カテゴリ関係判定ルールD4の一例を示す図であり、1行目が順序関係を判定するルール、2行目が並行・選択の関係を判定するルールをそれぞれ示している。この図8に示すカテゴリ関係判定ルールD4は、判定条件情報と、カテゴリ取得情報と、関係プロパティ情報とから構成される。 FIG. 8 is a diagram illustrating an example of the category relationship determination rule D4, in which the first line indicates a rule for determining an order relationship, and the second line indicates a rule for determining a parallel / selection relationship. The category relationship determination rule D4 shown in FIG. 8 includes determination condition information, category acquisition information, and relationship property information.
判定条件情報は、文書分析モデルD1のノード要素に対する入力側のエッジ要素(以下、「入力エッジ」と呼ぶ)と出力側のエッジ要素(以下、「出力エッジ」と呼ぶ)との関係から、カテゴリ間に関係があると判定するための条件を示す。図8の例では、ノード要素に対して入力エッジと出力エッジのカテゴリが異なることが、順序関係を判定するルールの判定条件情報として示されている。また、ノード要素に対して入力エッジが2つのカテゴリに属し、2つの出力エッジの一方が2つのカテゴリの一方に属し、2つの出力エッジの他方が2つのカテゴリの他方に属することが、並行・選択の関係を判定するルールの判定条件情報として示されている。 The determination condition information is based on the relationship between the input-side edge element (hereinafter referred to as “input edge”) and the output-side edge element (hereinafter referred to as “output edge”) with respect to the node element of the document analysis model D1. The conditions for determining that there is a relationship between them are shown. In the example of FIG. 8, the fact that the categories of the input edge and the output edge differ with respect to the node element is indicated as the determination condition information of the rule for determining the order relationship. In addition, for the node element, the input edge belongs to two categories, one of the two output edges belongs to one of the two categories, and the other of the two output edges belongs to the other of the two categories. It is shown as determination condition information of a rule for determining a selection relationship.
カテゴリ取得情報は、ソースカテゴリとターゲットカテゴリとを含む。ソースカテゴリは、判定条件情報で示される判定条件に一致するときに、どの要素のカテゴリをソースにするかを示している。ターゲットカテゴリは、判定条件情報で示される判定条件に一致するときに、どの要素のカテゴリをターゲットにするかを示している。図8の例では、順序関係を判定するルールの判定条件に一致するとき、入力エッジのカテゴリがソースカテゴリとなり、出力エッジのカテゴリがターゲットカテゴリとなることを示している。また、並行・選択の関係を判定するルールの判定条件に一致するとき、入力エッジが属する2つのカテゴリのどちらかがソースカテゴリとなり、2つの出力エッジのどちらかのカテゴリがターゲットカテゴリとなる(ただし、ソースカテゴリとターゲットカテゴリは異なる)ことを示している。 The category acquisition information includes a source category and a target category. The source category indicates which element category is used as a source when the determination condition matches the determination condition information. The target category indicates which element category is targeted when it matches the determination condition indicated by the determination condition information. In the example of FIG. 8, when the determination condition of the rule for determining the order relationship is satisfied, the input edge category is the source category and the output edge category is the target category. In addition, when the determination condition of the rule for determining the parallel / selection relationship is met, one of the two categories to which the input edge belongs becomes the source category, and one of the two output edges becomes the target category (however, , The source category and target category are different).
関係プロパティ情報は、判定条件で示される判定条件に一致するときに得られるカテゴリ間の関係性を示している。図8の例では、順序関係を判定するルールの判定条件に一致するとき、ソースカテゴリとターゲットカテゴリとの間に順序関係があることを示している。また、並行・選択の関係を判定するルールの判定条件に一致するとき、ソースカテゴリとターゲットカテゴリとの間に並行・選択の関係があることを示している。 The relation property information indicates the relation between categories obtained when the judgment condition indicated by the judgment condition is met. The example of FIG. 8 indicates that there is an order relationship between the source category and the target category when the determination condition of the rule for determining the order relationship is met. Further, when the determination condition of the rule for determining the parallel / selection relationship is met, it indicates that there is a parallel / selection relationship between the source category and the target category.
カテゴリ関係判定部12は、上述のカテゴリ判定結果D3をカテゴリ関係判定ルールD4と照合し、文書分析モデルD1のノード要素に対する入力エッジと出力エッジの関係が、カテゴリ関係判定ルールD4の判定条件に一致する部分を探すことで、文書分析モデルD1における複数のカテゴリ間の関係を判定する。 The category relationship determination unit 12 collates the category determination result D3 with the category relationship determination rule D4, and the relationship between the input edge and the output edge with respect to the node element of the document analysis model D1 matches the determination condition of the category relationship determination rule D4. The relationship between a plurality of categories in the document analysis model D1 is determined by searching for a portion to be processed.
図9は、カテゴリ関係判定部12の処理を説明する図であり、(a)は順序関係の判定例、(b)は並行・選択の関係の判定例をそれぞれ示している。図7に示したカテゴリ判定結果D3の「行き先リスト」のノード要素に着目すると、このノード要素の入力エッジは「ボタン」のカテゴリに属し、出力エッジは「スケジューラ」のカテゴリに属している。したがって、カテゴリ関係判定部12は、文書分析モデルD1における「ボタン」のカテゴリと「スケジューラ」のカテゴリとの間に、「ボタン」をソースカテゴリとし「スケジューラ」をターゲットカテゴリとする順序関係が存在すると判定する。また、図7に示したカテゴリ判定結果D3の「フロアボタンを押す」のノード要素に着目すると、このノード要素の入力エッジが「ボタン」と「ランプ」の2つのカテゴリに属し、2つの出力エッジの一方が「ボタン」のカテゴリに属し、他方が「ランプ」のカテゴリに属している。したがって、カテゴリ関係判定部12は、文書分析モデルD1における「ボタン」のカテゴリと「ランプ」のカテゴリとの間に、「ボタン」をソースカテゴリとし「ランプ」をターゲットカテゴリとする(逆でもよい)並行・選択の関係が存在すると判定する。 9A and 9B are diagrams for explaining the processing of the category relationship determination unit 12. FIG. 9A shows an example of determination of order relationship, and FIG. 9B shows an example of determination of parallel / selection relationship. Focusing on the node element of the “destination list” in the category determination result D3 shown in FIG. 7, the input edge of this node element belongs to the “button” category, and the output edge belongs to the “scheduler” category. Therefore, the category relationship determination unit 12 determines that there is an order relationship between the “button” category and the “scheduler” category in the document analysis model D1 with the “button” as the source category and the “scheduler” as the target category. judge. When attention is paid to the node element “push the floor button” of the category determination result D3 shown in FIG. 7, the input edge of this node element belongs to two categories of “button” and “lamp”, and two output edges One of these belongs to the “button” category, and the other belongs to the “lamp” category. Therefore, the category relationship determination unit 12 sets the “button” as the source category and the “lamp” as the target category (or vice versa) between the “button” category and the “lamp” category in the document analysis model D1. It is determined that there is a parallel / selection relationship.
カテゴリ関係判定部12は、カテゴリ関係判定ルールD4に含まれるすべてのルールについて、判定条件に一致する部分を文書分析モデルD1から探し出してカテゴリ間の関係を判定し、カテゴリ関係判定結果D5を生成する。カテゴリ関係判定結果D5は、カテゴリ関係判定部12による判定の結果を登録したデータである。 The category relationship determination unit 12 searches the document analysis model D1 for a part that matches the determination condition for all rules included in the category relationship determination rule D4, determines the relationship between categories, and generates a category relationship determination result D5. . The category relationship determination result D5 is data in which the determination result by the category relationship determination unit 12 is registered.
図10は、カテゴリ関係判定結果D5の一例を示す図であり、(a)が表形式で表したカテゴリ関係判定結果D5の例を示し、(b)が図形式で表したカテゴリ関係判定結果D5の例を示している。この図10に示すカテゴリ関係判定結果D5は、カテゴリ関係情報と、関係プロパティ情報とから構成される。カテゴリ関係情報は、ソースカテゴリの識別子とターゲットカテゴリの識別子とを含む。関係プロパティ情報は、カテゴリ間の関係性を示す情報である。図10に示すカテゴリ関係判定結果D5から、文書分析モデルD1の「ボタン」のカテゴリと「スケジューラ」のカテゴリとの間には順序関係があると判定され、「ボタン」のカテゴリと「ランプ」のカテゴリとの間には並行・選択の関係があると判定されたことが分かる。 FIG. 10 is a diagram illustrating an example of the category relationship determination result D5, where (a) illustrates an example of the category relationship determination result D5 expressed in a table format, and (b) illustrates the category relationship determination result D5 expressed in a diagram format. An example is shown. The category relationship determination result D5 shown in FIG. 10 includes category relationship information and relationship property information. The category relation information includes a source category identifier and a target category identifier. The relationship property information is information indicating the relationship between categories. From the category relationship determination result D5 shown in FIG. 10, it is determined that there is an order relationship between the “button” category and the “scheduler” category of the document analysis model D1, and the “button” category and the “lamp” category are determined. It can be seen that it has been determined that there is a parallel / selection relationship with the category.
  不備検出部13は、カテゴリ関係制約情報D6を取得し、カテゴリ関係判定部12により生成されたカテゴリ関係判定結果D5をカテゴリ関係制約情報D6と照合して仕様書の不備を検出し、不備検出結果D7を生成して出力する。  The
  カテゴリ関係制約情報D6は、上述のように、仕様作成者の意図した複数のカテゴリ間の因果関係(カテゴリ関係制約)を示す情報であり、上述のカテゴリ情報D2と同様に、仕様の意図を表す情報として、例えば仕様作成者によって仕様書とは別途作成される。このカテゴリ関係制約情報D6は、本実施形態の文書不備検出装置10に対して外部入力されて、不備検出部13により取得される。  As described above, the category relationship constraint information D6 is information indicating a causal relationship (category relationship constraint) between a plurality of categories intended by the specification creator, and represents the intention of the specification as with the category information D2 described above. As information, for example, a specification creator creates it separately from the specification. The category relationship constraint information D6 is externally input to the document
図11は、カテゴリ関係制約情報D6の一例を示す図であり、(a)が表形式で表したカテゴリ関係制約情報D6の例を示し、(b)が図形式で表したカテゴリ関係制約情報D6の例を示している。この図11に示すカテゴリ関係制約情報D6は、図10に示したカテゴリ関係判定結果D5と同様のデータ構造とされ、カテゴリ関係情報と、関係プロパティ情報とから構成される。図11に示すカテゴリ関係制約情報D6は、「ボタン」のカテゴリと「スケジューラ」のカテゴリとの間、「スケジューラ」のカテゴリと「リフト」のカテゴリとの間、「スケジューラ」のカテゴリと「ランプ」のカテゴリとの間、「ボタン」のカテゴリと「ランプ」のカテゴリとの間にそれぞれ順序関係があり、「リフト」のカテゴリと「ランプ」のカテゴリとの間には並行・選択の関係があることを、仕様作成者が意図していることを示している。 FIG. 11 is a diagram illustrating an example of the category relationship constraint information D6, where (a) illustrates an example of the category relationship constraint information D6 expressed in a table format, and (b) illustrates the category relationship constraint information D6 expressed in a table format. An example is shown. The category relationship constraint information D6 shown in FIG. 11 has the same data structure as the category relationship determination result D5 shown in FIG. 10, and includes category relationship information and relationship property information. The category relationship constraint information D6 shown in FIG. 11 includes the “button” category and the “scheduler” category, the “scheduler” category and the “lift” category, the “scheduler” category and the “lamp”. There is an order relationship between the “button” category and the “lamp” category, and there is a parallel / selective relationship between the “lift” category and the “lamp” category. This indicates that the specification creator intends.
  不備検出部13は、上述のカテゴリ関係判定結果D5をカテゴリ関係制約情報D6と照合し、カテゴリ関係判定結果D5がカテゴリ関係制約情報D6と一致するかどうかを検査することにより、仕様書がカテゴリ関係制約を満たしているかどうかを判定する。そして、仕様書がカテゴリ関係制約を満たしていなければ、カテゴリ関係制約を満たしていないことを仕様書の不備として検出する。具体的には、不備検出部13は、カテゴリ関係制約情報D6のソースカテゴリ、ターゲットカテゴリおよび関係プロパティ情報のすべてが一致するデータがカテゴリ関係判定結果D5に含まれていれば、仕様書がそのカテゴリ関係制約を満たしていると判定する。また、不備検出部13は、カテゴリ関係制約情報D6のソースカテゴリおよびターゲットカテゴリと一致するデータがカテゴリ関係判定結果D5に含まれているが、そのデータの関係プロパティ情報がカテゴリ関係制約情報D6と相違する場合は、仕様書がそのカテゴリ関係制約の一部を満たしていないと判定する。また、不備検出部13は、カテゴリ関係制約情報D6のソースカテゴリおよびターゲットカテゴリと一致するデータがカテゴリ関係判定結果D5に含まれていない場合は、仕様書がそのカテゴリ関係制約を完全に満たしていないと判定する。  The
  図12は、不備検出部13の処理を説明する図であり、(a)はカテゴリ関係判定結果D5およびカテゴリ関係制約情報D6が表形式の場合の例を示し、(b)はカテゴリ関係判定結果D5およびカテゴリ関係制約情報D6が図形式の場合の例を示している。この図12の例では、「ボタン」のカテゴリと「スケジューラ」のカテゴリとの間ではカテゴリ関係制約を満たしているが、「スケジューラ」のカテゴリと「リフト」のカテゴリとの間、「スケジューラ」のカテゴリと「ランプ」のカテゴリとの間、「リフト」のカテゴリと「ランプ」のカテゴリとの間で、それぞれカテゴリ関係制約を完全に満たしていないことが分かる。また、「ボタン」のカテゴリと「ランプ」のカテゴリとの間では、カテゴリ制約条件の一部を満たしていないことが分かる。不備検出部13は、これらのカテゴリ関係制約を完全に満たしていない、あるいは一部を満たしていないことを仕様書の不備として検出し、不備検出結果D7を生成する。不備検出結果D7は、不備検出部13が検出した仕様書の不備を登録したデータである。この不備検出結果D7は、不備検出部13から出力される際に予め用意した定型文や図の形式に変換される。これにより、仕様書の修正が必要な箇所をユーザに分かり易く提示することができる。  12A and 12B are diagrams for explaining the processing of the
  図13は、不備検出部13から出力される不備検出結果D7の一例を示す図であり、(a)が定型文に変換された不備検出結果D7の例を示し、(b)が図の形式に変換された不備検出結果D7の例を示している。文形式の不備検出結果D7では、カテゴリ関係制約を完全に満たしていない仕様書の不備を、仕様の抜け漏れがあるとの指摘によりユーザに提示し、カテゴリ関係制約の一部を満たしていない仕様書の不備を、仕様の曖昧性があるとの指摘によりユーザに提示している。また、図形式の不備検出結果D7では、カテゴリ関係制約を完全に満たしていない仕様書の不備を「×」マーク、カテゴリ関係制約の一部を満たしていない仕様書の不備を「△」マークによりユーザに提示している。  FIG. 13 is a diagram illustrating an example of the deficiency detection result D7 output from the
  なお、不備検出部13による不備検出結果D7の出力は、図1に示した表示装置107による表示であってもよいし、ネットワークを利用した通信により外部装置に表示させる形態であってもよい。また、不備検出部13が生成した不備検出結果D7を図1に示したHDD104などに保存しておき、仕様書の検証を行うユーザが必要に応じて参照できるようにしてもよい。  The output of the defect detection result D7 by the
不備検出結果D7を参照したユーザは、この不備検出結果D7をもとに仕様書の不備を修正することができる。図14は、図13に例示した不備検出結果D7をもとに仕様書の不備を修正する例を説明する図であり、(a)が元の仕様書を示し、(b)が修正後の仕様書を示している。修正後の仕様書では、元の仕様書に対して仕様文Xが追加され、また、仕様文3と仕様文6とが修正されている。 The user who refers to the deficiency detection result D7 can correct deficiencies in the specification based on the deficiency detection result D7. FIG. 14 is a diagram for explaining an example of correcting a deficiency in the specification based on the deficiency detection result D7 illustrated in FIG. 13, where (a) shows the original specification, and (b) is after the correction. The specifications are shown. In the revised specification, the specification statement X is added to the original specification, and the specification statement 3 and the specification statement 6 are corrected.
仕様文Xの追加は、図13に例示した不備検出結果D7の指摘1に基づく修正である。すなわち、指摘1により「スケジューラ」と「リフト」との間の順序関係に対応する仕様が抜け漏れていることをユーザが認識し、「スケジューリングの結果から移動要求を作成する」という「スケジューラ」のカテゴリに属する仕様文Xを追加している。 The addition of the specification sentence X is a correction based on the indication 1 of the defect detection result D7 illustrated in FIG. That is, the user recognizes that the specification corresponding to the order relationship between “scheduler” and “lift” is missing due to the indication 1, and the “scheduler” of “create a movement request from the scheduling result” A specification sentence X belonging to the category is added.
また、仕様文3の修正は、図13に例示した不備検出結果D7の指摘2および指摘3に基づく修正である。すなわち、指摘2により「スケジューラ」と「ランプ」との間の順序関係に対応する仕様が抜け漏れていることをユーザが認識し、仕様文3の「ユーザがフロアボタンを押したとき、」との記述を「移動要求を取得したとき、」に変更している。また、指摘3では「リフト」と「ランプ」との間の並行・選択の関係に対応する仕様が抜け漏れていることが指摘されているが、この仕様文3の修正により、仕様文3が属する「ランプ」のカテゴリと仕様文5が属する「リフト」のカテゴリとが並行の関係になる。 The correction of the specification sentence 3 is a correction based on the indication 2 and the indication 3 of the defect detection result D7 illustrated in FIG. That is, the user recognizes that the specification corresponding to the order relationship between “scheduler” and “lamp” is missing due to the indication 2, and the specification sentence 3 “when the user presses the floor button” Has been changed to “When a move request is acquired”. In addition, it is pointed out that the specification corresponding to the parallel / selective relationship between “lift” and “ramp” is missing in the indication 3, but the specification statement 3 The category of “Lamp” to which it belongs and the category of “Lift” to which the specification statement 5 belongs have a parallel relationship.
また、仕様文6の修正は、図13に例示した不備検出結果D7の指摘4に基づく修正である。すなわち、指摘4により「ボタン」と「ランプ」との間の順序関係に対応する仕様が抜け漏れているために「ボタン」と「ランプ」との間の関係が曖昧になっていることをユーザが認識し、仕様文6に対して「フロア情報を削除したとき、」という条件を追加している。これにより、仕様文2が属する「ボタン」のカテゴリと仕様文6が属する「ランプ」のカテゴリとが順序関係を持つようになる。 Further, the correction of the specification sentence 6 is a correction based on the indication 4 of the deficiency detection result D7 illustrated in FIG. That is, because the specification corresponding to the order relationship between “button” and “lamp” is omitted due to the indication 4, the relationship between “button” and “lamp” is ambiguous. Is added to the specification 6 with the condition “when floor information is deleted”. As a result, the “button” category to which the specification statement 2 belongs and the “lamp” category to which the specification statement 6 belongs have an order relationship.
  以上のように、本実施形態の文書不備検出装置10は、不備検出結果D7を出力してユーザに提示することにより、仕様書が仕様の意図を満たすように記述されていないことについてユーザに気づきを与え、仕様書の適切な修正を促すことができる。  As described above, the document
<動作説明>
  次に、以上のように構成される本実施形態の文書不備検出装置10の動作の概要を図15に沿って説明する。図15は、本実施形態の文書不備検出装置10による処理手順の一例を示すフローチャートである。文書不備検出装置10は、図15に示すステップS101からステップS116の処理を順次実行して、仕様書の不備を検出する。<Description of operation>
 Next, an outline of the operation of the document
  ステップS101:本実施形態の文書不備検出装置10による処理が開始されると、まず、カテゴリ判定部11が、検証の対象となる仕様書をもとに生成された文書分析モデルD1を取得して、次のステップS102に進む。  Step S101: When processing by the document
ステップS102:カテゴリ判定部11が、検証の対象となる仕様書に含まれる仕様文ごとにカテゴリを対応付けた情報であるカテゴリ情報D2を取得して、次のステップS103に進む。なお、ステップS101の処理とステップS102の処理の順番は逆であってもよい。 Step S102: The category determination unit 11 acquires category information D2 that is information in which a category is associated with each specification sentence included in the specification to be verified, and proceeds to the next step S103. Note that the order of the processing in step S101 and the processing in step S102 may be reversed.
ステップS103:カテゴリ判定部11が、ステップS102で取得したカテゴリ情報D2に基づいて、ステップS101で取得した文書分析モデルD1を構成する各モデル要素のカテゴリを判定し、次のステップS104に進む。 Step S103: The category determination unit 11 determines the category of each model element constituting the document analysis model D1 acquired in step S101 based on the category information D2 acquired in step S102, and proceeds to the next step S104.
ステップS104:カテゴリ判定部11が、ステップS103で判定した各モデル要素のカテゴリをカテゴリ判定結果D3に登録し、次のステップS105に進む。なお、ステップS103の処理とステップS104の処理は、モデル要素ごとに繰り返し行ってもよい。すなわち、カテゴリ判定部11は、1つのモデル要素のカテゴリを判定したらそれをカテゴリ判定結果D3に登録する処理を繰り返し、文書分析モデルD1を構成するすべてのモデル要素のカテゴリをカテゴリ判定結果D3に登録した後、次のステップS105に進むようにしてもよい。 Step S104: The category determination unit 11 registers the category of each model element determined in step S103 in the category determination result D3, and proceeds to the next step S105. Note that the processing in step S103 and the processing in step S104 may be repeated for each model element. That is, when the category determination unit 11 determines the category of one model element, it repeats the process of registering it in the category determination result D3, and registers the categories of all model elements constituting the document analysis model D1 in the category determination result D3. After that, the process may proceed to the next step S105.
ステップS105:カテゴリ関係判定部12が、予め定められたカテゴリ関係判定ルールD4を1つ取り出して、次のステップS106に進む。 Step S105: The category relationship determination unit 12 extracts one predetermined category relationship determination rule D4, and proceeds to the next step S106.
ステップS106:カテゴリ関係判定部12が、カテゴリ判定結果D3をステップS105で取り出したカテゴリ関係判定ルールD4と照合し、このカテゴリ関係判定ルールD4の判定条件に一致する部分があるか否かを判定する。そして、判定条件に一致する部分があれば(ステップS106:Yes)、次のステップS107に進み、判定条件に一致する部分がなければ(ステップS106:No)、ステップS109に進む。 Step S106: The category relationship determination unit 12 compares the category determination result D3 with the category relationship determination rule D4 extracted in step S105, and determines whether there is a part that matches the determination condition of this category relationship determination rule D4. . If there is a part that matches the determination condition (step S106: Yes), the process proceeds to the next step S107, and if there is no part that matches the determination condition (step S106: No), the process proceeds to step S109.
ステップS107:カテゴリ関係判定部12が、判定条件に一致する部分のカテゴリ間の関係をカテゴリ関係判定結果D5に登録し、次のステップS108に進む。 Step S107: The category relationship determination unit 12 registers the relationship between categories corresponding to the determination condition in the category relationship determination result D5, and proceeds to the next step S108.
ステップS108:カテゴリ関係判定部12が、すべてのノード要素に対してステップS105で取り出したカテゴリ関係判定ルールD4を確認したかを判定する。そして、すべてのノード要素に対してカテゴリ関係判定ルールD4を確認した場合は(ステップS108:Yes)、次のステップS109に進み、カテゴリ関係判定ルールD4の確認を行っていないノード要素があれば(ステップS108:No)、ステップS106に戻って未確認のノード要素に対して処理を繰り返す。 Step S108: It is determined whether the category relationship determination unit 12 has confirmed the category relationship determination rule D4 extracted in step S105 for all node elements. If the category relationship determination rule D4 is confirmed for all the node elements (step S108: Yes), the process proceeds to the next step S109, and if there is a node element for which the category relationship determination rule D4 has not been confirmed ( Step S108: No), returning to Step S106, the process is repeated for the unconfirmed node element.
ステップS109:カテゴリ関係判定部12が、カテゴリ関係判定ルールD4をすべて取り出したか否かを判定する。そして、カテゴリ関係判定ルールD4をすべて取り出していれば(ステップS109:Yes)、次のステップS110に進み、取り出していないカテゴリ関係判定ルールD4があれば(ステップS109:No)、ステップS105に戻って以降の処理を繰り返す。 Step S109: The category relationship determination unit 12 determines whether all the category relationship determination rules D4 have been extracted. If all the category relationship determination rules D4 have been extracted (step S109: Yes), the process proceeds to the next step S110. If there is a category relationship determination rule D4 that has not been extracted (step S109: No), the process returns to step S105. The subsequent processing is repeated.
  ステップS110:不備検出部13が、カテゴリ関係制約を示すカテゴリ関係制約情報D6を取得して、次のステップS111に進む。なお、カテゴリ関係制約情報D6は、ステップS102でカテゴリ情報D2を取得する際に併せて取得してもよい。  Step S110: The
  ステップS111:不備検出部13が、ステップS110で取得したカテゴリ関係制約情報D6を1つ取り出して、次のステップS112に進む。  Step S111: The
  ステップS112:不備検出部13が、カテゴリ関係判定結果D5を1つ取り出して、次のステップS113に進む。なお、ステップS111の処理とステップS112の処理の順番は逆であってもよい。  Step S112: The
  ステップS113:不備検出部13が、ステップS111で取り出したカテゴリ関係制約情報D6とステップS112で取り出したカテゴリ関係判定結果D5とを比較して、両者が一致するか否かを判定する。そして、両者が一致しない場合は(ステップS113:No)、次のステップS114に進み、両者が一致する場合は(ステップS113:Yes)、ステップS111で取り出したカテゴリ関係制約情報D6が示すカテゴリ関係制約を満たしているため、ステップS116に進む。  Step S113: The
  ステップS114:不備検出部13が、カテゴリ関係判定結果D5をすべて取り出したか否かを判定する。そして、カテゴリ関係判定結果D5をすべて取り出していれば(ステップS114:Yes)、ステップS111で取り出したカテゴリ関係制約情報D6が示すカテゴリ関係制約を満たしていないため、次のステップS115に進み、取り出していないカテゴリ関係判定結果D5があれば(ステップS114:No)、ステップS112に戻って以降の処理を繰り返す。  Step S114: The
  ステップS115:不備検出部13が、カテゴリ関係制約を満たしていない不備を不備検出結果D7に登録し、次のステップS116に進む。  Step S115: The
  ステップS116:不備検出部13が、カテゴリ関係制約情報D6をすべて取り出したか否かを判定する。そして、カテゴリ関係制約情報D6をすべて取り出していれば(ステップS116:Yes)、次のステップS117に進み、取り出していないカテゴリ関係制約情報D6があれば(ステップS116:No)、ステップS111に戻って以降の処理を繰り返す。  Step S116: The
  ステップS117:不備検出部13が、不備検出結果D7を出力して、一連の処理を終了する。  Step S117: The
<実施形態の効果>
  以上、具体例を挙げながら詳細に説明したように、本実施形態によれば、自然言語で記述された仕様書の不備、特にその仕様書が仕様作成者の意図した通りの内容となっていない不備を自動で検出することができる。これにより、仕様書の検証作業にかかるコストを低減させることができるとともに、仕様書の不備によって発生する開発の手戻り工数の削減を図ることができる。<Effect of embodiment>
 As described above in detail with specific examples, according to the present embodiment, the specification written in the natural language is incomplete, particularly the specification does not have the content intended by the specification creator. A deficiency can be detected automatically. As a result, it is possible to reduce the cost for the verification work of the specification, and it is possible to reduce the man-hours for reworking development caused by the lack of the specification.
自然言語で記述された仕様書の不備を検出する方法としては、仕様書を自然言語解析することで、動詞、主語、目的語、事前条件、事後条件を意味表現データとして取得し、そのデータが既定のルールに一致しているか検査することで仕様書の不備を検出する方法が知られている。しかしこの方法では、例えば文単位での主語の抜け漏れ、述語の抜け漏れなど、仕様書の局所的な不備を検出することはできるものの、ソフトウェアの大局的な振る舞いの視点で見たときに表れる仕様の抜け漏れを検出することはできない。これに対し本実施形態では、カテゴリを用いて仕様書が仕様作成者の意図通りに記述されているか確認することで、大局的な振る舞いの視点から見たときに存在する仕様書の不備を検出することができる。 As a method of detecting deficiencies in specifications written in natural language, verbs, subjects, objects, preconditions, and postconditions are acquired as semantic expression data by analyzing the specifications in natural language. There is known a method for detecting a deficiency in a specification by checking whether a predetermined rule is met. However, this method can detect local deficiencies in the specification, such as omission of subject and omission of predicates in sentence units, but it appears when viewed from the perspective of the overall behavior of software. It is not possible to detect missing specifications. On the other hand, in this embodiment, by using the category, it is confirmed whether the specification is described as intended by the specification creator, thereby detecting deficiencies in the specification that exist from the perspective of global behavior. can do.
なお、上述の実施形態では、自然言語で記述された文書の一例としてソフトウェア開発において作成される仕様書を例示したが、本発明を適用可能な文書は仕様書に限らない。例えば、種々の手順書(マニュアル)や取扱い説明書、料理のレシピなど、文書作成者が段落間の関係性などを指定できる文書の不備を検出する用途において、本発明は広く適用可能である。 In the above-described embodiment, a specification created in software development is exemplified as an example of a document described in a natural language. However, a document to which the present invention is applicable is not limited to a specification. For example, the present invention can be widely applied in applications for detecting document deficiencies in which a document creator can specify the relationship between paragraphs, such as various procedure manuals (manuals), instruction manuals, and cooking recipes.
以上、本発明の実施形態を説明したが、ここで説明した実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。ここで説明した新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。ここで説明した実施形態やその変形は、発明の範囲や要旨に含まれるとともに、請求の範囲に記載された発明とその均等の範囲に含まれる。 As mentioned above, although embodiment of this invention was described, embodiment described here is shown as an example and is not intending limiting the range of invention. The novel embodiments described herein can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. The embodiments and modifications described herein are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.
  10  文書不備検出装置
  11  カテゴリ判定部
  12  カテゴリ関係判定部
  13  不備検出部
  D1  文書分析モデル
  D2  カテゴリ情報
  D3  カテゴリ判定結果
  D4  カテゴリ関係判定ルール
  D5  カテゴリ関係判定結果
  D6  カテゴリ関係制約情報
  D7  不備検出結果DESCRIPTION OF
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| JP2016136816AJP6606028B2 (en) | 2016-07-11 | 2016-07-11 | Document defect detection program, document defect detection device, and document defect detection method | 
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| JP2016136816AJP6606028B2 (en) | 2016-07-11 | 2016-07-11 | Document defect detection program, document defect detection device, and document defect detection method | 
| Publication Number | Publication Date | 
|---|---|
| JP2018010349A JP2018010349A (en) | 2018-01-18 | 
| JP6606028B2true JP6606028B2 (en) | 2019-11-13 | 
| Application Number | Title | Priority Date | Filing Date | 
|---|---|---|---|
| JP2016136816AActiveJP6606028B2 (en) | 2016-07-11 | 2016-07-11 | Document defect detection program, document defect detection device, and document defect detection method | 
| Country | Link | 
|---|---|
| JP (1) | JP6606028B2 (en) | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| JP7219868B2 (en)* | 2020-12-18 | 2023-02-09 | カシオ計算機株式会社 | Modeling support method, information processing device, and program | 
| CN113704083B (en)* | 2021-03-09 | 2025-07-18 | 腾讯科技(深圳)有限公司 | Test case generation method and device, storage medium and electronic equipment | 
| JP2025105187A (en)* | 2023-12-28 | 2025-07-10 | 株式会社日立製作所 | REQUIREMENTS DEFINITION SUPPORT SYSTEM, REQUIREMENTS DEFINITION SUPPORT METHOD, AND REQUIREMENTS DEFINITION SUPPORT PROGRAM | 
| JP7628205B1 (en)* | 2024-03-29 | 2025-02-07 | 日鉄ソリューションズ株式会社 | Information processing device, information processing method, and program | 
| JP7628204B1 (en)* | 2024-03-29 | 2025-02-07 | 日鉄ソリューションズ株式会社 | Information processing device, information processing method, and program | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| JPH04195221A (en)* | 1990-09-28 | 1992-07-15 | Toshiba Corp | Software component group configuration inspection system | 
| JP3415310B2 (en)* | 1994-01-26 | 2003-06-09 | 株式会社東芝 | Test case creation device | 
| JP5404721B2 (en)* | 2011-09-08 | 2014-02-05 | 日本電信電話株式会社 | Test item generation apparatus, method and program for scenario test | 
| JP2015014827A (en)* | 2013-07-03 | 2015-01-22 | 株式会社東芝 | Natural language description verification apparatus | 
| Publication number | Publication date | 
|---|---|
| JP2018010349A (en) | 2018-01-18 | 
| Publication | Publication Date | Title | 
|---|---|---|
| KR102737026B1 (en) | Automatically generating machine learning models for software tools that operate on source code | |
| JP6606028B2 (en) | Document defect detection program, document defect detection device, and document defect detection method | |
| Zhang et al. | Automated information transformation for automated regulatory compliance checking in construction | |
| CN113961584B (en) | Field lineage analysis method, device, electronic device and storage medium | |
| CN108762743B (en) | Data table operation code generation method and device | |
| EP2530583A1 (en) | Computer-implemented method, system and computer program product for displaying a user interface component | |
| TWI711969B (en) | Computational accelerator system, method and non-transitory machine-readable medium for facilitating change management of works in a model-based system engineering (mbse) system | |
| CN106469116A (en) | Test scene generates auxiliary device and test scene generates householder methods | |
| CN104965956A (en) | RUCM based demand verification method | |
| CN113421657B (en) | Knowledge representation model construction method and device of clinical practice guideline | |
| CN111656453A (en) | Hierarchical entity recognition and semantic modeling framework for information extraction | |
| CN107168762A (en) | A kind of RUCM model consistency inspection methods based on body | |
| WO2014064803A1 (en) | Document processing program, document processing device, document processing system, and document processing method | |
| JP2015148917A (en) | Information processing apparatus and information processing program | |
| JP2013246644A (en) | Software object correction support device, software object correction support method and program | |
| Körner et al. | Natural language specification improvement with ontologies | |
| Lim et al. | Test case information extraction from requirements specifications using NLP-based unified boilerplate approach | |
| Reger | Better Proof Output for Vampire. | |
| JP5790820B2 (en) | Inconsistency detection apparatus, program and method, correction support apparatus, program and method | |
| JP2023031614A (en) | Change degree measuring device, method, and program | |
| Oliveira | Automated Requirements analysis using natural language processing | |
| JP6437899B2 (en) | Document proofreading support apparatus, document proofreading support method, and document proofreading support program | |
| JP6062735B2 (en) | Software development support device, software development support method, software development support program | |
| JP2011113298A (en) | Shared source code analysis system, program, and recording medium | |
| US20250060972A1 (en) | Automatically Evaluating Manifest Files for Applications | 
| Date | Code | Title | Description | 
|---|---|---|---|
| A621 | Written request for application examination | Free format text:JAPANESE INTERMEDIATE CODE: A621 Effective date:20180328 | |
| A977 | Report on retrieval | Free format text:JAPANESE INTERMEDIATE CODE: A971007 Effective date:20190228 | |
| A131 | Notification of reasons for refusal | Free format text:JAPANESE INTERMEDIATE CODE: A131 Effective date:20190312 | |
| A521 | Written amendment | Free format text:JAPANESE INTERMEDIATE CODE: A523 Effective date:20190402 | |
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) | Free format text:JAPANESE INTERMEDIATE CODE: A01 Effective date:20190917 | |
| A61 | First payment of annual fees (during grant procedure) | Free format text:JAPANESE INTERMEDIATE CODE: A61 Effective date:20191017 | |
| R151 | Written notification of patent or utility model registration | Ref document number:6606028 Country of ref document:JP Free format text:JAPANESE INTERMEDIATE CODE: R151 |