JP5380566B2 - Language processing apparatus, program, and method - Google Patents

Language processing apparatus, program, and method Download PDF

Info

Publication number
JP5380566B2
JP5380566B2 JP2012063969A JP2012063969A JP5380566B2 JP 5380566 B2 JP5380566 B2 JP 5380566B2 JP 2012063969 A JP2012063969 A JP 2012063969A JP 2012063969 A JP2012063969 A JP 2012063969A JP 5380566 B2 JP5380566 B2 JP 5380566B2
Authority
JP
Japan
Prior art keywords
token
dictionary
character string
search
hash value
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.)
Expired - Fee Related
Application number
JP2012063969A
Other languages
Japanese (ja)
Other versions
JP2013196478A (en
Inventor
顕司 小野
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.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions Corp
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 Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2012063969A priority Critical patent/JP5380566B2/en
Publication of JP2013196478A publication Critical patent/JP2013196478A/en
Application granted granted Critical
Publication of JP5380566B2 publication Critical patent/JP5380566B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明の実施形態は、用語を格納したデータの構造および用語の検索方法に関する。   Embodiments described herein relate generally to a data structure storing a term and a term searching method.

情報検索システムやかな漢字変換システム、機械翻訳システムを代表とする多くの自然言語処理システムは、英語や日本語など、処理の対象となる言語の個々の単語の情報をあらかじめ機械可読辞書に格納しておき、処理対象となる自然言語文に対して機械可読辞書を用いた高速な辞書検索を行って、入力文の単語情報を解析する処理部を備えていることが多い。この辞書検索は通常形態素解析と呼ばれる処理で実行される。   Many natural language processing systems represented by information retrieval systems, such as kanji conversion systems and machine translation systems, store in advance a machine-readable dictionary of information about individual words in the language to be processed, such as English and Japanese. In addition, it is often provided with a processing unit that performs a high-speed dictionary search using a machine-readable dictionary for a natural language sentence to be processed and analyzes word information of an input sentence. This dictionary search is usually performed by a process called morphological analysis.

日英翻訳システムでは、原文が日本語であるため、日本語の用語が登録された機械可読辞書を用いた日本語形態素解析システムを具備する。一方、英日翻訳システムでは、原文が英語であるため、英語の用語が登録された機械可読辞書を用いた英語形態素解析システムを具備する。   The Japanese-English translation system includes a Japanese morphological analysis system using a machine-readable dictionary in which Japanese terms are registered because the original text is Japanese. On the other hand, since the original text is English, the English-Japanese translation system includes an English morphological analysis system using a machine-readable dictionary in which English terms are registered.

関連技術として、以下の文献が開示されている。   The following documents are disclosed as related technologies.

特開平04−101271号公報Japanese Patent Laid-Open No. 04-101271

本発明が解決しようとする課題は、辞書検索の高速化を図ることが可能な技術を提供することである。   The problem to be solved by the present invention is to provide a technique capable of speeding up dictionary search.

実施形態の言語処理装置は、決定部と、検索部とを有する。決定部は、原文内の文字列の範囲を決定する。検索部は、決定部により決定された範囲内に含まれるトークンを、トークン毎に正規化し、正規化したトークンを連結して連結トークン文字列を作成し、連結トークン文字列が規定長に達している場合、連結トークン文字列を規定長で打ち切り、打ち切りトークン文字列のハッシュ値を算出し、算出したハッシュ値に対応付けられた用語を、ハッシュ値と用語とが対応付けられて事前に登録されている記憶部から、1つまたは複数取得する。   The language processing apparatus according to the embodiment includes a determination unit and a search unit. The determination unit determines the range of the character string in the original text. The search unit normalizes tokens included in the range determined by the determination unit for each token, creates a concatenated token string by concatenating the normalized tokens, and the concatenated token string reaches the specified length. The token string is truncated at the specified length, the hash value of the token string is calculated, and the term associated with the calculated hash value is registered in advance with the hash value and the term associated with each other. One or more are acquired from the storage unit.

原文の一例を示すとともに、辞書検索用のスパンの一例を示す図である。It is a figure which shows an example of the span for a dictionary search while showing an example of an original sentence. 原文と、辞書に登録されている見出しとの対応例を示す図である。It is a figure which shows the example of a response | compatibility with the original text and the headline registered into the dictionary. 原文および辞書見出しを正規化し、ハッシュ値を算出して検索する処理の一例を説明する図である。It is a figure explaining an example of the process which normalizes an original sentence and a dictionary heading, calculates a hash value, and searches. 辞書見出しと、その見出しを正規化した結果との対応例を示す図である。It is a figure which shows the example of a response | compatibility with the result of normalizing the dictionary heading and the heading. ピリオドやコロンを含む原文の一例を示す図である。It is a figure which shows an example of the original text containing a period and a colon. ピリオドが辞書見出し語の一部かどうかを判定するための処理を行う際に必要となるスパンのバリエーション例を示す図である。It is a figure which shows the variation example of the span required when performing the process for determining whether a period is a part of dictionary headword. 実施形態の英語形態素解析システムの構成例を示す図である。It is a figure which shows the structural example of the English morphological analysis system of embodiment. flat辞書の一例を示す図である。It is a figure which shows an example of a flat dictionary. 第1の課題を解消するための検索インデクス作成部の動作例を示す図である。It is a figure which shows the operation example of the search index preparation part for eliminating the 1st subject. 第1の課題を解消するためのスパン決定部の動作例を示す図である。It is a figure which shows the operation example of the span determination part for eliminating the 1st subject. 第1の課題を解消するための辞書検索部の動作例を示す図である。It is a figure which shows the operation example of the dictionary search part for eliminating a 1st subject. 本実施形態のflat辞書を例示する図であり、辞書見出し、正規化文字列、打ち切り正規化文字列の一例を示す図である。It is a figure which illustrates the flat dictionary of this embodiment, and is a figure which shows an example of a dictionary heading, a normalized character string, and a truncation normalized character string. 本実施形態を適用した場合のハッシュ検索処理数の低減例を示す図である。It is a figure which shows the example of reduction of the number of hash search processes at the time of applying this embodiment. 第2の課題を解消するための検索インデクス作成部の動作例を示す図である。It is a figure which shows the operation example of the search index preparation part for eliminating the 2nd subject. 第2の課題を解消するためのスパン決定部の動作例を示す図である。It is a figure which shows the operation example of the span determination part for eliminating the 2nd subject. 第2の課題を解消するための辞書検索部の動作例を示す図である。It is a figure which shows the operation example of the dictionary search part for eliminating a 2nd subject. ピリオドを含んだ原文を例示し、その原文についてのスパンのバリエーションを示した図である。It is the figure which illustrated the variation of the span about the original text which illustrated the period including the period. 図17で示す原文に関するflat辞書の見出し、正規化文字列、逆順打ち切り正規化文字列を例示した図である。It is the figure which illustrated the head of the flat dictionary regarding the original sentence shown in FIG. 17, the normalization character string, and the reverse order truncation normalization character string. 図17で示す原文に対し、本実施形態を適用した場合のハッシュ検索処理数の低減例を示す図である。It is a figure which shows the example of reduction of the number of hash search processes at the time of applying this embodiment with respect to the original text shown in FIG.

本実施形態の説明に入る前に、まずは前提となる技術について説明する。   Before starting the description of the present embodiment, first, a prerequisite technique will be described.

(前提技術)
<辞書検索技術について>
辞書検索技術・アルゴリズムは計算機工学の基本技術の1つであり、辞書検索技術やアルゴリズムについては各種の方式がある。多くの検索方式は、そこで用いられる木状のデータ構造の名前で呼ばれる。たとえば、ハッシュ検索、平衡木、B木、パトリシア木、サフィックス木、トライ木・トライ検索、ダブルアレイなどである。
(Prerequisite technology)
<Dictionary search technology>
The dictionary search technique / algorithm is one of the basic techniques of computer engineering, and there are various methods for the dictionary search technique and algorithm. Many search methods are called by the name of the tree-like data structure used there. For example, hash search, balanced tree, B tree, Patricia tree, suffix tree, trie tree / trie search, double array, and the like.

これらの辞書検索方式は、検索速度や検索に必要なデータ構造(インデクス)の量、そのインデクスの作成速度、検索の仕方(部分一致検索ができるか否か等)にそれぞれ優劣があり、辞書検索が利用されるシーンやシステムで要求される仕様に応じて使い分けられている。   These dictionary search methods have superiority and inferiority in search speed, amount of data structure (index) necessary for search, creation speed of the index, and search method (whether partial match search can be performed, etc.). Are used according to the specifications required by the scene and system used.

<システム辞書、ユーザ辞書>
機械翻訳システムでは、形態素解析に用いる機械可読辞書として、システムがあらかじめ備えているシステム辞書と、ユーザが後から作成するユーザ辞書との両方を備える場合が多い。たとえば日本語形態素解析では、システム辞書は「机」「動く」いった日常的に用いられる単語を含んだ基本辞書と、例えば「形態素解析」といった特定の分野で用いられる専門用語を格納した専門用語辞書とから構成される場合が多い。基本辞書はどのような文書の翻訳でも用いられるが、専門用語辞書は翻訳する文書の分野に応じてユーザが選択できるようになっている。
<System dictionary, user dictionary>
In a machine translation system, as a machine-readable dictionary used for morphological analysis, both a system dictionary provided in advance in the system and a user dictionary created later by a user are often provided. For example, in Japanese morphological analysis, a system dictionary is a technical dictionary that contains basic dictionaries that contain words that are used on a daily basis, such as “desk” and “move”, and technical terms that are used in specific fields such as “morphological analysis”. Often composed of dictionaries. The basic dictionary can be used for translation of any document, but the technical term dictionary can be selected by the user according to the field of the document to be translated.

システム辞書の登録用語数は数十〜数百万語である場合が多く、高速な検索が必要とされる。しかしながら、システム辞書は機械翻訳システムのベンダが提供するものであり、ユーザがそこに登録されている用語を追加したり削除したりすることは想定されていない。よって、後から用語の追加・削除が行われることがないため、以下の事柄が実現可能となる。
(1)システム辞書のデータ構造および検索方式は軽量化および高速化を図ることができる。
(2)機械可読辞書の構築、つまり辞書検索用のインデクスの作成はベンダが一度だけ行えばよい。したがって、インデクス作成の遅い辞書検索方式であっても作成されたインデクスによる辞書検索速度が速い方が好ましい。
(3)計算機システム上でシステム辞書ファイルをアクセスするときはreadonly モードで十分である。これにより、排他制御の省略・システムの簡素化および検索の高速化を図ることができる。
The number of registered terms in the system dictionary is often several tens to several millions, and a high-speed search is required. However, the system dictionary is provided by a machine translation system vendor, and it is not assumed that the user adds or deletes terms registered therein. Therefore, since terms are not added or deleted later, the following matters can be realized.
(1) The data structure and search method of the system dictionary can be reduced in weight and speed.
(2) Construction of a machine-readable dictionary, that is, creation of an index for dictionary search only needs to be performed once by the vendor. Therefore, it is preferable that the dictionary search speed by the created index is high even if the dictionary search method is slow in creating the index.
(3) The readonly mode is sufficient when accessing the system dictionary file on the computer system. As a result, the exclusion control can be omitted, the system can be simplified, and the search speed can be increased.

一方、ユーザ辞書はユーザが後から用語を登録・削除して利用するものであり、システム辞書と要求仕様が異なってくる。具体的には
(1)ユーザ辞書でも近年は登録数が数十万規模になる場合もあり、1つの用語を追加、削除するために辞書全体のインデクスを作り直すことは現実的でない。そこで、部分的にインデクスを作り直すことができる辞書検索方式が必要となる。
(2)ユーザ辞書に対しては読み出しと書き込みの双方があるため、ファイルアクセスにはreadとwriteの両方が存在する。複数のユーザや翻訳プロセスが同一のユーザ辞書をアクセスする場合、必要に応じて排他制御が必要となる。
On the other hand, the user dictionary is used by the user after registering / deleting terms, and the required specifications differ from those of the system dictionary. Specifically, (1) even in user dictionaries, the number of registrations may be several hundreds of thousands in recent years, and it is not realistic to re-index the entire dictionary to add or delete one term. Therefore, there is a need for a dictionary search method that can partially recreate the index.
(2) Since there are both reading and writing for the user dictionary, both read and write exist for file access. When a plurality of users and translation processes access the same user dictionary, exclusive control is necessary as necessary.

<ユーザ辞書でのハッシュ検索の優位性>
上述のように、ユーザ辞書の検索においては、部分的にインデクスを作り直すことができる辞書検索方式が必要となる。ダブルアレイ等の辞書検索方式は、部分的にインデクスを作り直すことが困難である。またパトリシア木やトライ木・トライ検索などでは、辞書登録数をnとすると、検索インデクスはn^2以上のサイズとなる。検索の高速化のため検索インデクスは通常メモリ上に保持される場合が多い。近年は辞書語数が数百万語になる場合も稀でない。したがって検索インデクスが巨大だと検索に巨大なメモリ量が必要となる。
<Advantage of hash search in user dictionary>
As described above, a search for a user dictionary requires a dictionary search method that can partially re-create an index. In a dictionary search method such as a double array, it is difficult to partially re-index. In Patricia tree, trie tree / trie search, etc., if the number of dictionary registrations is n, the search index has a size of n ^ 2 or more. In many cases, the search index is usually held in a memory for speeding up the search. In recent years, it is not uncommon for the number of dictionary words to reach millions of words. Therefore, if the search index is huge, a huge amount of memory is required for the search.

このような事情、およびそのロジックが単純であることから、ユーザ辞書検索ではハッシュ検索を用いることが多い。   Because of this situation and its logic, the user dictionary search often uses a hash search.

<ハッシュ検索を用いた英語形態素解析用の辞書検索>
ここで、ハッシュ検索を用いた英語形態素解析用の辞書検索について述べる。英語形態素解析に求められる機能には以下のものがある。
(1)辞書検索
英語形態素解析の基本機能である。英語の場合、基本的に単語間にはスペースやハイフン等の記号が存在する。一方"computer science" といった複数の単語からなる辞書見出しも存在する。このような事情から、英語の文章に対して原文のいろいろな範囲(スパン)について、その部分が辞書見出し語を構成していないか確認するために辞書引きを行う必要がある。
<Dictionary search for English morphological analysis using hash search>
Here, dictionary search for English morphological analysis using hash search will be described. The functions required for English morphological analysis include the following.
(1) Dictionary search This is a basic function of English morphological analysis. In English, there are basically symbols such as spaces and hyphens between words. On the other hand, there are also dictionary headings consisting of multiple words such as "computer science". For this reason, it is necessary to perform dictionary lookup for various ranges (spans) of the original text in order to confirm whether the portion does not constitute a dictionary headword.

以降、本実施形態では、ハイフン、カンマ等の記号、スペースでセパレートされた文字列をトークンと呼ぶことにする。また、連続する任意のトークン列をスパンと呼ぶ。 Hereinafter, in this embodiment, a character string separated by a symbol such as a hyphen or a comma or a space is referred to as a token. An arbitrary continuous token string is called a span.

図1にその例を示す。この例では原文"The computer science-based algorithm on partial lattice" に対して、辞書検索に必要となるスパンのバリエーションが矢印で示されている。図1において、トークンは、"computer"、science"、"based"、"algorithm"、"on"、"partial"、"lattice"である。これらトークンは、それぞれ辞書に登録されていることが多いが、"computer science", "science-based", "science-based algorithm" といったスパンも、それぞれ1つの意味を成すため、1つの辞書見出しとなって辞書に登録されている可能性がある。このことから、これらのスパンで辞書検索を行う必要がある。尚、「見出し」や「辞書見出し」とは、辞書に登録される用語(文字列)のことを指し、1つのトークンのみならず、複数のトークンにより構成される場合もある。   An example is shown in FIG. In this example, for the original text "The computer science-based algorithm on partial lattice", the span variations required for the dictionary search are indicated by arrows. 1, the tokens are “computer”, science ”,“ based ”,“ algorithm ”,“ on ”,“ partial ”,“ lattice ”, and these tokens are often registered in the dictionary. However, spans such as “computer science”, “science-based”, and “science-based algorithm” also have one meaning, so there is a possibility that they are registered as one dictionary heading in the dictionary. Therefore, it is necessary to perform a dictionary search in these spans, where “heading” and “dictionary heading” refer to terms (character strings) registered in the dictionary, not just one token, It may be composed of multiple tokens.

また、"Times flies like an arrow." といった英語の故事成語なども、その全体で1つの辞書登録用語のように検索できることが好ましい。したがって、検索用語の長さあるいはトークン数については、あまり上限をもたせないことが望ましい。   In addition, it is preferable that English factual words such as “Times flies like an arrow.” Can be searched as a single dictionary registered term. Therefore, it is desirable that the search term length or the number of tokens should not have an upper limit.

(2)多様な辞書登録
例えば近年の特許出願に関する文書などでは、化学式や塩基配列、DNAシーケンス文字列、記号列など極めて長い文字列が1つの専門用語として扱われるケースが多く、よって、極めて長い文字列をそのまま辞書登録されるケースが増している。このような用語についても、ユーザ辞書登録および検索できることが望ましい。また、これらの記号列にはハイフンやコロン、ピリオドなど従来辞書見出し語の構成文字として使われていない文字が含まれる場合がある。特にピリオド記号については、後述する文分割処理の障害となるため、従来の辞書検索システムでは各種制限が存在する場合が多い。しかしどのような文字列も登録・検索できることが辞書検索の理想である。
(2) Diverse dictionary registration For example, in documents related to recent patent applications, extremely long character strings such as chemical formulas, base sequences, DNA sequence character strings, and symbol strings are often treated as one technical term, and therefore extremely long. The number of cases where character strings are directly registered in the dictionary is increasing. It is desirable that such a term can be registered and searched for a user dictionary. These symbol strings may include characters that have not been conventionally used as constituent characters of dictionary headwords, such as hyphens, colons, and periods. In particular, the period symbol is an obstacle to the sentence division processing described later, and thus there are many various limitations in the conventional dictionary search system. However, the ideal dictionary search is that any character string can be registered and searched.

(3)柔軟な辞書検索
英語では辞書見出しと原文の表記とが異なる場合がある。主要なものは、大文字小文字の違いや、活用語尾のゆれ(inflection)である。つまり、小文字でつづられる一般単語でも文頭に位置する場合には、先頭字が大文字になる(capitalize される)という表記の揺れである。その他、"ATTENTION", "NO WARRANTY" のようにすべての文字がcapitalize される場合もある。このほかにも、スペースとハイフンのゆれ、スペースの有無といった表記のゆれが存在する。図2にこの例を示す。図2は、原文と辞書見出しとの対応を示す図である。このようなゆれに対しても、辞書検索でカバーできることが望ましい。さらには、辞書検索においてカバーする表記のゆれの範囲を指定できることが望ましい。ハッシュ検索はこのようなフレキシブルな検索に好適である。
(3) Flexible dictionary search In English, dictionary headings and original text may be different. The main ones are the difference in capitalization and inflection. In other words, when a general word spelled in lowercase is positioned at the beginning of a sentence, the first letter is capitalized (capitalized). In addition, all characters may be capitalized, such as "ATTENTION" and "NO WARRANTY". In addition, there are notations such as fluctuations in spaces and hyphens, and the presence or absence of spaces. An example of this is shown in FIG. FIG. 2 is a diagram showing the correspondence between the original text and dictionary headings. It is desirable that such a fluctuation can be covered by a dictionary search. Furthermore, it is desirable to be able to specify a range of notation fluctuations to be covered in dictionary search. A hash search is suitable for such a flexible search.

図3に例を示す。具体的には、ある辞書見出しを辞書登録する際に、表記を正規化してからハッシュ値(インデクス)を算出し、このハッシュ値に対応付けて辞書見出しの用語を登録する(図3の左列参照)。検索の際も、ユーザから得られる原文を正規化してからハッシュ値を算出し、ハッシュ値が一致する見出し用語を検索する(図3の右列参照)。ハッシュ値と辞書見出しとの関係が1:N(Nは複数)である場合、この検索の際には、ハッシュ検索により検索対象がN個に絞られ、このN個分について、パターンマッチング等の検索処理が行われる。   An example is shown in FIG. Specifically, when a dictionary heading is registered in the dictionary, the hash value (index) is calculated after normalizing the notation, and the dictionary heading term is registered in association with the hash value (the left column in FIG. 3). reference). Also in the search, the original value obtained from the user is normalized and then the hash value is calculated to search for the headline terms that match the hash value (see the right column in FIG. 3). When the relationship between the hash value and the dictionary heading is 1: N (N is a plurality), the search target is narrowed down to N by the hash search, and pattern matching or the like is performed for the N pieces. Search processing is performed.

