JP2004348239A - Text classification program - Google Patents

Text classification program Download PDF

Info

Publication number
JP2004348239A
JP2004348239A JP2003142007A JP2003142007A JP2004348239A JP 2004348239 A JP2004348239 A JP 2004348239A JP 2003142007 A JP2003142007 A JP 2003142007A JP 2003142007 A JP2003142007 A JP 2003142007A JP 2004348239 A JP2004348239 A JP 2004348239A
Authority
JP
Japan
Prior art keywords
text
classification
feature vector
word
gram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2003142007A
Other languages
Japanese (ja)
Inventor
Mineki Takechi
峰樹 武智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003142007A priority Critical patent/JP2004348239A/en
Publication of JP2004348239A publication Critical patent/JP2004348239A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To precisely classify a text to be classified. <P>SOLUTION: A function word/content word splitting means 1a splits a text A2 to be classified into a function word and a content word. An N-gram means 1b performs N-gram in which an N is changed step by step at each function word and content word. A feature vector generation means 1c generates a function word feature vector and a content word feature vector at each N-gram. An area determining means 1f determines to which of a procedure area and a non-procedure area of a classification model 1e each of the feature vectors belongs. A classification means 1g classifies whether each of the feature vectors indicates or not the procedure of the text A2 to be classified by using an evaluation reference which takes a high evaluation value when the classification performance due to the function word feature vector is enhanced or when the classification performance due to the content feature vector deteriorates and takes a low evaluation value when the classification performance due to the function word feature vector deteriorates or when the classification performance due to the content feature vector is enhanced, as the N is increased. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明はテキスト分類プログラムに関し、特に手順を示したテキストを分類するテキスト分類プログラムに関する。
【0002】
【従来の技術】
近年、電子文書の蓄積に加え、インターネットの普及によりWeb上の大量のテキストへのアクセスが容易となり、コンピュータによる情報検索技術の重要性が増している。CRM(Customer Relationship Management)やWebナビゲーションの分野では、自動質問応答などにおいてテキスト自動分類技術が用いられる。これらの応用分野では、従来のテキストの分野やジャンルに基づく分類に加えて、それとは異なる軸を持つ分類、例えば、テキストの記述スタイルや特定の質問に対する回答候補の絞込みに役立つ分類などが必要となっている。
【0003】
Web上で手順に関するテキストの検索を可能にするには、コンピュータにテキストの記述スタイルを、例えば、SVM(サポートベクトルマシン)により学習させる。そして、予め被検索対象となる被検索テキストを、手順を示すテキストとそうでないテキストとに、学習結果に基づいて分類し記憶しておく。ユーザから手順に関するテキストのキーワード検索要求があった場合、分類された手順を示す被検索テキストの中からそのキーワードに合致するテキストを検索する。このとき、手順を示すテキストを確実に検索できるには、コンピュータのSVM学習によるテキストの分類精度が高い必要がある。
【0004】
なお、文章の構造を解析することは、従来から行われている。表、箇条書き、多段組等任意にレイアウトされた文書から、意味あるテキストブロックを抽出する文書処理方法がある(例えば、特許文献1参照)。
【0005】
【特許文献1】
特開2002−032770号公報(第6頁、第8図)
【0006】
【発明が解決しようとする課題】
ところで、手順を示すか否かによってテキスト(被分類テキスト)を分類するには、その被分類テキストの特徴ベクトルを生成する。そして、その特徴ベクトルが、学習によって得られた分類モデルの手順を示す領域に属するか属さないかによって分類される。被分類テキストの分類精度は、特徴ベクトルの基となるパラメータに依存するので、分類精度を高めるためのパラメータを選択する必要がある。
【0007】
本発明はこのような点に鑑みてなされたものであり、被分類テキストの機能語と内容語との各々において特徴ベクトルを生成することにより精度よく分類することができるテキスト分類プログラムを提供することを目的とする。
【0008】
【課題を解決するための手段】
本発明では上記課題を解決するために、図1に示すような、手順を示しているか否かによってテキストを分類するテキスト分類プログラムにおいて、コンピュータに、被分類テキストA2を機能語と内容語とに分割し、機能語と内容語との各々において、組み合わせ単語数を段階的に変化させたN−gramを行い、N−gramごとにおける機能語の機能語特徴ベクトルと内容語の内容語特徴ベクトルとを生成し、機能語特徴ベクトルと内容語特徴ベクトルとの各々が、学習用テキストA1を学習して生成した分類モデルの手順を示している領域と手順を示してない領域とのどちらの領域に属するかを判断し、N−gramに用いるNが増加するとともに、機能語特徴ベクトルによる分類の性能が向上した場合又は内容語特徴ベクトルによる分類の性能が悪化した場合において高い評価値をとり、機能語特徴ベクトルによる分類の性能が悪化した場合又は内容語特徴ベクトルによる分類の性能が向上した場合に、低い評価値をとるような評価基準を用いて、被分類テキストA2の手順を示しているか否かの分類をする、処理を実行させることを特徴とするテキスト分類プログラムが提供される。
【0009】
このような、テキスト分類プログラムによれば、被分類テキストA2を機能語と内容語とに分割し、各々において単語数を段階的に変化させたN−gramを行う。N−gramごとにおける機能語の機能語特徴ベクトルと内容語の内容語特徴ベクトルとを生成し、分類モデルの手順を示している領域と手順を示してない領域とのどちらの領域に属するかを判断する。そして、N−gramに用いるNが増加するとともに、機能語特徴ベクトルによる分類の性能が向上した場合又は内容語特徴ベクトルによる分類の性能が悪化した場合において高い評価値をとり、機能語特徴ベクトルによる分類の性能が悪化した場合又は内容語特徴ベクトルによる分類の性能が向上した場合に、低い評価値をとるような評価基準を用いることによって、被分類テキストA2の手順を示しているか否かの分類をする。これにより、被分類テキストを分類精度よく分類することが可能となる。
【0010】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。図1は、本発明の原理を説明する原理図である。図に示すように、コンピュータ1は、機能・内容語分割手段1a、N−gram手段1b、特徴ベクトル生成手段1c、学習手段1d、分類モデル1e、領域判断手段1f、及び分類手段1gを有している。また、図1には、学習用テキストA1、被分類テキストA2が示してある。
【0011】
機能・内容語分割手段1aは、被分類テキストA2を機能語と内容語とに分割する。
N−gram手段1bは、機能・内容語分割手段1aによって分割された機能語と内容語の各々においてN−gramを行う。N−gramは、機能語、内容語の組み合わせ単語数が段階的に変化するよう行われる。例えば、uni−gram(1−gram)、bi−gram(1−gramと2−gram)、tri−gram(1−gramと2−gramと3−gram)が行われる。
【0012】
特徴ベクトル生成手段1cは、N−gramごと(例えば、uni/bi/tri−gramの各々)における機能語の機能語特徴ベクトルを生成する。また、特徴ベクトル生成手段1cは、N−gramごとにおける内容語の内容語特徴ベクトルを生成する。
【0013】
学習手段1dは、学習用テキストA1を読込み、学習用テキストA1の機能語と内容語との各々において学習し分類モデル1eを生成する。分類モデル1eは、手順を示す領域と手順を示していない領域とを具備している。
【0014】
領域判断手段1fは、機能語特徴ベクトルのN−gramごとにおいて、その機能語特徴ベクトルが、分類モデル1eの手順を示す領域と手順を示していない領域のどちらに属するかを判断する。また、領域判断手段1fは、内容語特徴ベクトルのN−gramごとにおいて、その内容語特徴ベクトルが、分類モデル1eの手順を示す領域と手順を示していない領域のどちらに属するかを判断する。
【0015】
分類手段1gは、N−gramに用いるNが増加するとともに、領域判断手段1fによって判断された機能語特徴ベクトルによる分類の性能が向上した場合又は内容語特徴ベクトルによる分類の性能が悪化した場合において高い評価値をとり、機能語特徴ベクトルによる分類の性能が悪化した場合又は内容語特徴ベクトルによる分類の性能が向上した場合に、低い評価値をとるような評価基準を用いて、分類テキストの手順を示しているか否かの分類をする。例えば、uni−gram、bi−gram、tri−gramの機能語特徴ベクトルでは、領域判断手段1fによるuni−gramの機能語特徴ベクトルの判断結果より、tri−gramの機能語特徴ベクトルの判断結果を尊重する。また、uni−gram、bi−gram、tri−gram内容語特徴ベクトルでは、領域判断手段1fによるtri−gramの内容語特徴ベクトルの判断結果より、uni−gramの内容語特徴ベクトルの判断結果を尊重する。そして、分類手段1gは、その判断結果に基づいて被分類テキストA2の手順を示しているか否かの分類をする。
【0016】
ところで、手順を示すテキストと手順を示さないテキストにおいて、機能語は、N−gramの単語数が増加するにつれ、テキストの分類精度が高くなり、内容語は、分類精度が悪くなるという傾向が実験的に確かめられている。すなわち、機能語と内容語の特徴ベクトルの、分類モデルによる分類結果をN−gramの単語数の増加に伴って重みを持たせることにより、精度よくテキストを分類するができる。
【0017】
次に本発明の実施の形態の構成例について説明する。図2は、本発明の実施の形態の構成例を示す図である。図に示すように、分類サーバ10は、ネットワーク30を介して、端末装置21、サーバ22と接続されている。ネットワーク30は、例えば、インターネットである。
【0018】
分類サーバ10は、サーバ22から情報検索の対象となる被検索テキストを、そのURL(Uniform Resource Locator)とともにネットワーク30を介して受信する。分類サーバ10は、受信した被検索テキストを、分類モデルを参照して、手順を示しているか否かによって分類し、記憶する。手順の具体例としては、ソフトウェアのインストール手順や料理の手順などである。非手順の具体例としては、単なる記事の表示、情報の羅列である。
【0019】
分類サーバ10は、手順を示した学習用テキストと手順を示していない学習用テキストが入力される。分類サーバ10は、入力された学習用テキストを学習して、被検索テキストを分類するためのモデルとなる分類モデルを生成する。分類サーバ10は、サーバ22から受信した被検索テキスト(被検索テキストの特徴ベクトル)を、分類モデルの手順を示すテキストの領域に属するか、手順を示さないテキストの領域に属するかによって分類する。
【0020】
分類サーバ10は、端末装置21からの手順検索(手順を示す内容を含むテキスト検索)又は通常検索(手順を示していないテキストの検索)の指示を受付ける。分類サーバ10は、端末装置21からキーワードを受信し、受付けた手順検索又は通常検索の指示に従って、分類した被検索テキストを検索する。そして、分類サーバ10は、キーワードに合致する被検索テキストのURLを端末装置21に送信する。端末装置21は、受信したURL(サーバ22)にアクセスすることによって、希望する被検索テキストを参照することができる。
【0021】
なお、端末装置21とサーバ22は、1つしか示してないが、複数の端末装置とサーバがネットワーク30に接続される。分類サーバ10は、複数のサーバから被検索テキストが入力され、複数の端末装置から情報検索が行われる。
【0022】
次に、分類サーバ10のハードウェア構成について説明する。図3は、分類サーバのハードウェア構成を示すブロック図である。図に示すように、分類サーバ10は、CPU(Central Processing Unit)10aによって装置全体が制御されている。CPU10aには、バス10gを介してRAM(Random Access Memory)10b、ハードディスクドライブ(HDD:Hard Disk Drive)10c、グラフィック処理装置10d、入力インタフェース10e、及び通信インタフェース10fが接続されている。
【0023】
RAM10bには、CPU10aに実行させるOS(Operating System)のプログラムや、学習用テキストを学習し、被検索テキストを分類するためのアプリケーションプログラムの少なくとも一部が一時的に格納される。また、RAM10bには、CPU10aによる処理に必要な各種データが保存される。HDD10cには、上記のOSやアプリケーションプログラム、各種データなどが格納される。
【0024】
グラフィック処理装置10dには、モニタ10hが接続されている。グラフィック処理装置10dは、CPU10aからの命令に従って、画像をモニタ10hの表示画面に表示させる。入力インタフェース10eには、キーボード10iと、マウス10jとが接続されている。入力インタフェース10eは、キーボード10iやマウス10jから送られてくる信号を、バス10gを介してCPU10aに送信する。
【0025】
通信インタフェース10fは、ネットワーク30に接続されている。通信インタフェース10fは、ネットワーク30を介して、端末装置21、サーバ22と通信を行う。
【0026】
なお、端末装置21、サーバ22も図3と同様のハードウェア構成で実現することができる。ただし、端末装置21、サーバ22のハードディスクドライブには、各々が処理するのに必要なプログラム及びデータが格納される。
【0027】
以上のようなハードウェア構成によって、本実施の形態を実現することができる。
次に、分類サーバ10の機能について説明する。図4は、分類サーバの機能ブロック図である。図に示すように、分類サーバ10は、SVM部11を有している。SVM部11は、学習用に与えられるデータをサポートベクトルマシンによって学習する。そして、SVM部11は、別に与えられるデータを学習した結果に基づいて分類する。SVM部11は、特徴抽出部12、モデル生成部13、データベースである分類モデルDB14、分類器15、分類結果テーブル16、及び評価部17を有している。
【0028】
図4には学習用テキストB1と被検索テキストB2が示してある。学習用テキストB1、被検索テキストB2は、例えば、HTML(Hyper Text Markup Language)で記述されている。学習用テキストB1は、人によって収集され、その内容が手順を示すものか否かの識別子が付与されて、SVM部11に入力される。被検索テキストB2は、SVM部11に入力され、SVM部11の学習結果に基づいて手順を示すテキストか否かに分類される。
【0029】
特徴抽出部12は、入力される学習用テキストB1、被検索テキストB2の機能語と内容語の各々において特徴ベクトルを生成する。特徴抽出部12は、生成した特徴ベクトルをモデル生成部13及び分類器15に出力する。
【0030】
図5は、特徴抽出部の詳細を示した機能ブロック図である。図に示すように、特徴抽出部12は、形態素解析器12a、解析済み文書DB(DB:データベース)12b、品詞フィルタ部12c、パターン辞書DB12d、パターンマイニング部12e、N−gram計算部12f、及びベクトル生成部12gを有している。
【0031】
形態素解析器12aは、入力される学習用テキストB1、被検索テキストB2を形態素解析する。形態素解析器12aは、形態素解析した学習用テキストB1、被検索テキストB2を解析済み文書DB12bに格納する。
【0032】
品詞フィルタ部12cは、解析済み文書DB12bに格納されている形態素解析された学習用テキストB1、被検索テキストB2の機能語と内容語を抽出する。
【0033】
パターンマイニング部12eは、品詞フィルタ部12cで抽出された機能語の繰り返し出現するパターンを、シーケンシャルパターンマイニング(Sequential pattern mining)によって抽出する。機能語の繰り返し出現するパターンは、予めパターン辞書DB12dに格納されており、パターンマイニング部12eは、パターン辞書DB12dを参照することによって、抽出された機能語の繰り返し出現するパターンを抽出する。パターンマイニング部12eは、機能語の場合と同様にして、品詞フィルタ部12cで抽出された内容語の繰り返し出現するパターンを、パターン辞書DB12dを参照し、シーケンシャルパターンマイニングによって抽出する。
【0034】
N−gram計算部12fは、品詞フィルタ部12cで抽出された機能語の、N(組み合わせ単語数)を変更した複数のN−gramを作成する。例えば、N−gram計算部12fは、まず、機能語のuni(N=1)−gram、bi(N=2)−gram、及びtri(N=3)−gramを作成し、これらの組み合わせとして最終的にN=uni,N=uni+bi,N=uni+bi+triの計3つの組み合わせを作成する。同様にN−gram計算部12fは、品詞フィルタ部12cで抽出された内容語の、Nを変更した複数のN−gramを作成する。
【0035】
ベクトル生成部12gは、パターンマイニング部12eによって抽出された機能語の出現パターンと、N−gram計算部12fによって作成された機能語の複数のN−gram各々において、特徴ベクトルを生成する。すなわち、ベクトル生成部12gは、機能語の出現パターンとuni−gramの特徴ベクトル、機能語の出現パターンと(uni+bi)−gramの特徴ベクトル、及び機能語の出現パターンと(uni+bi+tri)−gramの特徴ベクトルを生成する。
【0036】
図6は、特徴ベクトル成分を説明する図である。図に示すように、特徴ベクトルは、成分tf1,tf2,…,tfi,…,tfl,p0,p1,…,pi,…,pm(i,l,m:正の整数でi<l<m)から構成されている。
【0037】
成分tf1,tf2,…,tfi,…,tflの各々は、例えば、‘0’,‘1’の2値で表される。成分tf1,tf2,…,tfi,…,tflの各々は、N−gramの文字列が対応し、N−gram計算部12fによって作成された機能語の文字列の組み合わせが、その各成分に対応した文字列に一致していれば‘1’となる。一致していなければ、‘0’となる。
【0038】
成分p0,p1,…,pi,…,pmの各々は、例えば、‘0’,‘1’の2値で表される。成分p0,p1,…,pi,…,pmの各々は、繰り返し出現するパターンが対応し、抽出した機能語の繰り返し出現するパターンが、その各成分に対応したパターンに一致していれば‘1’となる。一致していなければ、‘0’となる。
【0039】
ベクトル生成部12gは、同様にして内容語における特徴ベクトルを生成する。ベクトル生成部12gは、生成した機能語と内容語の特徴ベクトルをモデル生成部13、分類器15に出力する。
【0040】
図4の説明に戻る。モデル生成部13は、特徴空間上に点在する、特徴抽出部12から出力される学習用テキストB1の機能語における特徴ベクトルを、人によって付与された識別子を参照して、手順を示したものとそうでないものとに分ける識別平面を算出する。モデル生成部13は、これらの特徴ベクトル、識別平面を分類モデルとして、分類モデルDB14に記憶する。同様にモデル生成部13は、学習用テキストB1の内容語における分類モデルを生成し、分類モデルDB14に記憶する。
【0041】
分類器15は、特徴抽出部12から出力される被検索テキストB2の機能語における特徴ベクトルが、分類モデルDB14に記憶されている機能語の分類モデルの、識別平面の手順を示している側の特徴空間に存在しているか、手順を示していない側の特徴空間に存在しているかを判断する。なお、上述したように被検索テキストB2の機能語における特徴ベクトルは、複数のN−gramにおいて生成されるので、分類器15は、それぞれの特徴ベクトルにおいて判断をする。分類器15は、同様に特徴抽出部12から出力される被検索テキストB2の内容語における特徴ベクトルが、分類モデルDB14に記憶されている内容語の分類モデルの、識別平面の手順を示している側の特徴空間に存在しているか、手順を示していない側の特徴空間に存在しているかを判断する。
【0042】
分類器15は、判断結果を示した分類結果リストを生成する。分類器15は、その分類結果リストに基づいて、被検索テキストB2が手順を示しているか否かの最終判断をするためのスコアを算出し、分類結果テーブル16に記憶する。
【0043】
図7は、分類器が生成する分類結果リストを示した図である。図に示す分類結果リスト40は、被検索テキストB2の機能語におけるuni−gramの特徴ベクトルの分類結果を示している。分類結果リスト40には、被検索テキストB2に含まれている箇条書き部分に付与されるid(識別子)、その箇条書き部分の特徴ベクトルが、特徴空間の手順側の領域に属しているか(手順タイプ)非手順側の領域に属しているか(非手順タイプ)を示すクラスが示されている。
【0044】
手順は、一般に箇条書きされていることが多く、被検索テキストB2に含まれている箇条書き部分にidが付与される。クラスは、1で特徴ベクトルが手順タイプであることを示し、−1で非手順タイプであることを示している。
【0045】
分類結果リストは、被検索テキストB2の複数のN−gramにおける特徴ベクトルごとに生成され、例えば、上記例では、bi−gram、tri−gramにおける特徴ベクトルにおいても生成される。また、分類リストは、同様に内容語においても生成される。
【0046】
図8は、分類結果テーブルのデータ構成例である。図に示すように、分類結果テーブル16は、id、N=1、N=1+2、N=1+2+3、及びスコアの欄が設けられている。
【0047】
idの欄には、被検索テキストB2に含まれる箇条書き部分に付与された識別子が格納される。N=1の欄には、被検索テキストB2の機能語と内容後のuni−gramにおける特徴ベクトルのクラスが格納される。N=1+2の欄には、被検索テキストB2の機能語と内容語のbi−gramにおける特徴ベクトルのクラスが格納される。N=3の欄には、被検索テキストB2の機能語と内容語のtri−gramにおける特徴ベクトルのクラスが格納される。スコアの欄には、被検索テキストB2が手順を示しているか否かを判断するスコアが格納される。
【0048】
スコアの算出について説明する。機能語の特徴ベクトルの分類精度は、特徴ベクトルに与えられるパラメータ(成分)のN−gramのNが大きくなる(uni、bi、tri)につれ高くなる傾向がある。また、内容語の特徴ベクトルによる分類精度は、特徴ベクトルに与えられるパラメータのN−gramのNが大きくなるにつれ低くなる傾向がある。
【0049】
従って、被検索テキストB2の手順を示しているか否かの判断をするには、機能語においては、N−gramのNが大きくなるにつれ、クラスの重みを大きく評価し、内容語においては、N−gramのNが大きくなるほど、クラスの重みを小さく評価するようにすればよい。これにより、手順を示しているか否かの分類精度が高くなる。このような評価を行うスコア計算式を、式(1)に示す。
【0050】
【数1】