尚、正規化処理にはステミングといった技術が用いられる。図4にステミング処理後の結果を例示する。このようにして見出し用語が登録された辞書インデクス(ハッシュテーブル)を用いて辞書検索を行うときは、検索キーとなる原文文字列に対しても正規化を行い、ハッシュ値を算出してから辞書検索を行う(図3の右列参照)。この正規化により、表記がゆれても同じ検索キーを得ることができるため、表記のゆれによらない辞書検索が可能になる。   For normalization, a technique such as stemming is used. FIG. 4 illustrates the result after the stemming process. When performing a dictionary search using a dictionary index (hash table) in which headwords are registered in this way, normalization is also performed on the original text string that serves as a search key, and a hash value is calculated before the dictionary is searched. A search is performed (see the right column of FIG. 3). By this normalization, the same search key can be obtained even if the notation is fluctuated, so that a dictionary search can be performed without depending on the notation.

(4)文分割機能
機械翻訳等のシステムでは、原文書全体を処理(翻訳)する際に、原文書に含まれる文章を個々の文に分割して、それを単位として処理(翻訳)を行うことが一般的である。英語の場合、通常ピリオドおよびセミコロンが文のセパレータとなっており、ピリオドないしセミコロンの位置で原文を分割することにより、個々の文が得られる。しかし、図5に示すように、末尾にピリオドがつく略語(例えば企業や会社を示す「Corp.」)等、多くの例外も存在する。また上述したように、ユーザ辞書に登録可能な見出しを制限しない場合、"book. A " のような辞書登録、つまりスペースが後続するピリオドですら見出し用語の一部である場合がありうる。したがって、正確な文分割、あるいは文末位置の判定には辞書検索を行うことが必要となる。
(4) Sentence division function In a system such as machine translation, when the entire original document is processed (translated), the sentence contained in the original document is divided into individual sentences and processed (translated) as a unit. It is common. In English, periods and semicolons are usually sentence separators, and individual sentences can be obtained by dividing the original sentence at periods or semicolons. However, as shown in FIG. 5, there are many exceptions such as an abbreviation with a period at the end (for example, “Corp.” indicating a company or a company). Further, as described above, if the headings that can be registered in the user dictionary are not limited, dictionary registration such as “book. A”, that is, even a period followed by a space may be part of the heading term. Therefore, it is necessary to perform a dictionary search for accurate sentence division or sentence end position determination.