Figure 2004348239
【0051】
式(1)に示すα,α,β,βは、N−gramにおけるNの値N=1,1+2,1+2+3別に与えられる正の整数で、分類モデルDB14を参照し、スコア計算式による分類が一番精度よく実行されるよう値を決める。具体的には、学習用テキストB1の分類結果の値を、式(1)に代入して、スコアの判定に用いるしきい値と比較して、4変数の連立不等式を解く。
【0052】
式(1)で示されるscore(スコア)は、N−gramに用いるNが増加するとともに、機能語特徴ベクトルによる分類の性能が向上した場合又は内容語特徴ベクトルによる分類の性能が悪化した場合において高い値をとり、機能語特徴ベクトルによる分類の性能が悪化した場合又は内容語特徴ベクトルによる分類の性能が向上した場合に、低い値をとる。算出されるスコアの値が、所定のしきい値以上か否かによって、被検索テキストB2が手順を示しているか否かを判断、分類する。例えば、図8の例において、スコアが所定のしきい値未満であれば、被検索テキストB2は、手順を示さないテキスト、しきい値以上であれば、手順を示すテキストと分類することができる。
【0053】
ところで、上記の機能語、内容語の特徴ベクトルによる分類精度の傾向は、実験において確認されている。図9は、機能語と内容語の分類結果を示す図である。図に示す表41は、コンピュータ分野の箇条書き及びその他の分野の箇条書きを、学習と評価の役割を入れ替えたときの分類の再現率(再び同じ分類が行われる率)を示している。表41に示すように、機能語における再現率は、N−gramのNが大きくなるにつれて高くなる傾向にある。内容語における再現率は、N−gramのNが大きくなるにつれて低くなる傾向にある。このような傾向は、以下のような理由により生じると考えられている。機能語は、助動詞、助詞、接辞などの品詞であり、テキストの記述スタイルの依存性が高く、手順(箇条書き)を示した文章の特徴を捉えやすい。一方、内容語は、名詞、動詞などの用言であり、テキストのトピックス、ジャンルの依存性が高く、通常(非手順)の文章の特徴を捉えやすいと考えられるからである。
【0054】
図4の説明に戻る。評価部17は、分類結果テーブル16のスコアを参照して、SVM部11に入力された被検索テキストB2が手順を示しているか否かを評価する。
【0055】
次に、図4、図5に示す分類サーバ10の動作を、流れ図を用いて説明する。図10は、分類サーバの学習時の動作の流れを示す流れ図である。分類サーバ10は、以下のステップに従って学習し、分類モデルを生成する。
【0056】
[ステップS1]特徴抽出部12は、学習用テキストB1を受け付ける。
[ステップS2]特徴抽出部12の形態素解析器12aは、学習用テキストB1の形態素解析を行う。形態素解析器12aは、形態素解析した学習用テキストB1を解析済み文書DB12bに格納する。
【0057】
[ステップS3]品詞フィルタ部12cは、解析済み文書DB12bに格納されている形態素解析された学習用テキストB1から抽出すべき語として機能語を選択する。なお、機能語の分類モデルが生成され、再びこのステップに戻った時は、品詞フィルタ部12cは、内容語を選択する。
【0058】
[ステップS4]品詞フィルタ部12cは、解析済み文書DB12bに格納されている形態素解析された学習用テキストB1から、ステップS3で選択された機能語、又は内容語を抽出する。
【0059】
[ステップS5]パターンマイニング部12eは、パターン辞書DB12dを参照して、ステップS4で抽出された機能語又は内容語のパターンマイニングを行う。
【0060】
[ステップS6]N−gram計算部12fは、ステップS4で抽出された機能語又は内容語のN−gram作成を行う。
[ステップS7]ベクトル生成部12gは、ステップS5、ステップS6のパターンマイニング処理、N−gram作成より、学習用テキストB1の特徴ベクトルを生成する。
【0061】
[ステップS8]モデル生成部13は、ベクトル生成部12gより生成された特徴ベクトルから分類モデルを生成する。モデル生成部13は、生成した分類モデルを分類モデルDB14に記憶する。
【0062】
[ステップS9]品詞フィルタ部12c、パターンマイニング部12e、N−gram計算部12f、及びモデル生成部13は、N−gramのN=1,1+2,1+2+3の全てにおいて、特徴ベクトルを生成するようステップS4〜ステップS8の処理を繰り返す。
【0063】
[ステップS10]内容語にける特徴ベクトルを生成するようステップS3へ進む。機能語と内容語の両方において、特徴ベクトルを生成した場合は、ステップS11へ進む。
【0064】
[ステップS11]分類器15は、各学習用テキストB1のスコアを計算する。
[ステップS12]分類器15は、被検索テキストB2を精度よく分類できるようα,α,β,βを決定する。
【0065】
図11は、分類サーバの分類時の動作の流れを示す流れ図である。分類サーバ10は、以下のステップに従って被検索テキストB2を分類する。
[ステップS21]特徴抽出部12は、被検索テキストB2を受け付ける。
【0066】
[ステップS22]特徴抽出部12の形態素解析器12aは、被検索テキストB2の形態素解析を行う。形態素解析器12aは、形態素解析した被検索テキストB2を解析済み文書DB12bに格納する。
【0067】
[ステップS23]品詞フィルタ部12cは、解析済み文書DB12bに格納されている形態素解析された被検索テキストB2から抽出すべき語として機能語を選択する。なお、機能語の分類モデルが生成され、再びこのステップに戻った時は、品詞フィルタ部12cは、内容語を選択する。
【0068】
[ステップS24]品詞フィルタ部12cは、解析済み文書DB12bに格納されている形態素解析された被検索テキストB2から、ステップS23で選択された機能語、又は内容語を抽出する。
【0069】
[ステップS25]パターンマイニング部12eは、パターン辞書DB12dを参照して、ステップS24で抽出された機能語又は内容語のパターンマイニングを行う。
【0070】
[ステップS26]N−gram計算部12fは、ステップS24で抽出された機能語又は内容語のN−gram作成を行う。
[ステップS27]ベクトル生成部12gは、ステップS25、ステップS26のパターンマイニング処理、N−gram作成より、被検索テキストB2の特徴ベクトルを生成する。
【0071】
[ステップS28]分類器15は、分類モデルDB14を参照して、被検索テキストB2の特徴ベクトルが、分類モデルの手順側の領域に属するか非手順側の領域に属するかを判断する(クラスを算出する)。
【0072】
[ステップS29]品詞フィルタ部12c、パターンマイニング部12e、N−gram計算部12f、及びモデル生成部13は、N−gramのN=1,1+2,1+2+3の全てにおいて、特徴ベクトルを生成するようステップS4〜ステップS8の処理を繰り返す。
【0073】
[ステップS30]内容語にける特徴ベクトルを生成するようステップS23へ進む。機能語と内容語の両方において、特徴ベクトルを生成した場合は、ステップS31へ進む。
【0074】
[ステップS31]分類器15は、N−gramのN=1,1+2,1+2+3の全てにおける特徴ベクトルのクラスを用いてスコアを算出する。
[ステップS32]評価部17は、スコアを参照して、被検索テキストB2が手順を示しているか非手順を示しているかを判断する。
【0075】
このように、機能語と内容語において、N−gramを段階的に変化させ、それぞれのN−gramにおいて、特徴ベクトルを生成し、クラスを算出する。N−gramに用いるNが増加するとともに、機能語特徴ベクトルによる分類の性能が向上した場合又は内容語特徴ベクトルによる分類の性能が悪化した場合において高い値となり、機能語特徴ベクトルによる分類の性能が悪化した場合又は内容語特徴ベクトルによる分類の性能が向上した場合に、低い値となるスコアを算出する。そして、スコアの値によって、被検索テキストを分類するようにした。これにより、被分類テキストを精度よく分類することができる。
【0076】
なお、上記の処理機能を実現するプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁気記録装置には、ハードディスク装置(HDD)フレキシブルディスク(FD)、磁気テープなどがある。光ディスクには、DVD(Digital Versatile Disc)、DVD−RAM(Random Access Memory)、CD−ROM(Compact Disc Read Only Memory)、CD−R(Recordable)/RW(ReWritable)などがある。光磁気記録媒体には、MO(Magneto−Optical disc)などがある。
【0077】
プログラムを流通させる場合には、例えば、そのプログラムが記録されたDVD、CD−ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することもできる。
【0078】
プログラムを実行するコンピュータは、例えば、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、自己の記憶装置に格納する。そして、コンピュータは、自己の記憶装置からプログラムを読み取り、プログラムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンピュータは、サーバコンピュータからプログラムが転送される毎に、逐次、受け取ったプログラムに従った処理を実行することもできる。
【0079】
【発明の効果】
以上説明したように本発明では、被分類テキストを機能語と内容語とに分割し、各々において単語数を段階的に変化させたN−gramを行う。N−gramごとにおける機能語の機能語特徴ベクトルと内容語の内容語特徴ベクトルとを生成し、分類モデルの手順を示している領域と手順を示してない領域とのどちらの領域に属するかを判断する。そして、N−gramに用いるNが増加するとともに、機能語特徴ベクトルによる分類の性能が向上した場合又は内容語特徴ベクトルによる分類の性能が悪化した場合において高い評価値をとり、機能語特徴ベクトルによる分類の性能が悪化した場合又は内容語特徴ベクトルによる分類の性能が向上した場合に、低い評価値をとるような評価基準を用いることによって、被分類テキストの手順を示しているか否かの分類をするようにした。これにより、被分類テキストを精度よく分類することができる。
【図面の簡単な説明】
【図1】本発明の原理を説明する原理図である。
【図2】本発明の実施の形態の構成例を示す図である。
【図3】分類サーバのハードウェア構成を示すブロック図である。
【図4】分類サーバの機能ブロック図である。
【図5】特徴抽出部の詳細を示した機能ブロック図である。
【図6】特徴ベクトル成分を説明する図である。
【図7】分類器から出力される分類結果リストを示した図である。
【図8】分類結果テーブルのデータ構成例である。
【図9】機能語と内容語の分類結果を示す図である。
【図10】分類サーバの学習時の動作の流れを示す流れ図である。
【図11】分類サーバの分類時の動作の流れを示す流れ図である。
【符号の説明】
1 コンピュータ
1a 機能・内容語分割手段
1b N−gram手段
1c 特徴ベクトル生成手段
1d 学習手段
1e 分類モデル
1f 領域判断手段
1g 分類手段
10 分類サーバ
11 SVM部
12 特徴抽出部
12a 形態素解析器
12b 解析済み文書DB
12c 品詞フィルタ部
12d パターン辞書DB
12e パターンマイニング部
12f N−gram計算部
12g ベクトル生成部
13 モデル生成部
14 分類モデルDB
15 分類器
16 分類結果テーブル
17 評価部
A1,B1 学習用テキスト
A2 被分類テキスト
B2 被検索テキスト[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a text classification program, and more particularly to a text classification program for classifying text indicating a procedure.
[0002]
[Prior art]
In recent years, in addition to the accumulation of electronic documents, the spread of the Internet has made it easy to access a large amount of text on the Web, and the importance of computer-based information retrieval technology has increased. In the field of CRM (Customer Relationship Management) and Web navigation, a text automatic classification technique is used in automatic question answering and the like. In these application areas, in addition to the conventional classification based on the field and genre of text, there is a need for a classification with a different axis, such as a description style of text or a classification that helps narrow possible answers to specific questions. Has become.
[0003]
In order to enable a search for a text relating to a procedure on the Web, a computer is made to learn a description style of the text by, for example, an SVM (Support Vector Machine). Then, the searched text to be searched is classified and stored in advance into a text indicating the procedure and a text not indicating the procedure based on the learning result. When a user makes a keyword search request for a text related to a procedure, a text that matches the keyword is searched from the searched text indicating the classified procedure. At this time, in order to reliably search for the text indicating the procedure, it is necessary that the classification accuracy of the text by SVM learning of the computer is high.
[0004]
Note that analyzing the structure of a sentence has been conventionally performed. There is a document processing method for extracting a meaningful text block from a document arbitrarily laid out such as a table, an itemized list, or a multi-column structure (for example, see Patent Document 1).
[0005]
[Patent Document 1]
JP-A-2002-032770 (page 6, FIG. 8)
[0006]
[Problems to be solved by the invention]
By the way, in order to classify a text (classified text) depending on whether or not a procedure is indicated, a feature vector of the classified text is generated. Then, the feature vector is classified according to whether or not it belongs to a region indicating the procedure of the classification model obtained by learning. Since the classification accuracy of the text to be classified depends on the parameters on which the feature vectors are based, it is necessary to select a parameter for improving the classification accuracy.
[0007]
The present invention has been made in view of such a point, and provides a text classification program capable of performing accurate classification by generating a feature vector in each of a functional word and a content word of a text to be classified. With the goal.
[0008]
[Means for Solving the Problems]
In the present invention, in order to solve the above-mentioned problem, in a text classification program for classifying text according to whether or not a procedure is shown as shown in FIG. 1, a computer converts the text to be classified A2 into a functional word and a content word. The N-gram is divided and the number of combined words is changed stepwise in each of the function word and the content word, and the function word feature vector of the function word and the content word feature vector of the content word are calculated for each N-gram. Is generated, and each of the function word feature vector and the content word feature vector is stored in either the region indicating the procedure of the classification model generated by learning the learning text A1 or the region not indicating the procedure. It is determined whether or not the N-gram belongs to the N-gram and the performance of the classification using the function word feature vector is improved or the content word feature vector is used. An evaluation criterion that takes a high evaluation value when the performance of the classification is deteriorated, and takes a low evaluation value when the performance of the classification by the functional word feature vector is deteriorated or the performance of the classification by the content word feature vector is improved. , A text classification program is provided which classifies whether or not it indicates the procedure of the text to be classified A2, and executes a process.
[0009]
According to such a text classification program, the text A2 to be classified is divided into functional words and content words, and N-grams in which the number of words is changed in each step are performed. A function word feature vector of a function word and a content word feature vector of a content word for each N-gram are generated, and which of a region indicating a procedure of the classification model and a region not indicating the procedure belongs to the classification model. to decide. Then, as N used for N-gram increases, a high evaluation value is obtained when the performance of the classification by the function word feature vector is improved or when the performance of the classification by the content word feature vector is deteriorated, When the performance of the classification is deteriorated or the performance of the classification based on the content word feature vector is improved, by using an evaluation criterion that takes a low evaluation value, the classification of whether the procedure of the text A2 to be classified is indicated or not is performed. do. Thus, the classified text can be classified with high classification accuracy.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a principle diagram for explaining the principle of the present invention. As shown in the figure, the computer 1 has a function / content word dividing unit 1a, an N-gram unit 1b, a feature vector generating unit 1c, a learning unit 1d, a classification model 1e, an area determining unit 1f, and a classification unit 1g. ing. FIG. 1 shows a learning text A1 and a classified text A2.
[0011]
The function / content word dividing means 1a divides the classified text A2 into a function word and a content word.
The N-gram means 1b performs N-gram on each of the function word and the content word divided by the function / content word division means 1a. The N-gram is performed such that the number of combined words of the function word and the content word changes stepwise. For example, uni-gram (1-gram), bi-gram (1-gram and 2-gram), and tri-gram (1-gram, 2-gram, and 3-gram) are performed.
[0012]
The feature vector generation unit 1c generates a function word feature vector of a function word for each N-gram (for example, each of uni / bi / tri-gram). In addition, the feature vector generation unit 1c generates a content word feature vector of a content word for each N-gram.
[0013]
The learning means 1d reads the learning text A1 and learns each of the functional words and the content words of the learning text A1 to generate a classification model 1e. The classification model 1e has an area indicating a procedure and an area not indicating a procedure.
[0014]
The region determining means 1f determines, for each N-gram of the functional word feature vector, whether the functional word feature vector belongs to a region indicating the procedure of the classification model 1e or a region not indicating the procedure. In addition, for each N-gram of the content word feature vector, the region determination unit 1f determines whether the content word feature vector belongs to a region indicating the procedure of the classification model 1e or a region not indicating the procedure.
[0015]
The classifying unit 1g performs the processing when the N used in the N-gram increases and the performance of the classification based on the function word feature vector determined by the area determination unit 1f is improved or the performance of the classification based on the content word feature vector is deteriorated. If a high evaluation value is taken and the performance of the classification by the function word feature vector is deteriorated or the performance of the classification by the content word feature vector is improved, the procedure of the classification text is performed using an evaluation criterion that takes a low evaluation value. Is classified. For example, in the function word feature vector of uni-gram, bi-gram, and tri-gram, the judgment result of the function word feature vector of tri-gram is obtained from the judgment result of the uni-gram function word feature vector by the area judging means 1f. to respect. In the uni-gram, bi-gram, and tri-gram content word feature vectors, the determination result of the uni-gram content word feature vector is respected based on the determination result of the tri-gram content word feature vector by the area determination unit 1f. I do. Then, the classifying unit 1g classifies whether the procedure of the classified text A2 is indicated based on the determination result.
[0016]
By the way, in the text indicating the procedure and the text not indicating the procedure, the experimentation has shown that the classification accuracy of the functional words increases as the number of N-gram words increases, and the classification accuracy of the content words decreases as the number of N-gram words increases. Has been confirmed. That is, texts can be classified with high accuracy by assigning weights to the classification results of the feature vectors of the function words and the content words by the classification model as the number of N-gram words increases.
[0017]
Next, a configuration example of an embodiment of the present invention will be described. FIG. 2 is a diagram illustrating a configuration example of the embodiment of the present invention. As shown in the figure, the classification server 10 is connected to a terminal device 21 and a server 22 via a network 30. The network 30 is, for example, the Internet.
[0018]
The classification server 10 receives the searched text to be searched for information from the server 22 via the network 30 together with its URL (Uniform Resource Locator). The classification server 10 classifies the received search target text by referring to the classification model based on whether or not the procedure is indicated, and stores the classified text. Specific examples of the procedure include a software installation procedure and a cooking procedure. Specific examples of non-procedures are simple display of articles and enumeration of information.
[0019]
The classification server 10 receives a learning text indicating a procedure and a learning text not indicating a procedure. The classification server 10 learns the input learning text and generates a classification model serving as a model for classifying the searched text. The classification server 10 classifies the searched text (feature vector of the searched text) received from the server 22 according to whether the text belongs to a text region indicating a procedure of the classification model or belongs to a text region indicating no procedure.
[0020]
The classification server 10 receives an instruction from the terminal device 21 for a procedure search (a text search including contents indicating a procedure) or a normal search (a search for text not indicating a procedure). The classification server 10 receives the keyword from the terminal device 21 and searches the classified text to be searched according to the received instruction of the procedure search or the normal search. Then, the classification server 10 transmits the URL of the searched text that matches the keyword to the terminal device 21. The terminal device 21 can refer to the desired search target text by accessing the received URL (server 22).
[0021]
Although only one terminal device 21 and one server 22 are shown, a plurality of terminal devices and servers are connected to the network 30. The classification server 10 receives the text to be searched from a plurality of servers, and performs an information search from a plurality of terminal devices.
[0022]
Next, the hardware configuration of the classification server 10 will be described. FIG. 3 is a block diagram illustrating a hardware configuration of the classification server. As shown in the figure, the classification server 10 is entirely controlled by a CPU (Central Processing Unit) 10a. To the CPU 10a, a RAM (Random Access Memory) 10b, a hard disk drive (HDD: Hard Disk Drive) 10c, a graphic processing device 10d, an input interface 10e, and a communication interface 10f are connected via a bus 10g.
[0023]
The RAM 10b temporarily stores at least a part of an OS (Operating System) program to be executed by the CPU 10a and at least a part of an application program for learning the learning text and classifying the searched text. The RAM 10b stores various data necessary for processing by the CPU 10a. The HDD 10c stores the OS, application programs, various data, and the like.
[0024]
A monitor 10h is connected to the graphic processing device 10d. The graphic processing device 10d displays an image on the display screen of the monitor 10h according to a command from the CPU 10a. A keyboard 10i and a mouse 10j are connected to the input interface 10e. The input interface 10e transmits signals transmitted from the keyboard 10i and the mouse 10j to the CPU 10a via the bus 10g.
[0025]
The communication interface 10f is connected to the network 30. The communication interface 10f communicates with the terminal device 21 and the server 22 via the network 30.
[0026]
Note that the terminal device 21 and the server 22 can also be realized with the same hardware configuration as in FIG. However, the hard disk drives of the terminal device 21 and the server 22 store programs and data necessary for the respective processes.
[0027]
The present embodiment can be realized by the above hardware configuration.
Next, the function of the classification server 10 will be described. FIG. 4 is a functional block diagram of the classification server. As shown in the figure, the classification server 10 has an SVM unit 11. The SVM unit 11 learns data provided for learning by a support vector machine. Then, the SVM unit 11 classifies the separately provided data based on the result of learning. The SVM unit 11 includes a feature extraction unit 12, a model generation unit 13, a classification model DB 14, which is a database, a classifier 15, a classification result table 16, and an evaluation unit 17.
[0028]
FIG. 4 shows a learning text B1 and a searched text B2. The learning text B1 and the search target text B2 are described in, for example, HTML (Hyper Text Markup Language). The learning text B1 is collected by a person, added with an identifier indicating whether or not the content indicates a procedure, and is input to the SVM unit 11. The searched text B2 is input to the SVM unit 11, and is classified based on the learning result of the SVM unit 11 as a text indicating a procedure.
[0029]
The feature extraction unit 12 generates a feature vector for each of the function words and the content words of the input learning text B1 and the searched text B2. The feature extraction unit 12 outputs the generated feature vector to the model generation unit 13 and the classifier 15.
[0030]
FIG. 5 is a functional block diagram showing details of the feature extraction unit. As shown in the figure, the feature extraction unit 12 includes a morphological analyzer 12a, an analyzed document DB (DB: database) 12b, a part-of-speech filter unit 12c, a pattern dictionary DB 12d, a pattern mining unit 12e, an N-gram calculation unit 12f, It has a vector generation unit 12g.
[0031]
The morphological analyzer 12a performs a morphological analysis on the input learning text B1 and search target text B2. The morphological analyzer 12a stores the learning text B1 and the searched text B2 obtained by the morphological analysis in the analyzed document DB 12b.
[0032]
The part-of-speech filter unit 12c extracts functional words and content words of the morphologically analyzed learning text B1 and the searched text B2 stored in the analyzed document DB 12b.
[0033]
The pattern mining unit 12e extracts, by sequential pattern mining, patterns in which the function words extracted by the part-of-speech filter unit 12c repeatedly appear. The pattern in which the function word repeatedly appears is stored in advance in the pattern dictionary DB 12d, and the pattern mining unit 12e extracts the pattern in which the extracted function word repeatedly appears by referring to the pattern dictionary DB 12d. The pattern mining unit 12e extracts a pattern in which the content word extracted by the part-of-speech filter unit 12c appears repeatedly by sequential pattern mining with reference to the pattern dictionary DB 12d in the same manner as in the case of the function word.
[0034]
The N-gram calculation unit 12f creates a plurality of N-grams in which N (the number of combined words) of the function words extracted by the part-of-speech filter unit 12c is changed. For example, the N-gram calculation unit 12f first creates function words uni (N = 1) -gram, bi (N = 2) -gram, and tri (N = 3) -gram, and as a combination of these. Finally, a total of three combinations of N = uni, N = uni + bi, and N = uni + bi + tri are created. Similarly, the N-gram calculation unit 12f creates a plurality of N-grams in which N of the content words extracted by the part-of-speech filter unit 12c is changed.
[0035]
The vector generation unit 12g generates a feature vector in each of the appearance pattern of the function word extracted by the pattern mining unit 12e and a plurality of N-grams of the function word created by the N-gram calculation unit 12f. That is, the vector generation unit 12g determines the appearance pattern of the function word and the uni-gram feature vector, the appearance pattern of the function word and the (uni + bi) -gram feature vector, and the appearance pattern of the function word and the (uni + bi + tri) -gram feature. Generate a vector.
[0036]
FIG. 6 is a diagram for explaining a feature vector component. As shown in the figure, the feature vectors are components tf1, tf2, ..., tfi, ..., tfl, p0, p1, ..., pi, ..., pm (i, l, m: positive integers, i <l <m ).
[0037]
Each of the components tf1, tf2, ..., tfi, ..., tfl is represented by, for example, a binary value of "0", "1". Each of the components tf1, tf2, ..., tfi, ..., tfl corresponds to a character string of N-gram, and a combination of character strings of function words created by the N-gram calculation unit 12f corresponds to each component. If it matches the entered character string, it becomes '1'. If they do not match, it is '0'.
[0038]
Each of the components p0, p1,..., Pi,..., Pm is represented by, for example, a binary value of '0' and '1'. Each of the components p0, p1,..., Pi,..., Pm corresponds to a pattern that repeatedly appears, and if the pattern that repeatedly appears of the extracted function word matches the pattern corresponding to each component, '1 '. If they do not match, it is '0'.
[0039]
The vector generation unit 12g similarly generates a feature vector in the content word. The vector generation unit 12g outputs the generated feature vector of the function word and the content word to the model generation unit 13 and the classifier 15.
[0040]
Returning to the description of FIG. The model generation unit 13 indicates a procedure by referring to a feature vector in a function word of the learning text B1 scattered on the feature space and output from the feature extraction unit 12 with reference to an identifier assigned by a person. The discrimination plane which divides into those which do not and those which do not is calculated. The model generation unit 13 stores these feature vectors and identification planes in the classification model DB 14 as classification models. Similarly, the model generation unit 13 generates a classification model for the content words of the learning text B1 and stores the classification model in the classification model DB 14.
[0041]
The classifier 15 determines whether the feature vector of the function word of the searched text B2 output from the feature extraction unit 12 indicates the procedure of the identification plane of the classification model of the function word stored in the classification model DB 14. It is determined whether it exists in the feature space or in the feature space on the side where the procedure is not shown. Note that, as described above, since the feature vector in the function word of the searched text B2 is generated in a plurality of N-grams, the classifier 15 makes a determination on each feature vector. The classifier 15 similarly shows the procedure of the identification plane of the classification model of the content word stored in the classification model DB 14 with the feature vector of the content word of the searched text B2 output from the feature extraction unit 12. It is determined whether it exists in the feature space on the side or in the feature space on the side that does not indicate the procedure.
[0042]
The classifier 15 generates a classification result list indicating the determination result. The classifier 15 calculates a score for making a final determination whether or not the searched text B2 indicates a procedure based on the classification result list, and stores the score in the classification result table 16.
[0043]
FIG. 7 is a diagram showing a classification result list generated by the classifier. The classification result list 40 shown in the figure shows the classification result of the uni-gram feature vector in the function word of the searched text B2. In the classification result list 40, the id (identifier) assigned to the bulleted portion included in the searched text B2 and whether the feature vector of the bulleted portion belongs to the procedure-side area of the feature space (procedure) Type) A class indicating whether or not it belongs to the non-procedural area (non-procedural type) is shown.
[0044]
The procedure is generally itemized in many cases, and an id is given to the itemized part included in the searched text B2. For the class, 1 indicates that the feature vector is a procedural type, and -1 indicates that it is a non-procedural type.
[0045]
The classification result list is generated for each feature vector in the plurality of N-grams of the searched text B2. For example, in the above example, the classification result list is also generated in the feature vectors of bi-gram and tri-gram. Further, the classification list is similarly generated for the content word.
[0046]
FIG. 8 is a data configuration example of a classification result table. As shown in the figure, the classification result table 16 has columns for id, N = 1, N = 1 + 2, N = 1 + 2 + 3, and score.
[0047]
The “id” field stores an identifier assigned to a bulleted part included in the searched text B2. In the column of N = 1, the function word of the searched text B2 and the class of the feature vector in the uni-gram after the content are stored. The column of N = 1 + 2 stores the class of the feature vector in the bi-gram of the function word and the content word of the searched text B2. The column of N = 3 stores the class of the feature vector in the tri-gram of the function word and the content word of the searched text B2. The score column stores a score for determining whether or not the searched text B2 indicates a procedure.
[0048]
The calculation of the score will be described. The classification accuracy of the feature vector of the function word tends to increase as the N of the parameter (component) given to the feature vector increases (uni, bi, tri). In addition, the classification accuracy of a content word by a feature vector tends to decrease as N of N-gram of a parameter given to the feature vector increases.
[0049]
Therefore, in order to determine whether or not the procedure of the search target text B2 is indicated, as the N of the N-gram of the function word increases, the weight of the class is greatly evaluated. The weight of the class may be evaluated to be smaller as the N of -gram increases. Thereby, the classification accuracy of whether or not a procedure is indicated is increased. Formula (1) shows a score calculation formula for performing such evaluation.
[0050]
(Equation 1)
Figure 2004348239
[0051]
Α in equation (1) 1 , Α 2 , Β 1 , Β 2 Is a positive integer given for each N value of N-gram N = 1, 1 + 2, 1 + 2 + 3, and determines a value such that classification by the score calculation formula is performed with the highest accuracy by referring to the classification model DB14. Specifically, the value of the classification result of the learning text B1 is substituted into Expression (1), and is compared with a threshold value used for determining a score, thereby solving a simultaneous inequality expression of four variables.
[0052]
The score (score) represented by the equation (1) is obtained when N used for N-gram increases and the performance of the classification using the function word feature vector is improved or the performance of the classification using the content word feature vector is deteriorated. It takes a high value and takes a low value when the performance of the classification using the function word feature vector is deteriorated or when the performance of the classification using the content word feature vector is improved. Based on whether or not the calculated score value is equal to or greater than a predetermined threshold value, it is determined whether or not the searched text B2 indicates a procedure and classified. For example, in the example of FIG. 8, if the score is less than a predetermined threshold, the searched text B2 can be classified as a text indicating no procedure, and if the score is equal to or more than the threshold, it can be classified as a text indicating a procedure. .
[0053]
Incidentally, the tendency of the classification accuracy based on the feature vectors of the above-mentioned functional words and content words has been confirmed in experiments. FIG. 9 is a diagram showing the classification results of the function words and the content words. Table 41 shown in the figure shows the recall rate of the classification (the rate at which the same classification is performed again) when the roles of learning and evaluation are switched between the bullet points in the computer field and the bullet points in other fields. As shown in Table 41, the recall of the function word tends to increase as N of N-gram increases. The recall rate in the content word tends to decrease as N of N-gram increases. Such a tendency is considered to occur for the following reasons. A functional word is a part of speech such as an auxiliary verb, a particle, or an affix, and is highly dependent on the description style of the text, so that it is easy to capture the characteristics of a sentence indicating a procedure (a bullet point). On the other hand, the content word is a declinable word such as a noun or a verb, and is highly dependent on the topic and genre of the text, so that it is considered that it is easy to capture the characteristics of ordinary (non-procedural) sentences.
[0054]
Returning to the description of FIG. The evaluation unit 17 refers to the score in the classification result table 16 and evaluates whether the searched text B2 input to the SVM unit 11 indicates a procedure.
[0055]
Next, the operation of the classification server 10 shown in FIGS. 4 and 5 will be described using a flowchart. FIG. 10 is a flowchart showing the flow of the operation of the classification server at the time of learning. The classification server 10 learns according to the following steps and generates a classification model.
[0056]
[Step S1] The feature extraction unit 12 receives the learning text B1.
[Step S2] The morphological analyzer 12a of the feature extracting unit 12 performs a morphological analysis of the learning text B1. The morphological analyzer 12a stores the morphologically analyzed learning text B1 in the analyzed document DB 12b.
[0057]
[Step S3] The part of speech filter unit 12c selects a functional word as a word to be extracted from the morphologically analyzed learning text B1 stored in the analyzed document DB 12b. When a functional word classification model is generated and the process returns to this step, the part of speech filter unit 12c selects a content word.
[0058]
[Step S4] The part-of-speech filter unit 12c extracts the functional word or the content word selected in step S3 from the morphologically analyzed learning text B1 stored in the analyzed document DB 12b.
[0059]
[Step S5] The pattern mining unit 12e refers to the pattern dictionary DB 12d and performs pattern mining on the functional words or content words extracted in Step S4.
[0060]
[Step S6] The N-gram calculation unit 12f creates an N-gram of the function word or the content word extracted in step S4.
[Step S7] The vector generation unit 12g generates a feature vector of the learning text B1 from the pattern mining process of steps S5 and S6 and the creation of an N-gram.
[0061]
[Step S8] The model generation unit 13 generates a classification model from the feature vectors generated by the vector generation unit 12g. The model generation unit 13 stores the generated classification model in the classification model DB 14.
[0062]
[Step S9] The part-of-speech filter unit 12c, the pattern mining unit 12e, the N-gram calculation unit 12f, and the model generation unit 13 generate a feature vector in all N = 1, 1 + 2, 1 + 2 + 3 of the N-gram. Steps S4 to S8 are repeated.
[0063]
[Step S10] The process proceeds to step S3 to generate a feature vector for the content word. If feature vectors have been generated for both the function word and the content word, the process proceeds to step S11.
[0064]
[Step S11] The classifier 15 calculates the score of each learning text B1.
[Step S12] The classifier 15 sets α so that the searched text B2 can be classified with high accuracy. 1 , Α 2 , Β 1 , Β 2 To determine.
[0065]
FIG. 11 is a flowchart showing the flow of the operation of the classification server at the time of classification. The classification server 10 classifies the searched text B2 according to the following steps.
[Step S21] The feature extraction unit 12 receives the search target text B2.
[0066]
[Step S22] The morphological analyzer 12a of the feature extracting unit 12 performs a morphological analysis of the searched text B2. The morphological analyzer 12a stores the searched text B2 that has undergone the morphological analysis in the analyzed document DB 12b.
[0067]
[Step S23] The part of speech filter unit 12c selects a functional word as a word to be extracted from the morphologically analyzed searched text B2 stored in the analyzed document DB 12b. When a functional word classification model is generated and the process returns to this step, the part of speech filter unit 12c selects a content word.
[0068]
[Step S24] The part-of-speech filter unit 12c extracts the functional word or the content word selected in step S23 from the morphologically analyzed search target text B2 stored in the analyzed document DB 12b.
[0069]
[Step S25] The pattern mining unit 12e refers to the pattern dictionary DB 12d and performs pattern mining on the functional words or content words extracted in Step S24.
[0070]
[Step S26] The N-gram calculation unit 12f creates an N-gram of the function word or the content word extracted in step S24.
[Step S27] The vector generation unit 12g generates a feature vector of the search target text B2 from the pattern mining process of steps S25 and S26 and the creation of an N-gram.
[0071]
[Step S28] The classifier 15 refers to the classification model DB 14 and determines whether the feature vector of the searched text B2 belongs to the procedural side area or the non-procedural side area of the classification model (class calculate).
[0072]
[Step S29] The part-of-speech filter unit 12c, the pattern mining unit 12e, the N-gram calculation unit 12f, and the model generation unit 13 generate a feature vector in all N = 1, 1 + 2, 1 + 2 + 3 of the N-gram. Steps S4 to S8 are repeated.
[0073]
[Step S30] The process proceeds to step S23 to generate a feature vector for the content word. If a feature vector has been generated for both the function word and the content word, the process proceeds to step S31.
[0074]
[Step S31] The classifier 15 calculates a score using the classes of the feature vectors in all of N = 1, 1 + 2, 1 + 2 + 3 of N-gram.
[Step S32] The evaluation unit 17 refers to the score and determines whether the searched text B2 indicates a procedure or a non-procedure.
[0075]
As described above, in the function word and the content word, the N-gram is changed stepwise, and in each of the N-grams, a feature vector is generated and a class is calculated. When N used for N-gram increases and the performance of the classification by the function word feature vector is improved or when the performance of the classification by the content word feature vector is deteriorated, the value becomes high. When the performance is worsened or the performance of the classification based on the content word feature vector is improved, a score having a low value is calculated. Then, the searched text is classified according to the score value. This allows the classified text to be classified with high accuracy.
[0076]
The program for realizing the above processing functions can be recorded on a computer-readable recording medium. Computer-readable recording media include magnetic recording devices, optical disks, magneto-optical recording media, and semiconductor memories. The magnetic recording device includes a hard disk device (HDD), a flexible disk (FD), and a magnetic tape. Examples of the optical disc include a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), a CD-ROM (Compact Disc Read Only Memory), and a CD-R (Recordable) / RW (ReWritable). Magneto-optical recording media include MO (Magneto-Optical disc).
[0077]
When distributing the program, portable recording media such as DVDs and CD-ROMs on which the program is recorded are sold. Alternatively, the program may be stored in a storage device of a server computer, and the program may be transferred from the server computer to another computer via a network.
[0078]
The computer that executes the program stores, for example, the program recorded on the portable recording medium or the program transferred from the server computer in its own storage device. Then, the computer reads the program from its own storage device and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. Further, the computer may execute the processing according to the received program each time the program is transferred from the server computer.
[0079]
【The invention's effect】
As described above, in the present invention, the text to be classified is divided into functional words and content words, and N-grams are performed in each of which the number of words is changed stepwise. A function word feature vector of a function word and a content word feature vector of a content word for each N-gram are generated, and which of a region indicating a procedure of the classification model and a region not indicating the procedure belongs to the classification model. to decide. Then, as N used for N-gram increases, a high evaluation value is obtained when the performance of the classification by the function word feature vector is improved or when the performance of the classification by the content word feature vector is deteriorated, When the performance of the classification is deteriorated or the performance of the classification based on the content word feature vector is improved, by using an evaluation criterion that takes a low evaluation value, the classification of whether or not the procedure of the text to be classified is indicated can be performed. I did it. This allows the classified text to be classified with high accuracy.
[Brief description of the drawings]
FIG. 1 is a principle diagram illustrating the principle of the present invention.
FIG. 2 is a diagram illustrating a configuration example of an embodiment of the present invention.
FIG. 3 is a block diagram illustrating a hardware configuration of a classification server.
FIG. 4 is a functional block diagram of a classification server.
FIG. 5 is a functional block diagram showing details of a feature extraction unit.
FIG. 6 is a diagram illustrating a feature vector component.
FIG. 7 is a diagram showing a classification result list output from a classifier.
FIG. 8 is a data configuration example of a classification result table.
FIG. 9 is a diagram showing classification results of function words and content words.
FIG. 10 is a flowchart showing a flow of an operation at the time of learning of the classification server.
FIG. 11 is a flowchart showing a flow of an operation at the time of classification of the classification server.
[Explanation of symbols]
1 computer
1a Function / content word division means
1b N-gram means
1c Feature vector generation means
1d learning means
1e Classification model
1f area judgment means
1g Classification means
10. Classification server
11 SVM part
12 Feature extraction unit
12a Morphological analyzer
12b Analyzed document DB
12c Part-of-speech filter
12d pattern dictionary DB
12e Pattern mining unit
12f N-gram calculation unit
12g Vector generator
13 Model generator
14 Classification model DB
15 Classifier
16 Classification result table
17 Evaluation section
A1, B1 Textbook for learning
A2 Classified text
B2 Searched text