(課題)
<第1の課題>
以上解説したように、英語形態素解析において英語原文に対して辞書検索を行う場合、原文のあらゆるスパンに対して、そのスパンが辞書見出しを構成するか調べるために辞書検索を行うことが必要となる。この検索処理は、原文中のトークン数をnとした場合、辞書検索回数がn!となり、長い文に対しては大変多くのハッシュ辞書検索回数が必要となる。これは、形態素解析処理の速度低下を招く。登録可能な単語長や見出し語トークン数を制約することにより辞書検索回数を減らすことが可能となるが、これは上述した多様な辞書登録に対する障害となる。
(Task)
<First issue>
As explained above, when a dictionary search is performed on an English original text in an English morphological analysis, it is necessary to perform a dictionary search for every span of the original text to check whether the span constitutes a dictionary heading. . In this search process, if the number of tokens in the original text is n, the number of dictionary searches is n! Therefore, a very large number of hash dictionary searches are required for a long sentence. This leads to a decrease in the speed of the morphological analysis process. By restricting the word length and the number of entry word tokens that can be registered, the number of dictionary searches can be reduced, but this is an obstacle to the various dictionary registrations described above.

本実施形態の態様では、辞書見出しをハッシュテーブルに登録する際に、ハッシュキーとなる文字列として、トークン毎にステミングを行って得られた文字列(正規化文字列)をそのまま用いるのでなく、予め規定された文字列長を超す部分を削除した文字列(打ち切り正規化文字列)を用いる。また検索の際にも同様に、トークン毎にステミングを行った文字列(正規化文字列)をそのまま用いるのでなく、上記文字列長を超す部分を削除した文字列(打ち切り正規化文字列)を用いる。   In the aspect of the present embodiment, when registering a dictionary heading in a hash table, a character string (normalized character string) obtained by performing stemming for each token is not used as a character string serving as a hash key. A character string (censored normalized character string) from which a part exceeding a predetermined character string length is deleted is used. Similarly, when searching, instead of using the character string (normalized character string) stemmed for each token as it is, the character string (censored normalized character string) from which the part exceeding the character string length is deleted is used. Use.

<第2の課題>
また上述したように、文分割をする際には、原文に含まれるピリオドやセミコロンが辞書見出し語の一部でないかどうかを判定する必要がある。図6に例を示す。この例では、"rrr" の後ろのピリオドが辞書見出し語の一部かどうかを判定するために必要となる辞書検索のバリエーションや検索数、スパン長を矢印で示している。見出し語長に制約を設けない場合、スパンの開始位置のバリエーションとしてはピリオド位置から文頭にまで遡る必要がある。また、スパンの終了位置のバリエーションもピリオド位置から文末にまで達する必要がある。したがって、ハッシュを用いた辞書検索回数が極端に増えてしまい、形態素解析処理の速度低下を招くという問題がある。
<Second problem>
As described above, when sentence division is performed, it is necessary to determine whether a period or semicolon included in the original sentence is not a part of the dictionary entry word. An example is shown in FIG. In this example, an arrow indicates a variation of the dictionary search, the number of searches, and the span length necessary for determining whether the period after “rrr” is a part of the dictionary entry word. When there is no restriction on the headword length, it is necessary to go back from the period position to the beginning of the sentence as a variation of the start position of the span. Moreover, the variation of the end position of the span needs to reach from the period position to the end of the sentence. Therefore, there is a problem that the number of dictionary searches using a hash is extremely increased, and the speed of morphological analysis processing is reduced.

本実施形態の態様では、文末位置を判定するのに必要となる辞書検索回数の増大を防ぐため、上述の正規化文字列の打ち切り処理を、ピリオド位置から前方に向かうトークン列に対して行う。また、そこで用いるトークン列を逆順にする。これにより、ハッシュによる辞書検索回数を減らし、形態素解析の高速化を図ることが可能となる。   In the aspect of this embodiment, in order to prevent an increase in the number of dictionary searches necessary for determining the sentence end position, the above-described normalization character string truncation process is performed on the token string heading forward from the period position. The token sequence used there is reversed. As a result, the number of dictionary searches by hash can be reduced, and the speed of morphological analysis can be increased.

(実施形態の態様)
上述した課題を解決するシステムの構成例を図7に示す。本実施形態では、英文の原文を取得して日本語訳を出力する翻訳システムに組み込まれた形態素解析システムを一例として示しているが、翻訳システムに限定されない。また本実施形態は、辞書登録の際は登録用データ内(後述のflat辞書)の英文用語に対しての処理について説明し、検索の際は英語原文に対しての処理について説明するが、処理対象の言語は英語に限定されず、その他の自然言語や、プログラミングや数式等の人工言語、形式言語にも適用させてもよい。
(Aspect of Embodiment)
FIG. 7 shows a configuration example of a system that solves the above-described problem. In this embodiment, a morphological analysis system incorporated in a translation system that acquires an original English sentence and outputs a Japanese translation is shown as an example. However, the present invention is not limited to the translation system. In the present embodiment, processing for English terms in registration data (later flat dictionary described later) is described for dictionary registration, and processing for English original text is described for search. The target language is not limited to English, but may be applied to other natural languages, artificial languages such as programming and mathematical formulas, and formal languages.

また以下の説明では、辞書へ用語を登録する動作、辞書から用語を検索する動作の2つの異なる(非同期な)動作があることに留意する。   In the following description, it is noted that there are two different (asynchronous) operations: an operation for registering a term in the dictionary and an operation for retrieving a term from the dictionary.

英語形態素解析システム100(言語処理装置)は、文書情報管理部10、形態素解析部20、検索インデクス作成部30(登録部)を有する。形態素解析部20は、さらに文分割処理部21、スパン決定部22(決定部)、辞書検索部23(検索部)を有し、辞書検索部23は、さらに文字列正規化部24、ハッシュ値計算部25、ハッシュテーブル27、形態素解析辞書26から構成されている。   The English morpheme analysis system 100 (language processing apparatus) includes a document information management unit 10, a morpheme analysis unit 20, and a search index creation unit 30 (registration unit). The morphological analysis unit 20 further includes a sentence division processing unit 21, a span determination unit 22 (determination unit), and a dictionary search unit 23 (search unit). The dictionary search unit 23 further includes a character string normalization unit 24, a hash value The calculation unit 25, the hash table 27, and the morphological analysis dictionary 26 are included.

尚、英語形態素解析システム100は、プロセッサ、メモリ、ハードディスクドライブ等の二次記憶装置、キーボードやマウスの入力装置、モニター等の出力装置を有する従前のコンピュータであるものとする。また図7に示される各ユニットは、1つのコンピュータ筺体で提供されてもよく、使用頻度や使用者数に応じて複数のコンピュータにより構成され、提供されてもよい。また、図7に示される各ユニットは、二次記憶装置に予め導入されているプログラムがメモリにロードされ、ロードされたプログラムがプロセッサにより演算実行されることで実現される。   The English morphological analysis system 100 is assumed to be a conventional computer having a secondary storage device such as a processor, a memory, and a hard disk drive, an input device such as a keyboard and a mouse, and an output device such as a monitor. Each unit shown in FIG. 7 may be provided by a single computer housing, or may be configured and provided by a plurality of computers according to the use frequency or the number of users. Each unit shown in FIG. 7 is realized by loading a program, which has been introduced in advance into the secondary storage device, into the memory, and executing the loaded program by the processor.