Claims (4)

手順を示しているか否かによってテキストを分類するテキスト分類プログラムにおいて、
コンピュータに、
被分類テキストを機能語と内容語とに分割し、
前記機能語と前記内容語との各々において、組み合わせ単語数を段階的に変化させたN−gramを行い、
前記N−gramごとにおける前記機能語の機能語特徴ベクトルと前記内容語の内容語特徴ベクトルとを生成し、
前記機能語特徴ベクトルと前記内容語特徴ベクトルとの各々が、学習用テキストを学習して生成した分類モデルの手順を示している領域と手順を示してない領域とのどちらの領域に属するかを判断し、
前記N−gramに用いるNが増加するとともに、前記機能語特徴ベクトルによる分類の性能が向上した場合又は前記内容語特徴ベクトルによる分類の性能が悪化した場合において高い評価値をとり、前記機能語特徴ベクトルによる分類の性能が悪化した場合又は前記内容語特徴ベクトルによる分類の性能が向上した場合に、低い評価値をとるような評価基準を用いて、前記被分類テキストの手順を示しているか否かの分類をする、
処理を実行させることを特徴とするテキスト分類プログラム。
In a text classification program that classifies text according to whether it indicates a procedure,
On the computer,
Divide the classified text into function words and content words,
In each of the function word and the content word, N-gram in which the number of combined words is changed stepwise is performed,
Generating a function word feature vector of the function word and a content word feature vector of the content word for each of the N-grams;
Whether each of the function word feature vector and the content word feature vector belongs to a region indicating a procedure of a classification model generated by learning a learning text or a region not indicating a procedure is determined. Judge,
When N used for the N-gram increases and classification performance using the function word feature vector is improved or classification performance based on the content word feature vector is deteriorated, a high evaluation value is obtained, and the function word feature is obtained. When the performance of the classification by the vector is deteriorated or the performance of the classification by the content word feature vector is improved, whether or not the procedure of the classified text is indicated by using an evaluation criterion that takes a low evaluation value Classify,
A text classification program characterized by executing processing.
前記機能語と前記内容語との各々において、uni−gram、bi−gram、及びtri−gramを行うことを特徴とする請求項1記載のテキスト分類プログラム。The text classification program according to claim 1, wherein a uni-gram, a bi-gram, and a tri-gram are performed for each of the function word and the content word. 前記学習用テキストの機能語と内容語との各々において、組み合わせ単語数を段階的に変化させたN−gramを行うことを特徴とする請求項1記載のテキスト分類プログラム。2. The text classification program according to claim 1, wherein N-grams in which the number of combined words is changed stepwise are performed for each of the functional words and the content words of the learning text. 前記N−gramごとに前記分類モデルを生成することを特徴とする請求項3記載のテキスト分類プログラム。The text classification program according to claim 3, wherein the classification model is generated for each of the N-grams.
JP2003142007A 2003-05-20 2003-05-20 Text classification program Withdrawn JP2004348239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003142007A JP2004348239A (en) 2003-05-20 2003-05-20 Text classification program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003142007A JP2004348239A (en) 2003-05-20 2003-05-20 Text classification program