まずここで、辞書の検索時に動作するユニットについて説明する。文書情報管理部10は、原文書(電子化された文書)全体の文書情報を取得して管理し、形態素解析部20による文分割結果を格納する。文書情報管理部10は、原文書がHTML、XML文書の場合は原文書に含まれるタグの情報や章・節の構造情報等を一元管理する。これにはDOM(ドキュメントオブジェクトモデル)と呼ばれる技術を用いることができる。   First, a unit that operates when searching a dictionary will be described. The document information management unit 10 acquires and manages the document information of the entire original document (digitalized document), and stores the sentence division result by the morphological analysis unit 20. When the original document is an HTML or XML document, the document information management unit 10 centrally manages tag information, chapter / section structure information, and the like included in the original document. For this, a technique called DOM (Document Object Model) can be used.

形態素解析部20は、文書情報管理部10で管理された原文書情報を参照してその一部あるいは全体の文分割処理および形態素解析を行い、形態素解析結果をファイルや出力装置、または次の工程として実行されるモジュールや関数等の処理部に出力する。形態素解析結果は、通常1つの文ごとの品詞列ないし品詞ラティスとして出力される。   The morpheme analysis unit 20 refers to the original document information managed by the document information management unit 10 to perform partial or entire sentence division processing and morpheme analysis, and outputs the morpheme analysis result to a file, an output device, or the next step. Are output to a processing unit such as a module or a function to be executed. Morphological analysis results are usually output as part-of-speech strings or part-of-speech lattices for each sentence.

文分割処理部21は、スパン決定部22および辞書検索部23をコントロールして原文の文分割を行う。   The sentence division processing unit 21 controls the span determination unit 22 and the dictionary search unit 23 to divide the original sentence.

スパン決定部22は、原文に対してスパンのバリエーションを作成して、各スパンに対して辞書検索を行う(本実施形態のバリエーション例については後述)。   The span determination unit 22 creates a span variation for the original text and performs a dictionary search for each span (a variation example of this embodiment will be described later).

文字列正規化部24は、ステミング等の技術によって表記のゆれを吸収することにより、同じ用語については表記によらず同一の文字列を生成する。ステミングは、公知技術を採用することができるが、本実施形態では、さらに、ステミングされたトークンを連結し、連結トークン文字列が規定長に達している場合は、文字列先頭から規定長で打ち切る処理(規定長を超えた文字列を削除する処理)を行う。また文字列正規化部24は、処理対象にピリオドが含まれている場合などには、トークンを逆順にして連結する処理を行う。これらの処理の詳細については後述する。   The character string normalization unit 24 generates the same character string regardless of the notation for the same term by absorbing the fluctuation of the notation by a technique such as stemming. For the stemming, a publicly-known technique can be adopted. However, in the present embodiment, the stemmed tokens are further concatenated, and if the concatenated token character string has reached the prescribed length, it is cut off from the beginning of the character string with the prescribed length. Perform processing (processing to delete character strings that exceed the specified length). Also, the character string normalization unit 24 performs processing for concatenating tokens in reverse order when the processing target includes a period. Details of these processes will be described later.

ハッシュ値計算部25は、文字列正規化部24により正規化された文字列のハッシュ値を計算する。ハッシュ値の計算に用いるハッシュ関数については公知の技術を用いることができる。   The hash value calculation unit 25 calculates the hash value of the character string normalized by the character string normalization unit 24. A publicly known technique can be used for the hash function used for calculating the hash value.

ハッシュテーブル27は、ハッシュ値から形態素解析辞書26中の用語エントリを取得するときに用いられるものであり、通常、単方向リンクリストとして実装される。形態素解析辞書26は、flat辞書(後述)の個々の用語の情報を機械可読用に構成したものである。尚、ハッシュテーブル27や形態素解析辞書26は、メモリや二次記憶装置(これらを記憶部とする)に記憶されている。   The hash table 27 is used when acquiring a term entry in the morphological analysis dictionary 26 from a hash value, and is usually implemented as a unidirectional link list. The morphological analysis dictionary 26 is configured to machine-readable information on individual terms in a flat dictionary (described later). Note that the hash table 27 and the morphological analysis dictionary 26 are stored in a memory or a secondary storage device (which is referred to as a storage unit).

次に、辞書登録時に主として動作するユニットである検索インデクス作成部30について説明する。検索インデクス作成部30は、検索処理(形態素解析処理)の実行に先立って、オフラインでflat辞書を解析してハッシュ値を算出し、ハッシュ検索用のハッシュテーブル27と形態素解析辞書26とを作成する。flat辞書とは、辞書検索インデクスの作成の源となるテキストファイルである。図8に例を示す。本実施形態のflat辞書は、見出し用語、および当該見出し語の品詞、単語の活用形の情報である変化形、訳語情報等を含む情報である。検索インデクス作成部30は、このflat辞書の見出し用語を正規化し、正規化後の文字列のハッシュ値を算出してハッシュテーブル27に登録するとともに、flat辞書内で定義されている見出し用語、品詞、変化形、訳語を1行ずつ形態素解析辞書26に登録する。また検索インデクス作成部30は、登録するハッシュテーブル27内のハッシュ値が、登録する形態素解析辞書26内の見出し文字列へのリンクとなるように定義付けをする。   Next, the search index creation unit 30 which is a unit that mainly operates during dictionary registration will be described. Prior to execution of the search process (morpheme analysis process), the search index creation unit 30 analyzes the flat dictionary offline to calculate a hash value, and creates a hash table 27 and a morpheme analysis dictionary 26 for hash search. . A flat dictionary is a text file that is a source for creating a dictionary search index. An example is shown in FIG. The flat dictionary of the present embodiment is information including a headline term, a part of speech of the headword, a change form that is information of a word utilization form, translation information, and the like. The search index creation unit 30 normalizes the headword term in the flat dictionary, calculates a hash value of the normalized character string, registers the hash value in the hash table 27, and defines the headline term and part of speech defined in the flat dictionary. The change form and the translation are registered in the morphological analysis dictionary 26 line by line. In addition, the search index creation unit 30 defines the hash value in the hash table 27 to be registered as a link to the heading character string in the morpheme analysis dictionary 26 to be registered.

検索インデクス作成部30は、正規化を行う際に、文字列正規化部24と同様の処理を行う。すなわち、検索インデクス作成部30は、見出し用語が複数のトークンによって構成されている場合は、ステミングされたトークンを連結し、連結トークン文字列が規定長に達している場合は、文字列先頭から規定長で打ち切る処理を行う。また検索インデクス作成部30は、処理対象の辞書見出しにピリオドが含まれている場合などには、トークンを逆順にして連結する処理を行う。この処理の詳細については後述する。また検索インデクス作成部30は、検索時に算出されるハッシュ値と値を一致させるため、ハッシュ値計算部25と同様のハッシュ算出処理を行う。   The search index creation unit 30 performs the same processing as the character string normalization unit 24 when performing normalization. In other words, the search index creation unit 30 concatenates the stemmed tokens when the headline term is composed of a plurality of tokens, and defines from the beginning of the character string when the concatenated token character string has reached the specified length. A process to cut off by long is performed. Further, the search index creation unit 30 performs a process of concatenating tokens in the reverse order when a period is included in the dictionary head to be processed. Details of this processing will be described later. In addition, the search index creation unit 30 performs the same hash calculation process as the hash value calculation unit 25 in order to match the value with the hash value calculated during the search.

この他、形態素解析部20は、各スパンの辞書検索結果は統合して最終的な形態素解析結果を出力する。また原文の表記のゆれに応じた活用情報を形態素解析結果に付与する。たとえば原文での表記が"books"であり、正規化後の文字列が"book"となって辞書検索できた場合、形態素解析結果に含まれる見出し用語("book")の情報に、複数形であるという情報を付与する。   In addition, the morpheme analysis unit 20 integrates the dictionary search results of each span and outputs a final morpheme analysis result. In addition, utilization information corresponding to the fluctuation of the original text is given to the morphological analysis result. For example, if the original text is "books" and the normalized string is "book" and a dictionary search is possible, the plural form will be included in the heading term ("book") information included in the morphological analysis result. Is given information.

<第1の課題に向けた態様>
このように構成された英語形態素解析システム100において、上述の第1の課題であるハッシュ辞書検索回数の増大を防ぐ態様について述べる。本実施形態では、辞書見出しをハッシュテーブル27に登録する際に、ハッシュキーとなる文字列として、トークン毎にステミングを行って得られた文字列をそのまま用いるのでなく、予め規定された文字列長を超す部分を削除した文字列を用いる。以下、図9〜図13を利用して説明する。
<Mode for the first problem>
In the English morphological analysis system 100 configured as described above, a mode for preventing an increase in the number of hash dictionary searches, which is the first problem described above, will be described. In this embodiment, when registering a dictionary heading in the hash table 27, a character string obtained by performing stemming for each token is not used as a character string to be a hash key, but a character string length defined in advance is used. Use a character string with the part exceeding Hereinafter, description will be made with reference to FIGS. 9 to 13.

まず、形態素解析処理に先立って行われる辞書登録時の動作について説明する。検索インデクス作成部30は、図9に示すアルゴリズムに従ってハッシュテーブル27および形態素解析辞書26を構築する。   First, the operation at the time of dictionary registration performed prior to the morphological analysis process will be described. The search index creation unit 30 constructs the hash table 27 and the morphological analysis dictionary 26 according to the algorithm shown in FIG.

検索インデクス作成部30は、flat辞書中の辞書エントリ(見出し用語)ごとに、S102〜S110の処理を行う(S101)。   The search index creation unit 30 performs the processing of S102 to S110 for each dictionary entry (heading term) in the flat dictionary (S101).

検索インデクス作成部30は、品詞情報、訳語情報などの用語情報を形態素解析辞書26に登録する(S102)。検索インデクス作成部30は、辞書エントリに記述された活用情報に基づき表記のゆれ(動詞や形容詞の活用形、名詞の複数形や所有格など)を生成する(S103)。   The search index creation unit 30 registers term information such as part of speech information and translation information in the morphological analysis dictionary 26 (S102). The search index creation unit 30 generates a notation fluctuation (a verb or adjective usage, a plural form of a noun, a possessive case, etc.) based on the usage information described in the dictionary entry (S103).

検索インデクス作成部30は、上記表記ゆれ毎に、以下の処理を行う。すなわち、検索インデクス作成部30は、辞書エントリが複数のトークンにより構成されている場合は、トークンに分割し(S105)、トークン毎にステミングを行う(S106)。検索インデクス作成部30は、ステミングされたトークン文字列を連結して連結トークン文字列を作成する(S107)。検索インデクス作成部30は、連結トークン文字列が規定文字列長に達している場合は、連結した文字列の先頭から規定文字列長で打ち切る(S108)。検索インデクス作成部30は、打ち切った残りの文字列(打ち切りトークン文字列、打ち切り正規化文字列)についてのハッシュ値を計算する(S109)。   The search index creation unit 30 performs the following processing for each notation fluctuation. That is, when the dictionary entry is composed of a plurality of tokens, the search index creation unit 30 divides the dictionary entry into tokens (S105) and performs stemming for each token (S106). The search index creation unit 30 creates a concatenated token character string by concatenating the stemmed token character strings (S107). When the concatenated token character string has reached the specified character string length, the search index creation unit 30 terminates the concatenated character string from the beginning with the specified character string length (S108). The search index creation unit 30 calculates a hash value for the remaining censored character string (canceled token character string, censored normalized character string) (S109).

検索インデクス作成部30は、ハッシュ値から形態素解析辞書26の用語登録位置へのリンクをハッシュテーブル27に登録する(S110)。   The search index creation unit 30 registers a link from the hash value to the term registration position of the morphological analysis dictionary 26 in the hash table 27 (S110).

続いて、辞書検索時(形態素解析処理)の動作について説明する。形態素解析処理の実行においては、原文が与えられると、スパン決定部22は、図10に示すアルゴリズムに従って原文の各スパンを生成する。図10の動作について説明する。スパン決定部22は、まず原文のトークン数をカウントする(S201)。ここでは、カウント数をnとする。   Subsequently, an operation at the time of dictionary search (morpheme analysis processing) will be described. In the execution of the morphological analysis process, when the original text is given, the span determination unit 22 generates each span of the original text according to the algorithm shown in FIG. The operation of FIG. 10 will be described. The span determination unit 22 first counts the number of tokens in the original text (S201). Here, the count number is n.

スパン決定部22は、変数sが1(文の先頭のトークン)からnに至るまで、および変数eが(s+1)からnに至るまで、forループ(ネスト構成)を実行する(S202、S203)。   The span determination unit 22 executes a for loop (nested configuration) until the variable s reaches 1 (from the first token of the sentence) to n and the variable e reaches (s + 1) to n (S202, S203). .

スパン決定部22は、変数sから変数eまでのトークン列を1つのスパンとする(S204)。このスパンに対して辞書検索が行われる(S205)。尚、S205の処理は辞書検索部23の処理であり、詳細は後述する。   The span determination unit 22 sets a token string from the variable s to the variable e as one span (S204). A dictionary search is performed for this span (S205). Note that the process of S205 is a process of the dictionary search unit 23, and details will be described later.

ステップS205の辞書検索処理で、合致する見出しが検索された場合(S206、Y)、その辞書検索結果を出力し(S207)、処理はS208に進む。合致する見出しが検索されなかった場合(S206、N)、もしくはS207の処理が行われた後、スパン決定部22は、打ち切り正規化文字列が規定長を超えているかを判定する(S208)。規定長を超えている場合(S208、Y)、スパン決定部22は、内側のループ(変数eのループ)を終了させ、変数sをインクリメントさせて、再度S203からの処理を実行する(S209)。一方、規定長以下の場合(S208、N)、スパン決定部22は、変数eの値をインクリメントさせて、再度S204からの処理を実行する。   If a matching headline is found in the dictionary search process in step S205 (S206, Y), the dictionary search result is output (S207), and the process proceeds to S208. If no matching headline is found (S206, N), or after the processing of S207 is performed, the span determination unit 22 determines whether the censored normalized character string exceeds the specified length (S208). When the specified length is exceeded (S208, Y), the span determination unit 22 terminates the inner loop (loop of variable e), increments variable s, and executes the processing from S203 again (S209). . On the other hand, when the length is equal to or less than the specified length (S208, N), the span determination unit 22 increments the value of the variable e and executes the processing from S204 again.

上記S201〜S209の動作により、図1に示すような順番でスパンが生成される。辞書検索部23は、スパン決定部22から与えられた原文の文字列スパンに対して、図11に示すアルゴリズムに従って辞書検索(上記S205の処理)を行う。   By the operations of S201 to S209, spans are generated in the order as shown in FIG. The dictionary search unit 23 performs a dictionary search (the process of S205) according to the algorithm shown in FIG. 11 with respect to the original character string span given from the span determination unit 22.

辞書検索部23は、スパンに含まれる文字列(スパン文字列)をトークンに分割する(S301)。辞書検索部23は、トークン毎にステミングを行い(S302)、ステミングされたトークン文字列を連結する(S303)。辞書検索部23は、連結したトークン文字列を、文字列先頭から規定文字列長で打ち切る(S304)。辞書検索部23は、打ち切り正規化文字列のハッシュ値を計算し(S305)、計算したハッシュ値、およびハッシュテーブル27に基づき、形態素解析辞書26の用語登録位置へのリンクを取得する(S306)。   The dictionary search unit 23 divides the character string included in the span (span character string) into tokens (S301). The dictionary search unit 23 performs stemming for each token (S302), and connects the token character strings that are stemmed (S303). The dictionary search unit 23 terminates the concatenated token character string with the specified character string length from the beginning of the character string (S304). The dictionary search unit 23 calculates a hash value of the censored normalized character string (S305), and acquires a link to the term registration position of the morphological analysis dictionary 26 based on the calculated hash value and the hash table 27 (S306). .

辞書検索部23は、取得したリンクから形態素解析辞書26に登録された用語情報(1つまたは複数(N))を取得し(S307)、用語情報ごとに、以下の処理を実施する(S308)。辞書検索部23は、形態素解析辞書26の各エントリに記述された活用情報の基づき、表記のゆれ(動詞や形容詞の活用形、名詞の複数形や所有格など)を生成する(S309)。辞書検索部23は、スパン文字列、および原文の後続する文字列が、表記のゆれのいずれかに一致するかを判定する(S310)。一致しない場合(S310、一致しなかった)、辞書検索部23による検索処理は終了し、一致する場合(S310、一致した)、辞書検索部23は、一致したゆれの表記の活用情報に応じて辞書検索結果に活用情報を付与し(S311)、辞書検索結果を出力する(S312)。このときの出力先は、機能呼び出し元のスパン決定部22であるとするが、ファイルや出力装置に出力されてもよい。   The dictionary search unit 23 acquires the term information (one or more (N)) registered in the morphological analysis dictionary 26 from the acquired link (S307), and performs the following processing for each term information (S308). . The dictionary search unit 23 generates notation fluctuations (verb or adjective usage, plurals of nouns, possession, etc.) based on the usage information described in each entry of the morphological analysis dictionary 26 (S309). The dictionary search unit 23 determines whether the span character string and the subsequent character string in the original text match any of the notation fluctuations (S310). When they do not match (S310, they do not match), the search processing by the dictionary search unit 23 ends, and when they match (S310, they match), the dictionary search unit 23 responds to the utilization information of the notation of the matching fluctuation. Utilization information is added to the dictionary search result (S311), and the dictionary search result is output (S312). The output destination at this time is assumed to be the function caller span determination unit 22, but may be output to a file or an output device.

上記各動作ついて、具体例を図12および図13に示しつつ説明する。   A specific example of each of the above operations will be described with reference to FIGS.

図12は、図9に示す検索インデクス作成部30の動作を説明するものであり、図12の第1列の見出し用語を登録する場合の例である。今、flat辞書に図12の第1列に示すような見出し用語があった場合、検索インデクス作成部30は、各見出しについて、トークン毎に正規化して連結し(第2列参照)、最終的に第3列に示す打ち切り正規化文字列を生成する。打ち切りの規定長は、この例では14としている。この打ち切り正規化文字列に対して、検索インデクス作成部30はハッシュ値を計算し、その値に基づいてハッシュテーブル27から形態素解析辞書26へのリンクを生成する。尚、打ち切り正規化文字列の作成に至るまでの処理は、文字列正規化部24が行ってもよく、またハッシュ値の計算は、ハッシュ値計算部25が行ってもよい。   FIG. 12 explains the operation of the search index creation unit 30 shown in FIG. 9, and is an example when registering the heading terms in the first column of FIG. If there is a heading term as shown in the first column of FIG. 12 in the flat dictionary, the search index creation unit 30 normalizes and concatenates each heading for each token (see the second column). The censored normalized character string shown in the third column is generated. The specified length of censoring is 14 in this example. The search index creation unit 30 calculates a hash value for the censored normalized character string, and generates a link from the hash table 27 to the morpheme analysis dictionary 26 based on the value. It should be noted that the processing up to the generation of the censored normalized character string may be performed by the character string normalization unit 24, and the hash value calculation unit 25 may perform the calculation of the hash value.

図13は、図12の見出し用語が登録された形態素解析辞書26およびハッシュテーブル27を用いて、スパン決定部22および辞書検索部23が、与えられた原文についての辞書検索を行う様を図示したものである。スパン決定部22は、図10に示すように、
(1)スパン末尾を伸ばす(1トークン後ろにずらす)。
(2)スパン末尾が文末に達したら、スパン先頭位置を1トークン後ろにずらす。
という順番でスパンの各バリエーションを生成する。
FIG. 13 illustrates how the span determination unit 22 and the dictionary search unit 23 perform a dictionary search for a given original sentence using the morphological analysis dictionary 26 and the hash table 27 in which the heading terms of FIG. 12 are registered. Is. As shown in FIG. 10, the span determination unit 22
(1) Extend the end of the span (shift backward one token).
(2) When the end of the span reaches the end of the sentence, the span start position is shifted backward by one token.
Each variation of the span is generated in this order.