Publications (1)

Publication Number Publication Date
JP2004348239A true JP2004348239A (en) 2004-12-09

Family

ID=33530211

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003142007A Withdrawn JP2004348239A (en) 2003-05-20 2003-05-20 Text classification program

Country Status (1)

Country Link
JP (1) JP2004348239A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338086A (en) * 2005-05-31 2006-12-14 Nomura Research Institute Ltd Topic scale management device
JP2008084064A (en) * 2006-09-28 2008-04-10 National Institute Of Advanced Industrial & Technology Text classification processing method, text classification processing device and text classification processing program
KR100974871B1 (en) * 2008-06-24 2010-08-11 연세대학교 산학협력단 Feature vector selection method and apparatus, and audio genre classification method and apparatus using the same
CN102831131A (en) * 2011-06-16 2012-12-19 富士通株式会社 Method and device for establishing labeling webpage linguistic corpus
CN103412878A (en) * 2013-07-16 2013-11-27 西安交通大学 Document theme partitioning method based on domain knowledge map community structure
CN103902733A (en) * 2014-04-18 2014-07-02 北京大学 Information retrieval method based on interrogative extension
KR101473535B1 (en) 2012-12-28 2014-12-18 한양대학교 산학협력단 Malware classification method using multi n―gram
CN110362684A (en) * 2019-06-27 2019-10-22 腾讯科技(深圳)有限公司 A kind of file classification method, device and computer equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338086A (en) * 2005-05-31 2006-12-14 Nomura Research Institute Ltd Topic scale management device
JP2008084064A (en) * 2006-09-28 2008-04-10 National Institute Of Advanced Industrial & Technology Text classification processing method, text classification processing device and text classification processing program
KR100974871B1 (en) * 2008-06-24 2010-08-11 연세대학교 산학협력단 Feature vector selection method and apparatus, and audio genre classification method and apparatus using the same
CN102831131A (en) * 2011-06-16 2012-12-19 富士通株式会社 Method and device for establishing labeling webpage linguistic corpus
CN102831131B (en) * 2011-06-16 2015-02-11 富士通株式会社 Method and device for establishing labeling webpage linguistic corpus
KR101473535B1 (en) 2012-12-28 2014-12-18 한양대학교 산학협력단 Malware classification method using multi n―gram
CN103412878A (en) * 2013-07-16 2013-11-27 西安交通大学 Document theme partitioning method based on domain knowledge map community structure
CN103902733A (en) * 2014-04-18 2014-07-02 北京大学 Information retrieval method based on interrogative extension
CN103902733B (en) * 2014-04-18 2017-02-01 北京大学 Information retrieval method based on interrogative extension
CN110362684A (en) * 2019-06-27 2019-10-22 腾讯科技(深圳)有限公司 A kind of file classification method, device and computer equipment
CN110362684B (en) * 2019-06-27 2022-10-25 腾讯科技(深圳)有限公司 Text classification method and device and computer equipment