生成された各スパンに対し、辞書検索部23は辞書引きを行うが、打ち切り正規化文字列が規定値に達した場合、以降のスパン末尾の拡張とそれに対する辞書検索を省略することができる。なぜなら、それより長い見出し用語が形態素解析辞書26に存在する場合、以降、そのハッシュキーは、図12に示した登録時の"conputscienceb"と同じとなるからである。   The dictionary search unit 23 performs a dictionary lookup for each generated span, but when the censored normalized character string reaches a specified value, subsequent span end expansion and dictionary search for it can be omitted. This is because if a headline term longer than that exists in the morphological analysis dictionary 26, the hash key thereafter becomes the same as “conputscienceb” at the time of registration shown in FIG.

図13の例では、"computer"、"computer science"の順に検索が行われ、"computer science-based"のスパンに対する文字列検索の際に、打ち切り正規化文字列"conputscienceb"のハッシュ値が算出される。このハッシュ値にリンク付けされた見出しは、図12に示すように
computer science-based
computer science-based algorithm
computer science-based algorithm course
computer science-based theory
の4つであり、この4つの見出しがハッシュ値に紐づいた見出しであるとして検索される。そのうち、原文と一致するのは
computer science-based
computer science-based algorithm
である。したがって、この2つが辞書検索結果として出力される。
In the example of FIG. 13, the search is performed in the order of “computer” and “computer science”, and the hash value of the truncated normalized character string “conputscienceb” is calculated in the character string search for the “computer science-based” span. Is done. The heading linked to this hash value is shown in FIG.
computer science-based
computer science-based algorithm
computer science-based algorithm course
computer science-based theory
The four headings are searched as being headlines linked to the hash value. Of which, the original matches
computer science-based
computer science-based algorithm
It is. Accordingly, these two are output as dictionary search results.

図13に示すように、これ以降のスパン
"computer science-based algorithm"
"computer science-based algorithm on "
"computer science-based algorithm on partial"
"computer science-based algorithm on partial lattice"
に対しての、ハッシュ値に基づく辞書検索は不要になる。次のステップである"science"に対する辞書検索も同様に、打ち切り正規化文字列が規定値に達した場合は、以降のスパン末尾の拡張とそれに対する辞書検索を省略することができる。
As shown in FIG.
"computer science-based algorithm"
"computer science-based algorithm on"
"computer science-based algorithm on partial"
"computer science-based algorithm on partial lattice"
In contrast, a dictionary search based on the hash value is unnecessary. Similarly, the dictionary search for “science”, which is the next step, can be omitted if the censored normalized character string reaches a specified value, and the subsequent span end expansion and dictionary search for it are omitted.

本実施形態を適用しない場合、検索漏れの観点から、長文のトークン文字列の全てのスパンのバリエーションについて、トークンを正規化し、連結して文字列を生成してハッシュ値を算出し、ハッシュ値にリンクされた見出しを検索する、という動作となる。   When this embodiment is not applied, from the viewpoint of omission of search, for all span variations of the long token character string, tokens are normalized, concatenated to generate a character string, and a hash value is calculated. The operation is to search for linked headings.

一方、本実施形態を適用させることで、打ち切り正規化文字列に達するまでの分のみ、上記トークン正規化、文字列連結、ハッシュ値算出、ハッシュ値を基に検索する処理を行えばよい。打ち切り正規化文字列以上のスパンについては、上述のように高々数件〜数十件の中から検索するだけで済む。本実施形態のように、打ち切り正規化文字列を用いてハッシュ値を用いた検索を打ち切ることで、ハッシュ値を用いた検索処理の回数を低減させることができる。その代償としては、全スパンのバリエーションに対しハッシュ検索を行う場合よりも、ハッシュ検索結果の件数が増える場合もあるが、この検索結果のうちからマッチング等により抽出する手法の方が、検索の高速化を図ることができる。以上、本実施形態を適用させることで、第1の課題は解消される。   On the other hand, by applying this embodiment, only the processing until reaching the censored normalized character string may be performed based on the token normalization, character string concatenation, hash value calculation, and hash value. For spans longer than the censored normalized character string, it is only necessary to search from several to several tens of cases as described above. As in the present embodiment, the number of search processes using a hash value can be reduced by canceling the search using the hash value using the censored normalized character string. The price of this is that the number of hash search results may increase compared to the case of performing a hash search for all span variations, but the method of extracting from the search results by matching or the like is faster. Can be achieved. As described above, the first problem is solved by applying this embodiment.

<第2の課題に向けた態様>
次に、上記第2の課題である、文末位置を判定するのに必要な辞書検索回数の増大を防ぐ態様について述べる。本実施形態では、先に述べた正規化文字列の打ち切り処理をピリオド位置から前方のトークン列に対して行う。また、そこで用いるトークン列を逆順にする。以下、図14〜図19を用いて説明する。
<Mode for the second problem>
Next, a mode for preventing an increase in the number of dictionary searches necessary for determining the sentence end position, which is the second problem, will be described. In the present embodiment, the above-described normalization character string truncation process is performed on the token string ahead from the period position. The token sequence used there is reversed. Hereinafter, a description will be given with reference to FIGS.

まず、形態素解析処理(検索処理)に先立って、検索インデクス作成部30は、図14に示すアルゴリズムに従ってハッシュテーブル27および形態素解析辞書26を構築する。この処理は、見出し中にピリオドが含まれる用語について実施される。   First, prior to the morpheme analysis process (search process), the search index creation unit 30 constructs the hash table 27 and the morpheme analysis dictionary 26 according to the algorithm shown in FIG. This process is performed for terms that include a period in the heading.

検索インデクス作成部30は、flat辞書中のピリオドを見出し用語に含む辞書エントリについて、以下に記す処理を行う(S401)。   The search index creation unit 30 performs the following process for dictionary entries that include a period in the flat dictionary as a heading term (S401).

検索インデクス作成部30は、品詞情報、訳語情報などの用語情報を形態素解析辞書26に登録する(S402)。検索インデクス作成部30は、辞書エントリに記述された活用情報に基づき表記のゆれ(動詞や形容詞の活用形、名詞の複数形や所有格など)を生成する(S403)。   The search index creation unit 30 registers term information such as part-of-speech information and translation information in the morphological analysis dictionary 26 (S402). The search index creation unit 30 generates notation fluctuations (verb and adjective usage forms, plural forms of nouns, possessive case, etc.) based on the usage information described in the dictionary entry (S403).

検索インデクス作成部30は、上記表記ゆれ毎に、以下に記す処理を行う。すなわち、検索インデクス作成部30は、辞書エントリが複数のトークンにより構成されている場合は、トークンに分割し(S405)、ピリオドよりも後ろのトークンを削除し(S406)、トークン毎にステミングを行う(S407)。検索インデクス作成部30は、トークン単位で順序を逆順にし(S408)、逆順にしたトークン文字列を連結する(S409)。S407、S408は逆転してもよい。検索インデクス作成部30は、トークン文字列先頭から、規定文字列長で打ち切り、逆順打ち切り正規化文字列を作成する(規定文字列長を超えた文字は削除)(S410)。検索インデクス作成部30は、逆順打ち切り正規化文字列のハッシュ値を計算する(S411)。   The search index creation unit 30 performs the following process for each notation fluctuation. That is, if the dictionary entry is composed of a plurality of tokens, the search index creation unit 30 divides the token entry into tokens (S405), deletes tokens after the period (S406), and performs stemming for each token. (S407). The search index creation unit 30 reverses the order in token units (S408), and concatenates the token character strings in the reverse order (S409). S407 and S408 may be reversed. The search index creation unit 30 creates a normalized character string that is truncated at the specified character string length from the beginning of the token character string, and creates a reverse-censored normalized character string (deletes characters that exceed the specified character string length) (S410). The search index creation unit 30 calculates a hash value of the reverse order censored normalized character string (S411).

検索インデクス作成部30は、ハッシュ値から形態素解析辞書26の用語登録位置へのリンクをハッシュテーブル27に登録する(S412)。   The search index creation unit 30 registers a link from the hash value to the term registration position of the morphological analysis dictionary 26 in the hash table 27 (S412).

検索時の動作ついて説明する。検索時、文末判定処理の実行の際、原文が与えられるとスパン決定部22は、図15に示すアルゴリズムに従って原文のピリオド位置の周辺のスパンを生成する。図15の動作について説明する。スパン決定部22は、この処理で、ピリオドが文切りを意味するピリオドであるか否かも合わせて判定することができる。   The operation during search will be described. At the time of retrieval, when the original sentence is given during execution of the sentence end determination process, the span determination unit 22 generates a span around the period position of the original sentence according to the algorithm shown in FIG. The operation of FIG. 15 will be described. In this process, the span determination unit 22 can also determine whether or not the period is a period meaning a sentence cut.

スパン決定部22は、まず原文の中のピリオド位置を探す(S501)。このピリオドの位置をnとする。次いで、スパン決定部22は、変数sが(n−1)から1に至るまで、S503〜S508の処理を繰り返し実行する(S502)。尚、S502において、値(n−1)は、ピリオド文字の1つ前(直前)のトークンを意味し、値1は、文の先頭のトークンを意味する。   The span determination unit 22 first searches for a period position in the original text (S501). The position of this period is n. Next, the span determination unit 22 repeatedly executes the processing of S503 to S508 until the variable s reaches 1 from (n−1) (S502). In S502, the value (n-1) means the token immediately before (immediately before) the period character, and the value 1 means the first token of the sentence.

スパン決定部22は、変数sから(n−1)までのトークン列を1つのスパンとし(S503)、このスパンに対して、辞書検索が行われる(S504)。尚、ステップS504の処理は辞書検索部23の処理であり、詳細は後述する。   The span determination unit 22 sets a token string from the variable s to (n−1) as one span (S503), and a dictionary search is performed for this span (S504). Note that the process of step S504 is a process of the dictionary search unit 23, and details will be described later.

ステップS504の辞書検索処理で、合致する見出しが検索された場合(S505、Y)、当該ピリオドは、辞書内に登録されている用語で用いられている文字であるため、スパン決定部22は、文の区切りを意味するピリオドとしては扱わず、よって文切りを行わない(S506)。処理は、その後S507に進む。一方、合致する見出しが検索されなかった場合(S505、N)、もしくはS506の処理が行われた後、スパン決定部22は、逆順打ち切り正規化文字列が規定長を超えているかを判定する(S508)。規定長を超えている場合(S508、Y)、スパン決定部22は、当該ピリオドが辞書内に登録されている用語で用いられた文字では無いため、当該ピリオドで文切りを行い、処理を終了させる(S508)。また逆順打ち切り正規化文字列が規定長を超えていない場合(S507、N)、スパン決定部22は、変数sの値をデクリメントしてS503からの処理を再度実行する。   If a matching headline is searched in the dictionary search process in step S504 (S505, Y), the period is a character used in a term registered in the dictionary, and therefore the span determination unit 22 It is not treated as a period meaning a sentence delimiter, and therefore the sentence is not cut (S506). Then, the process proceeds to S507. On the other hand, if no matching headline is found (S505, N), or after the processing of S506 is performed, the span determination unit 22 determines whether the reverse-censored normalized character string exceeds the specified length ( S508). If it exceeds the specified length (S508, Y), the span determination unit 22 cuts the sentence at the period and ends the process because the period is not a character used in the term registered in the dictionary. (S508). If the reverse-censored normalized character string does not exceed the specified length (S507, N), the span determination unit 22 decrements the value of the variable s and executes the processing from S503 again.

辞書検索部23は、スパン決定部22から与えられた原文のピリオド位置の周辺のスパンに対して、図16に示すアルゴリズムに従って辞書検索(上記S504の処理)を行う。   The dictionary search unit 23 performs a dictionary search (the process of S504 above) on the span around the period position of the original text given from the span determination unit 22 in accordance with the algorithm shown in FIG.

辞書検索部23は、ピリオドで終わるスパン中の文字列(スパン文字列)をトークンに分割する(S601)。辞書検索部23は、トークン毎にステミングを行い(S602)、ステミングしたトークンを逆順にして(S603)、逆順後のトークンを連結する(S604)。尚、ステップS602、S603の順序は逆転してもよいが、図14のS407、S408と同じ順となるようにする。   The dictionary search unit 23 divides the character string in the span (span character string) that ends with a period into tokens (S601). The dictionary search unit 23 performs stemming for each token (S602), reverses the stemmed tokens in reverse order (S603), and connects the tokens after the reverse order (S604). The order of steps S602 and S603 may be reversed, but the order is the same as S407 and S408 in FIG.

辞書検索部23は、文字列先頭からの規定文字列長で打ち切る(逆打ち切り正規化文字列)(S605)。辞書検索部23は、逆打ち切り正規化文字列のハッシュ値を計算し(S606)、計算したハッシュ値、およびハッシュテーブル27に基づき、形態素解析辞書26の用語登録位置へのリンクを取得する(S607)。   The dictionary search unit 23 cuts off at the specified character string length from the beginning of the character string (reverse censored normalized character string) (S605). The dictionary search unit 23 calculates a hash value of the reverse censored normalized character string (S606), and acquires a link to the term registration position of the morphological analysis dictionary 26 based on the calculated hash value and the hash table 27 (S607). ).

辞書検索部23は、取得したリンクから形態素解析辞書26に登録された用語情報(1つまたは複数(N))を取得し(S608)、用語情報ごとに、以下の処理を実施する(S609)。辞書検索部23は、形態素解析辞書26の各エントリに記述された活用情報の基づき、表記のゆれ(動詞や形容詞の活用形、名詞の複数形や所有格など)を生成する(S610)。辞書検索部23は、スパン文字列が上記表記のゆれのいずれかに一致するかを判定する(S611)。一致しない場合(S611、一致しなかった)、辞書検索部23による検索処理は終了し、一致する場合(S611、一致した)、辞書検索部23は、原文のピリオド以降の文字列が、上記表記のゆれのピリオド以降の部分と一致するかを判定する(S612)。一致しない場合(S612、一致しなかった)、辞書検索部23による検索処理は終了し、一致する場合(S612、一致した)、辞書検索結果を出力する(S613)。このときの出力先は、機能呼び出し元のスパン決定部22であるものとするが、ファイルや出力装置に出力されてもよい。   The dictionary search unit 23 acquires the term information (one or more (N)) registered in the morphological analysis dictionary 26 from the acquired link (S608), and performs the following processing for each term information (S609). . Based on the utilization information described in each entry of the morphological analysis dictionary 26, the dictionary search unit 23 generates notation fluctuations (utilization forms of verbs and adjectives, plural forms of nouns, possessive cases, etc.) (S610). The dictionary search unit 23 determines whether the span character string matches any of the above-described fluctuations (S611). When they do not match (S611, they do not match), the search processing by the dictionary search unit 23 ends. When they match (S611, they match), the dictionary search unit 23 indicates that the character string after the period of the original text It is determined whether or not it coincides with the portion after the period of fluctuation (S612). When they do not match (S612, they do not match), the search processing by the dictionary search unit 23 ends, and when they match (S612, matches), the dictionary search result is output (S613). The output destination at this time is assumed to be the function caller span determination unit 22, but may be output to a file or an output device.

以下、図17、図18、図19を用いて、上記動作の詳細な説明を行う。   Hereinafter, the above operation will be described in detail with reference to FIGS. 17, 18, and 19.

図17は、1つのピリオドを含むある原文に対して、そのピリオドを含む全スパンのバリエーションを示している。理論的には、これらの各々が辞書登録語である可能性があるため、全てのバリエーションごとに、辞書検索を行う必要がある。   FIG. 17 shows a variation of all spans including a period with respect to a certain original including the period. Theoretically, since each of these may be a dictionary registered word, it is necessary to perform a dictionary search for every variation.