Similar Documents

Publication Publication Date Title
JP3429184B2 (en) Text structure analyzer, abstracter, and program recording medium
KR100446627B1 (en) Apparatus for providing information using voice dialogue interface and method thereof
JP4654780B2 (en) Question answering system, data retrieval method, and computer program
JP5169816B2 (en) Question answering device, question answering method, and question answering program
US8145662B2 (en) Methods and apparatus for generating a data dictionary
JP4706227B2 (en) Hybrid text summary determination method, system and control program, discourse parsing method, system, and method in the system, method and system for dividing text into discourse constituents, method for determining discourse structural representation, and System, hybrid text summarization system
US6167398A (en) Information retrieval system and method that generates weighted comparison results to analyze the degree of dissimilarity between a reference corpus and a candidate document
JP3820242B2 (en) Question answer type document search system and question answer type document search program
US8024175B2 (en) Computer program, apparatus, and method for searching translation memory and displaying search result
US20020078090A1 (en) Ontological concept-based, user-centric text summarization
US20130041652A1 (en) Cross-language text clustering
US20070094004A1 (en) Conversation controller
US20080027916A1 (en) Computer program, method, and apparatus for detecting duplicate data
JP2005122295A (en) Relationship figure creation program, relationship figure creation method, and relationship figure generation device
CN109325201A (en) Generation method, device, equipment and the storage medium of entity relationship data
JP2005122743A5 (en)
JP2006293830A (en) Question answering system, data retrieval method, and computer program
WO2005020091A1 (en) System and method for processing text utilizing a suite of disambiguation techniques
JP2007141090A (en) Question answering system, data retrieval method and computer program
JP2005302042A (en) Term suggestion for multi-sense query
KR20060042296A (en) Method and apparatus for updating dictionary
US8204736B2 (en) Access to multilingual textual resources
JP2004348239A (en) Text classification program
US9223833B2 (en) Method for in-loop human validation of disambiguated features
KR101835994B1 (en) Method and apparatus of providing searching service for electronic books

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060801