図18は図14に示す検索インデクス作成部30の動作を説明するものであり、図18の第1列を登録する場合の例である。flat辞書に図18の第1列に含まれるようなピリオドを含む見出しが存在する場合、検索インデクス作成部30は、ピリオド位置から前方のトークン列に対して、トークンの正規化、連結を行い(第2列参照)、逆順にして第3列に示すような逆順打ち切り正規化文字列を作成する。この例では打ち切り規定長は12になっている。作成された逆順打ち切り正規化文字列に対してハッシュ値が計算され、算出されたハッシュ値がハッシュテーブル27に登録され、見出し用語を含んだflat辞書内の定義情報が、形態素解析辞書26にハッシュ値と対応付けられて登録される。   FIG. 18 explains the operation of the search index creation unit 30 shown in FIG. 14, and is an example in the case of registering the first column of FIG. When the flat dictionary includes a heading including a period as included in the first column of FIG. 18, the search index creation unit 30 normalizes and concatenates tokens with respect to the token sequence ahead from the period position ( (Refer to the second column) In reverse order, a reverse-censored normalized character string as shown in the third column is created. In this example, the specified cutoff length is 12. A hash value is calculated for the generated reverse-censored normalized character string, the calculated hash value is registered in the hash table 27, and definition information in the flat dictionary including a heading term is hashed in the morphological analysis dictionary 26. Registered in association with the value.

図19は、図18の見出し用語が登録された形態素解析辞書26およびハッシュテーブル27を用いて、原文の分割位置の判定を行う様を図示したものである。   FIG. 19 illustrates how the original sentence division position is determined using the morphological analysis dictionary 26 and the hash table 27 in which the heading terms of FIG. 18 are registered.

スパン決定部22は、図15に示すように、原文中にピリオドがあれば、その位置から前方に向かってスパンを作成し、処理の対象となるトークン列の範囲を決定する。そして、辞書検索部23は、その各々について辞書検索を行う。辞書検索ロジックは、生成された各スパンに対して辞書引きを行うが、逆打ち切り正規化文字列が規定値に達した場合、以降のスパン拡張とそれに対するハッシュによる辞書検索を省略することができる。   As shown in FIG. 15, if there is a period in the original text, the span determination unit 22 creates a span from the position to the front, and determines the range of the token string to be processed. Then, the dictionary search unit 23 performs a dictionary search for each of them. The dictionary search logic performs dictionary lookup for each generated span, but when the reverse-censored normalized character string reaches a specified value, subsequent span expansion and dictionary search by hashing can be omitted. .

図19の例では、スパン"G." に対する辞書検索で辞書見出し"G. Thompson" が検索される(図18も参照)。またスパン"analysis method by G." に対する辞書検索で辞書見出し"analysis method by G. Thompson"と"molecular analysis method by G." が検索される。この時点で逆順打ち切り正規化文字列は規定値に達しているので、スパン"molecular analysis method by G." や"optical molecular analysis method by G."に対してハッシュによる辞書検索を行う必要はない。   In the example of FIG. 19, the dictionary heading “G. Thompson” is searched in the dictionary search for the span “G.” (see also FIG. 18). Also, the dictionary headings “analysis method by G. Thompson” and “molecular analysis method by G.” are searched by dictionary search for the span “analysis method by G.”. At this point, since the reverse-censored normalized character string has reached the specified value, it is not necessary to perform a dictionary search by hash for the span “molecular analysis method by G.” or “optical molecular analysis method by G.”.

文分割が目的であれば、ピリオド位置で1つでも辞書単語が検索されたならば、その位置のピリオドは単語の一部であり文分割すべきでないと判断して処理を終了することができる。原文中にピリオドが複数ある場合は、各ピリオドについて上述した手法を適用すればよい。   If sentence division is the purpose, if even one dictionary word is searched at a period position, it can be determined that the period at that position is part of the word and should not be divided, and the process can be terminated. . When there are a plurality of periods in the original text, the method described above may be applied to each period.

このような態様により、図6に比して、はるかに少ない辞書検索回数で文分割を行うことができる。上記「第1の課題に向けた態様」でも説明したように、逆順打ち切り正規化文字列を用いることで、ハッシュ値による検索を打ち切り、その代わりに複数ヒットした見出しの中からマッチングするものを抽出する方が、ハッシュ値による検索を全スパンに対して行うよりも、検索が高速となる。   With such an aspect, sentence division can be performed with a much smaller number of dictionary searches than in FIG. As explained above in “Aspects for the first problem”, by using the reverse-censored normalized character string, the search based on the hash value is terminated, and instead, a matching item is extracted from a plurality of hits. The search is faster than the search by hash value for all spans.

尚、本例では、正規化されたトークンの単位で逆順にしている。すなわち、"g"、"b"、"method"、"anal"の順で逆順打ち切り正規化文字列が生成されるとしたが、1文字単位で逆順にしてもよい。この場合、生成される打ち切り文字列は、"gbdohtemsyla"となる。当然、登録時に1文字単位で逆順にした場合、検索時においても、登録したハッシュ値と一致させるために1文字単位で逆順にする必要がある。   In this example, the order is reversed in normalized token units. That is, the reverse-censored normalized character string is generated in the order of “g”, “b”, “method”, “anal”, but it may be reversed in character units. In this case, the generated truncation character string is “gbdohtemsyla”. Naturally, when the order is reversed in units of one character at the time of registration, it is necessary to reverse the order in units of one character to match the registered hash value even at the time of searching.

以上、この実施形態で説明した態様により、用語検索の高速化を図ることができる。   As described above, the term search can be speeded up by the aspect described in this embodiment.

なお、本発明の実施形態を説明したが、当該実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。この新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   In addition, although embodiment of this invention was described, the said embodiment is shown as an example and is not intending limiting the range of invention. The novel embodiment can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof 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 文書情報管理部、20 形態素解析部、21 文分割処理部、22 スパン決定部、23 辞書検索部、24 文字列正規化部、25 ハッシュ値計算部、26 形態素解析辞書、27 ハッシュテーブル、30 検索インデクス作成部、100 英語形態素解析システム(言語処理装置)。   10 document information management unit, 20 morpheme analysis unit, 21 sentence division processing unit, 22 span determination unit, 23 dictionary search unit, 24 character string normalization unit, 25 hash value calculation unit, 26 morpheme analysis dictionary, 27 hash table, 30 Search index creation unit, 100 English morphological analysis system (language processing device).

Claims (5)

原文内の文字列の範囲を決定する決定部と、
前記決定部により決定された範囲内に含まれるトークンを、トークン毎に正規化し、正規化した前記トークンを連結して連結トークン文字列を作成し、該連結トークン文字列が規定長に達している場合、前記連結トークン文字列を前記規定長で打ち切り、前記打ち切りトークン文字列のハッシュ値を算出し、算出した前記ハッシュ値に対応付けられた用語を、ハッシュ値と用語とが対応付けられて事前に登録されている記憶部から、1つまたは複数取得する検索部と、
を有する言語処理装置。
A determination unit that determines the range of the character string in the original text;
The token included in the range determined by the determination unit is normalized for each token, and the normalized token is concatenated to create a concatenated token character string, and the concatenated token character string reaches a specified length. The concatenated token character string is truncated at the specified length, a hash value of the truncated token character string is calculated, and a term associated with the calculated hash value is associated with a hash value and a term in advance. A search unit that acquires one or more from the storage unit registered in
A language processing apparatus.
請求項1に記載の言語処理装置において、
前記検索部は、文の区切り文字としても使用される規定文字が原文にある場合、正規化の前、または後に、前記規定文字の前方にあるトークンの順序を、トークン単位もしくは文字単位で逆順にし、該逆順のトークン文字列を連結して連結トークン文字列を作成する言語処理装置。
The language processing apparatus according to claim 1,
The search unit reverses the order of tokens in front of the specified character in the token unit or the character unit before or after normalization when the specified character used as a sentence delimiter is in the original text. , A language processing apparatus for creating a concatenated token character string by concatenating the token character strings in the reverse order.
請求項1または2に記載の言語処理装置において、さらに、
用語を登録するためのデータに記述された登録用語の文字列を取得し、該登録用語文字列内に含まれるトークンを、トークン毎に正規化し、正規化した前記トークンを連結して連結トークン文字列を作成し、該連結トークン文字列が前記規定長に達している場合、前記連結トークン文字列を前記規定長で打ち切り、前記打ち切りトークン文字列のハッシュ値を算出し、算出した前記ハッシュ値と、前記登録用語文字列とを対応付けて前記記憶部に登録する登録部を有する言語処理装置。
The language processing device according to claim 1, further comprising:
Acquires the character string of the registered term described in the data for registering the term, normalizes the tokens included in the registered term character string for each token, concatenates the normalized tokens, and concatenates the token characters If the concatenated token character string has reached the specified length, the concatenated token character string is censored at the specified length, a hash value of the censored token character string is calculated, and the calculated hash value and A language processing apparatus including a registration unit that registers the registered term character string in association with the storage unit.
コンピュータに、
原文内の文字列の範囲を決定させ、
決定された範囲内に含まれるトークンを、トークン毎に正規化させ、
正規化された前記トークンを連結して連結トークン文字列を作成させ、
前記連結トークン文字列が規定長に達している場合、前記連結トークン文字列を前記規定長で打ち切らせ、
前記打ち切りトークン文字列のハッシュ値を算出させ、
算出された前記ハッシュ値に対応付けられた用語を、ハッシュ値と用語とが対応付けられて事前に登録されている記憶部から、1つまたは複数取得させる
ためのプログラム。
On the computer,
Let the range of text in the text be determined,
Normalize tokens included in the determined range for each token,
Concatenating the normalized tokens to create a concatenated token string;
If the concatenated token character string has reached a specified length, the concatenated token character string is terminated at the specified length;
Calculating a hash value of the censored token string;
A program for acquiring one or more terms associated with the calculated hash value from a storage unit in which the hash value and the term are associated and registered in advance.
コンピュータが、
原文内の文字列の範囲を決定し、
決定した範囲内に含まれるトークンを、トークン毎に正規化し、
正規化した前記トークンを連結して連結トークン文字列を作成し、
前記連結トークン文字列が規定長に達している場合、前記連結トークン文字列を前記規定長で打ち切り、
前記打ち切りトークン文字列のハッシュ値を算出し、
算出した前記ハッシュ値に対応付けられた用語を、ハッシュ値と用語とが対応付けられて事前に登録されている記憶部から、1つまたは複数取得する
方法。
Computer
Determine the range of text in the source text,
Normalize tokens included in the determined range for each token,
Concatenating the normalized tokens to create a concatenated token string,
If the concatenated token character string has reached a specified length, the concatenated token character string is truncated at the specified length;
Calculate a hash value of the censored token string,
A method of acquiring one or more terms associated with the calculated hash value from a storage unit in which the hash value and the term are associated and registered in advance.
JP2012063969A 2012-03-21 2012-03-21 Language processing apparatus, program, and method Expired - Fee Related JP5380566B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012063969A JP5380566B2 (en) 2012-03-21 2012-03-21 Language processing apparatus, program, and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012063969A JP5380566B2 (en) 2012-03-21 2012-03-21 Language processing apparatus, program, and method

Publications (2)

Publication Number Publication Date
JP2013196478A JP2013196478A (en) 2013-09-30
JP5380566B2 true JP5380566B2 (en) 2014-01-08

Family

ID=49395316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012063969A Expired - Fee Related JP5380566B2 (en) 2012-03-21 2012-03-21 Language processing apparatus, program, and method

Country Status (1)

Country Link
JP (1) JP5380566B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017021144A (en) * 2015-07-09 2017-01-26 日本電気株式会社 Translation system and translation method
US11895240B2 (en) * 2016-12-15 2024-02-06 Nec Corporation System, apparatus, method and program for preventing illegal distribution of an access token

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5260123B2 (en) * 2008-04-09 2013-08-14 インターナショナル・ビジネス・マシーンズ・コーポレーション Search system, index creation device, search engine, index creation method, search method and program
JP5249848B2 (en) * 2009-04-30 2013-07-31 日本電信電話株式会社 Information retrieval method and apparatus, program, and computer-readable recording medium

Also Published As

Publication number Publication date
JP2013196478A (en) 2013-09-30

Similar Documents

Publication Publication Date Title
JP4848317B2 (en) Database indexing system, method and program
JP2009266244A (en) System and method of creating and using compact linguistic data
Kallimani et al. Summarizing news paper articles: experiments with ontology-based, customized, extractive text summary and word scoring
Samir et al. Stemming and lemmatization for information retrieval systems in amazigh language
US11842152B2 (en) Sentence structure vectorization device, sentence structure vectorization method, and storage medium storing sentence structure vectorization program
JP5380566B2 (en) Language processing apparatus, program, and method
KR101694179B1 (en) Method and apparatus for indexing based on removing vowel
Paul et al. An affix removal stemmer for natural language text in nepali
JP5869948B2 (en) Passage dividing method, apparatus, and program
JP5169456B2 (en) Document search system, document search method, and document search program
JP5447368B2 (en) NEW CASE GENERATION DEVICE, NEW CASE GENERATION METHOD, AND NEW CASE GENERATION PROGRAM
Hawker et al. Practical queries of a massive n-gram database
Narejo et al. Sindhi morphological analysis: an algorithm for sindhi word segmentation into morphemes
WO2015075920A1 (en) Input assistance device, input assistance method and recording medium
JP7122773B2 (en) DICTIONARY CONSTRUCTION DEVICE, DICTIONARY PRODUCTION METHOD, AND PROGRAM
US20170220557A1 (en) Method, device, and computer program for providing a definition or a translation of a word belonging to a sentence as a function of neighbouring words and of databases
KR101247346B1 (en) System and method for searching dictionary
Reddy et al. POS Tagger for Kannada Sentence Translation
Dubov Text analysis with enhanced annotated suffix trees: Algorithms and implementation
Raj et al. Transliteration based search engine for multilingual information access
JP2000339342A (en) Method and device for retrieving document
Koppikar et al. Efficient Word Processing Applications Using Radix Tree
Kadam Develop a Marathi Lemmatizer for Common Nouns and Simple Tenses of Verbs
Nowak Semantic Search: Design and Implementation of a Vertical Search Service
Stehouwer et al. Finding patterns in strings using suffixarrays

Legal Events

Date Code Title Description
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: 20130903

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130930

R150 Certificate of patent or registration of utility model

Ref document number: 5380566

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees