Natural language processing method, natural language processing system, and natural language processing program
The natural language processing system optimizes data processing by integrating feature weights across matching sequences, addressing inefficiencies in existing systems and enhancing speed and accuracy in tag determination, especially in legal documents.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- LEGALON TECHNOLOGIES INC
- Filing Date
- 2022-10-04
- Publication Date
- 2026-06-02
AI Technical Summary
Existing natural language processing systems face challenges with large data processing amounts, particularly in tasks like context analysis and semantic analysis, which can be inefficient and resource-intensive.
A natural language processing method that integrates weights of features across matching character sequences to reduce data processing by calculating a second weight array based on a first weight array, focusing on pre-set extraction ranges and reducing non-adjacent feature weights to enhance processing efficiency.
This approach reduces the amount of data processed, improving processing speed and accuracy in tag determination tasks, particularly in specialized fields such as legal documents, by optimizing the use of feature weights and reducing unnecessary data considerations.
Smart Images

Figure 0007868854000001 
Figure 0007868854000002 
Figure 0007868854000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to a natural language processing method, a natural language processing system, and a natural language processing program.
Background Art
[0002] In recent years, technologies related to natural language processing such as context analysis and semantic analysis of sentences by computers have been developing.
[0003] In natural language processing by a computer, after the word boundary determination process performed when splitting a sentence into words, a process of determining tags indicating attributes such as the part-of-speech of each word may be performed.
[0004] For example, the device described in Patent Document 1 is a device that extracts an entity from an input sentence. The device morphologically analyzes the input sentence using a morphological analysis model, extracts the top N (N is a natural number greater than 1) morphological sequences with high occurrence probabilities from the morphological sequence of the entire input sentence, and uses an entity extraction model to extract the top M (M is a natural number greater than or equal to 1) morphological sequences including entities from the N extracted morphological sequences.
Prior Art Documents
Patent Documents
[0005]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0006] However, the device described in Patent Document 1 has a problem that the amount of data to be processed becomes large.
[0007] Therefore, one aspect of the present invention aims to provide a natural language processing method, a natural language processing system, and a natural language processing program that can reduce the amount of data to be processed. [Means for solving the problem]
[0008] A natural language processing method according to one aspect of the present invention is a natural language processing method executed by a processor, comprising: calculating a second weight array by integrating the weights of at least one set of features corresponding to a plurality of strings whose last character matches, based on a first weight array relating to weights for determining tags corresponding to words for each of a plurality of features corresponding to at least one string and any word in the at least one string; extracting at least one feature corresponding to a target word based on window width information relating to a pre-set extraction range; and determining the tag of the target word based on the second weight array and the extracted at least one feature. [Effects of the Invention]
[0009] According to one aspect of the present invention, it is possible to provide a natural language processing method, a natural language processing system, and a natural language processing program that can reduce the amount of data to be processed. [Brief explanation of the drawing]
[0010] [Figure 1] This figure shows an overview of the processing in a natural language processing system 100, which is one embodiment of the present invention. [Figure 2] This diagram shows the configuration of a natural language processing system 100, which is one embodiment of the present invention. [Figure 3] This figure shows an example of learning string information stored in the memory unit 110. [Figure 4] This figure shows examples of features extracted by the feature extraction unit 120. [Figure 5] This figure shows an example of the first weight array stored in the memory unit 110. [Figure 6A]This figure shows an overview of the processing when the weights have not been integrated by the second weight array calculation unit 130. [Figure 6B] This figure shows an overview of the processing when the weights have been integrated by the second weight array calculation unit 131. [Figure 7] This figure shows an example of a second weight array stored in the memory unit 110. [Figure 8] This figure shows an example of target string information stored in the memory unit 110. [Figure 9] This figure shows an example of segmented string information stored in the memory unit 110. [Figure 10] This figure shows an example of judgment result information stored in the memory unit 110. [Figure 11] This figure shows the experimental results regarding the processing speed of the natural language processing system 100. [Figure 12] This figure shows an example of a contract 1200 that the natural language processing system 100 will process. [Figure 13] This flowchart shows an example of the process for generating the second weight array in the natural language processing system 100. [Figure 14] This flowchart shows an example of the tag determination process for a target word in the natural language processing system 100. [Modes for carrying out the invention]
[0011] Embodiments of the present invention will be described with reference to the drawings. Figure 1 is a diagram showing an overview of the processing in a natural language processing system 100, which is one embodiment of the present invention.
[0012] In this disclosure, "part" does not merely mean a physical means, but also includes cases where the functions of that "part" are realized by software. Furthermore, even if the functions of one "part" or device are realized by two or more physical means, devices, or software, the functions of two or more "parts" or devices may be realized by one physical means, device, or software.
[0013] The natural language processing system 100 is a system that determines tags corresponding to words included in an arbitrary character string (target character string).
[0014] Here, the tag is, for example, information indicating the part of speech or attribute of a word, or the reading. The part of speech or attribute of a word may be, for example, a noun, a verb, a prefix, a suffix, a common noun, a proper noun, a general noun, or a personal name. The reading may be, for example, hiragana, katakana, or roman letters indicating the pronunciation of a word. Also, a plurality of tags may correspond to one word.
[0015] First, the natural language processing system 100 learns using a learning character string in which tags are set for words and features corresponding to any word in the learning character string, and generates a learned model and a first weight array (S101).
[0016] Here, the feature is information corresponding to a word and includes, for example, a character n-gram or a character type n-gram. Also, the first weight array is array data associating a feature with a weight serving as a criterion for determining a tag corresponding to a word. [[ID=!15]]
[0017] Next, the natural language processing system 100 integrates the weights of at least one set of a plurality of features corresponding to a plurality of character strings in which at least one character from the end matches, included in the first weight array, based on the first weight array, and calculates a second weight array (S102). The natural language processing system 100 integrates, for example, the weights of two features, "the whole world" and "world", included in the first weight array so as to include them in the weight of one feature, "the whole world", and generates a second weight array.
[0018] Thereafter, the natural language processing system 100 extracts features corresponding to a target word that is a target for determining a tag in the target character string (S103).
[0019] Then, the natural language processing system 100 determines a tag corresponding to the target word based on the learned model, the second weight array, and the features corresponding to the extracted target word (S104).
[0020] Furthermore, the natural language processing system 100 can determine the tag corresponding to a word in any given string. In other words, the natural language processing system 100 can also process strings in specialized fields for tag determination. For example, it can process words contained in legal documents such as contracts. Here, a contract is a document that includes clauses and produces a predetermined legal effect, and also includes application forms, memoranda, etc.
[0021] Furthermore, the string in this embodiment may be any string containing at least one character, may be a single character, or may be a string consisting of two or more characters. The string in this embodiment may be extracted from a paper document using image recognition technology (for example, Optical Character Recognition technology).
[0022] Figure 2 shows the configuration of a natural language processing system 100, which is one embodiment of the present invention. The natural language processing system 100 is a system that is communicatively connected to an information processing system 200 and a user terminal 300 via a network such as the Internet. Details of the natural language processing system 100 will be described later.
[0023] The information processing system 200 is, for example, an information processing system that stores training strings and provides training strings to an external information processing system. The information processing system 200 can provide the natural language processing system 100 with training string information and information about features corresponding to the training strings.
[0024] The user terminal 300 is, for example, a computer used by the user, such as a smartphone, tablet, or personal computer. The user terminal 300 can provide the natural language processing system 100 with document data or image data containing data related to words that are subject to tag determination processing by the natural language processing system 100, or can instruct the natural language processing system 100 to acquire such data from an external information processing system.
[0025] Note that while Figure 2 shows only one user terminal 300 as an example, the number of user terminals 300 is not limited to this.
[0026] Furthermore, the natural language processing system 100 may be a system in which all or part of it is incorporated into at least one of the information processing system 200 and the user terminal 300.
[0027] Next, the details of the natural language processing system 100 will be described. The natural language processing system 100 comprises a memory unit 110, a learning string acquisition unit 115, a feature extraction unit 120, a learning unit 125, a second weight array calculation unit 130, a target string acquisition unit 135, a string splitting unit 140, a tag determination unit 145, an output unit 150, a clause splitting unit 155, a clause type determination unit 160, and a display unit 165. Each of the units shown in Figure 2 can be realized, for example, by using a memory area or by having a processor execute a natural language processing program stored in the memory area.
[0028] The memory unit 110 of this embodiment stores information processed by the natural language processing system 100. The memory unit 110 can store, for example, learning string information, a first weight array, a second weight array, target string information, segmented string information, and judgment result information, which will be described later.
[0029] The learning string acquisition unit 115 of this embodiment acquires learning string information from the information processing system 200, which is learning string information relating to at least one string in which at least one word has a tag set, and stores it in the storage unit 110.
[0030] Here, the learning string information is information regarding a string in which at least one word is tagged, and is so-called teacher data in machine learning. Also, the learning string information is information that the natural language processing system 100 learns when generating the first weight array described later.
[0031] Here, the tag is, for example, information indicating the word class or attribute of a word, or the reading. The word class or attribute of a word may be, for example, a noun, verb, prefix, suffix, common noun, proper noun, general noun, or personal name. The reading may be, for example, hiragana, katakana, or roman characters indicating the pronunciation of a word. Note that the information indicated by the tag is not limited to this.
[0032] Specifically, the tag corresponding to the word "worldwide" indicates the word class or attribute of the word, or the reading, in a form such as "noun-common noun-general / world".
[0033] The tag corresponding to a word differs according to the meaning of the word in the string (that is, for example, a sentence) to which the word belongs. Specifically, for example, the word "moto" may be a noun when read as "moto", while it may be a suffix when read as "so".
[0034] Note that the storage format and display format of the tag are not limited to the form such as "noun-common noun-general / world".
[0035] Also, in the learning string, it is sufficient that at least one word is tagged, and it is not necessary for all words to be tagged.
[0036] Also, the learning string acquisition unit 115 may acquire the learning string information itself and store it in the storage unit 110, or may acquire information regarding the link of the learning string information and store the information regarding the link of the learning string information in the storage unit 110.
[0037] Figure 3 shows an example of learning string information stored in the memory unit 110. The information stored in the memory unit 110 includes, for example, a learning string ID and learning string content information.
[0038] In this embodiment, the learning string ID is information that identifies the learning string included in the learning string information.
[0039] The learning string content information in this embodiment is information about the content of the learning string. The learning string content information includes tags set for at least one word (for example, "worldwide") contained in the learning string.
[0040] The feature extraction unit 120 of this embodiment extracts features corresponding to words and generates feature information based on window width information relating to a window width that indicates a pre-set extraction range.
[0041] In this embodiment, the window width information is, for example, information indicating the range extracted by the feature extraction unit 120. Details of the features will be described later.
[0042] The feature extraction unit 120 can extract two or more features corresponding to words contained in the learning string information.
[0043] Furthermore, the feature extraction unit 120 can extract at least one feature corresponding to the target word included in the target string information described later, and at least one feature corresponding to the target word included in the segmented string information.
[0044] When the feature extraction unit 120 extracts two or more features corresponding to words included in the learning string information, the feature extraction unit 120 may extract features corresponding to words with tags, or it may extract features corresponding to words without tags. Furthermore, the feature extraction unit 120 may extract two or more features from a single word, or it may extract one feature from each of two or more words (a total of two or more features).
[0045] The feature extraction unit 120 may also obtain feature information from the information processing system 200 regarding two or more features corresponding to words included in the learning string information, and generate feature information.
[0046] Next, the details of the features extracted by the feature extraction unit 120 will be described. For example, character n-grams and character type n-grams can be used as features extracted by the feature extraction unit 120.
[0047] The character n-gram in this embodiment is information that indicates, for example, a character or string of characters between a predetermined word and a predetermined relative position starting from that predetermined word. Here, "n" indicates the number of characters in the character or string of characters.
[0048] The character type n-gram of this embodiment is information indicating, for example, the character type of a character or string of characters between a predetermined word and a predetermined relative position starting from that predetermined word. Here, "character type" refers to information indicating the type of character, and includes, for example, kanji, katakana, hiragana, Roman letters, numbers, and others. Here, "n" indicates the number of characters in the character or string of characters.
[0049] Figure 4 shows an example of features extracted by the feature extraction unit 120. In Figure 4, an example of a feature corresponding to the string 401 "no" in the string "We are the people of the whole world," is shown.
[0050] First, the feature extraction unit 120 sets the window width based on window width information that indicates the range for extracting features. In Figure 4, a window width 402 is shown with a window width of 3 (i.e., 3 characters before and after the string 401). The window width information only needs to be set before the extraction process by the feature extraction unit 120.
[0051] Then, the feature extraction unit 120 extracts character n-grams and character type n-grams for each relative position from the character string 401 (in the case of FIG. 4 where the window width is 3, a total of 7 relative positions from relative position "-3" to "3"). Since the window width is 3, the character n-grams and character type n-grams corresponding to each relative position are character 1-grams to character 3-grams and character type 1-grams to character type 3-grams, respectively.
[0052] As shown in the example of FIG. 4, for example, the character 1-grams include "全", "世", "界", "の", "国", "民", "が" in order of relative position.
[0053] Also, for example, the character type 1-grams include "漢", "漢", "漢", "ひ", "漢", "漢", "ひ" in order of relative position. Here, the character type "漢" indicates that the character type is a Chinese character, and the character type "ひ" indicates that the character type is a hiragana. Note that the notation method of character types is not limited to the method shown in FIG. 4.
[0054] The learning unit 125 of this embodiment learns the relationship between features and tags corresponding to words by using learning string information and two or more pieces of feature information corresponding to the words included in the learning string, generates a first weight array and a learned model, and stores the first weight array and the learned model in the storage unit 110.
[0055] Here, the first weight array of this embodiment is array data regarding weights that serve as criteria for determining the tags of words, and is array data that associates the relationship between two or more features corresponding to the words included in the learning string and the weights for each relative position of the words for each of the two or more features corresponding to the words included in the learning string.
[0056] Furthermore, two or more features corresponding to words in the training string included in the first weight array may be all or part of the features corresponding to the feature information generated by the feature extraction unit 120. Also, two or more features corresponding to words in the training string included in the first weight array may be all or part of the feature information obtained by the feature extraction unit 120 from the information processing system 200.
[0057] The trained model learned by the learning unit 125 is a model that determines the tag corresponding to a word based on the features and weight array (first weight array or second weight array described later) corresponding to any given word.
[0058] Specifically, the trained model outputs a score for the tag of the word to be classified, based on the features and weight arrays (first weight array or second weight array, described later) corresponding to the specific word that is input.
[0059] Figure 5 shows an example of a first weight array stored in the memory unit 110. The first weight array stored in the memory unit 110 includes, for example, feature information, relative position information, and weight information (character n-gram weight information indicating the weight related to character n-grams, and character type n-gram weight information indicating the weight related to character type n-grams).
[0060] The first weight array may be information that combines multiple types of weight information into a single array and associates it with each type of feature information, as shown in Figure 5, or it may be information that associates each type of weight information with each type of feature information.
[0061] Here, the feature information in this embodiment is information about two or more features corresponding to words contained in the learning string, extracted and generated by the feature extraction unit 120. The relative position information in this embodiment is information about the relative position of each feature corresponding to the feature information with respect to the word. The weight information in this embodiment is information about weights that serve as criteria for determining the word tag, corresponding to the features and relative positions.
[0062] The feature information may be information about all the features extracted by the feature extraction unit 120, or it may be information about some of the features. Furthermore, the feature information may be all or part of the feature information acquired by the feature extraction unit 120 from the information processing system 200.
[0063] The generation of the first weight array by the learning unit 125 is performed, for example, in response to instructions from a system administrator. Alternatively, learning may be performed automatically at predetermined times, such as during system maintenance, or immediately before the calculation of the second weight array by the second weight array calculation unit 130, which will be described later. The learning algorithm is not particularly limited, but for example, a Random Forest or a Support Vector Machine (SVM) can be used.
[0064] Furthermore, the memory unit 110 may store the first weight array and the trained model generated by the learning unit 125, and may also store information corresponding to the first weight array stored in an external information processing system, as well as information regarding links to the information corresponding to the first weight array.
[0065] In this embodiment, the second weight array calculation unit 130 calculates a second weight array by integrating the weights of at least one set of features corresponding to multiple strings that match at least one character from the end, based on the first weight array, and stores it in the storage unit 110.
[0066] Specifically, for example, the strings "worldwide" and "world" are multiple strings that match in the last two characters (i.e., "world"). Therefore, the character n-gram features "worldwide" and "world" included in the first weight array correspond to at least one set of multiple features that match in at least one character (in this case, two characters) from the end of multiple strings.
[0067] In other words, the second weight array calculation unit 130 can, for example, integrate the weights corresponding to the character n-gram features "worldwide" and "world" to calculate the weight of the character n-gram feature "worldwide" and generate the second weight array.
[0068] Furthermore, multiple strings that match at least one character from the end may be strings that can be recognized as words, such as "worldwide" or "world," or they may be parts of words, or strings that are a combination of multiple words or parts of multiple words, such as "country of" or "country of the world."
[0069] The feature weight integration process by the second weight array calculation unit 130 may, for example, integrate the weights of two or more features in at least one set by adding the weights of at least one set of features corresponding to multiple strings in the first weight array that match at least one character from the end, or it may be any other calculation process.
[0070] Furthermore, the second weight array calculation unit 130 does not need to integrate all feature combinations corresponding to multiple strings that match at least one character from the end. Also, the calculation of the second weight array by the second weight array calculation unit 130 may be performed automatically, for example, in response to instructions from the system administrator or at a predetermined timing such as during system maintenance, or it may be performed immediately before the determination process of the tag determination unit 145, which will be described later.
[0071] Furthermore, the second weight array calculation unit 130 can calculate a second weight array that does not include the weights of features that are not adjacent to a specific word (for example, the target word described later).
[0072] Specifically, for example, as shown in Figure 4, within the window width 402, for the feature corresponding to the string 401, the character n-gram feature "worldwide" is adjacent to the word "no", while the character n-gram feature "all worlds" is not adjacent to the word "no". In this case, the second weight array calculation unit 130 can calculate a second weight array that does not include the weight of the feature corresponding to the character n-gram feature "all worlds" that is included in the first weight array.
[0073] Features that are not adjacent to a specific word (for example, the target word described later) are features that correspond to words that are far from that specific word in the string. Therefore, features that are not adjacent to that specific word may not be important in the tag determination process for that specific word. Accordingly, the natural language processing system 100 can reduce the amount of data in the second weight array and improve the determination speed of the tag determination unit 145 by calculating a weight array as the second weight array that does not include the weights of features that are not adjacent to that specific word, without impairing the accuracy of the determination by the tag determination unit 145 described later.
[0074] The weight integration process by the second weight array calculation unit 130 will be explained using Figures 6A and 6B. Figures 6A and 6B show an overview of the process by which features corresponding to words are extracted by the natural language processing system 100. Figure 6A shows an overview of the process when the weights have not been integrated by the second weight array calculation unit 130. Figure 6B shows an overview of the process when the weights have been integrated by the second weight array calculation unit 130.
[0075] Node 601 indicates the space between characters in the string to be processed by the natural language processing system 100, edge 602 indicates that nodes 601 are connected by characters, and character 603 indicates the character corresponding to edge 602. Feature 604 indicates the feature corresponding to edge 602. For example, edge 602a indicates the string "worldwide", and indicates that there are features 604a (feature "worldwide") and 604b (feature "world") corresponding to edge 602a. The tag determination unit 145, described later, then determines the word tag based on the weight information corresponding to feature 604a and feature 604b, respectively. Note that the extracted features are not limited to feature 604 shown in Figures 6A and 6B.
[0076] As shown in Figure 6A, if the weights have not been integrated by the second weight array calculation unit 130, the edge 602a corresponds to feature 604a (feature "worldwide") and feature 604b (feature "world"). In other words, if the weights have not been integrated by the second weight array calculation unit 130, the word tag is determined based on the weight information corresponding to feature 604a (feature "worldwide") and feature 604b (feature "world").
[0077] As shown in Figure 6B, the second weight array calculation unit 130 can integrate the weights of features 604a (feature "worldwide") and 604b (feature "world") that correspond to multiple strings that match at least one character from the end. In other words, as shown in Figure 6B, when the weights are integrated by the second weight array calculation unit 130, the word tag is determined based on the weight information corresponding to the integrated feature 604c.
[0078] As a result, the tag determination unit 145, described later, can, for example, when determining a tag corresponding to the word "worldwide," refer to the weight information corresponding to the integrated feature "worldwide" and not refer to the weight information corresponding to the feature "world."
[0079] The second weight array contains weight information for the features used in the integration (for example, the feature "world"), and the tag determination unit 145 can refer to the weights of the features used in the integration (for example, the feature "world") included in the second weight array. In other words, the tag determination unit 145 can refer to the weight of the feature "world" when determining the tag of a string such as "all citizens of a certain world" (i.e., a string that is not the string "the whole world" but contains the word "world").
[0080] Figure 7 shows an example of a second weight array stored in the memory unit 110. The second weight array stored in the memory unit 110 includes, for example, feature information, relative position information, and weight information (character n-gram weight information, character type n-gram weight information).
[0081] The second weight array may be information that combines multiple types of weight information into a single array and associates it with each type of feature information, as shown in Figure 7, or it may be information that associates each type of weight information with each type of feature information.
[0082] The target string acquisition unit 135 of this embodiment acquires target string information, which is a string containing a target word that is the target of tag determination processing, based on a string or document data or image data containing data related to a string provided to the natural language processing system 100, and stores it in the storage unit 110.
[0083] The target string acquisition unit 135 can, for example, acquire strings contained in a document from document data or image data of a legal document such as a contract. The target string acquisition unit 135 may acquire Japanese strings or strings in other languages.
[0084] The target string acquisition unit 135 may receive a string or document data or image data containing data related to a string from the user terminal 300, or it may acquire document data or image data from an external information processing system based on instructions from the user via the user terminal 300.
[0085] When the natural language processing system 100 receives document data containing data related to character strings, the target character acquisition unit 135, for example, analyzes the document data to obtain the character strings contained in the provided document data.
[0086] When the natural language processing system 100 receives image data containing data related to character strings, the target character acquisition unit 135 acquires the character strings contained in the provided image data, for example, using image recognition technology.
[0087] The target string acquisition unit 135 acquires the target string, which has been divided into individual words. That is, the target string is a string associated with information such as whether or not there are word boundaries between characters.
[0088] The target string acquired by the target string acquisition unit 135 may be a target string that has undergone word segmentation processing in the natural language processing system 100. In this case, the natural language processing system 100 acquires a string that has not undergone word segmentation processing, and generates a target string by dividing the string into individual words using a predetermined word segmentation process to determine whether or not there are word boundaries between characters. The target string acquisition unit 135 then acquires the target string that has been divided into individual words.
[0089] Figure 8 shows an example of target string information stored in the storage unit 110. The target string information stored in the storage unit 110 includes, for example, a target string ID and target string content information. In this embodiment, the target string ID is information that identifies the target string containing the target word that is the target of the tag determination process in the natural language processing system 100. In this embodiment, the target string content information is information related to the content of the target string.
[0090] In Figure 8, the position of word boundaries is indicated using " / " between characters in the target string content information. However, the information indicating the position of word boundaries is not limited to " / ", and other symbols or methods may be used.
[0091] The string splitting unit 140 of this embodiment splits the target string to generate split strings and stores the split string information relating to the generated split strings in the storage unit 110.
[0092] The string splitting unit 140 can split the target string at arbitrary character intervals, in accordance with the computer's computing environment and the nature of the target string. The string splitting unit 140 may split the target string based on character intervals set according to predetermined conditions, or it may split the target string based on character intervals set by user operations via the user terminal 300.
[0093] The string splitting unit 140 may split the target string so that the split strings do not overlap, or it may split the target string so that parts of the split strings overlap.
[0094] Furthermore, in the parallel determination process described later, which determines word tags in parallel for each split string, the string splitting unit 140 may split the target string into split strings such that both ends of the split strings overlap by the window width corresponding to the window width information, in order to avoid cross-referencing between split strings.
[0095] Figure 9 shows an example of split string information stored in the storage unit 110. The split string information stored in the storage unit 110 includes, for example, a split string ID and split string content information. In this embodiment, the split string ID is split string identification information that identifies the split strings that have been split by the string splitting unit 140. In this embodiment, the split string content information is information relating to the content of the split strings.
[0096] Figure 9 shows a split string that, in order to avoid references between split strings in the parallel determination process described later, where word tags are determined in parallel for each split string, has been split so that both ends of the split string overlap by the window width corresponding to the window width information (in this case, 6 characters).
[0097] In this embodiment, the tag determination unit 145 determines the tag of a target word based on the trained model, the second weight array, and at least one feature information corresponding to a target word contained in the target string or split string, which is extracted and generated by the feature extraction unit 120, and stores the determination result information associating the target word and the tag in the storage unit 110.
[0098] Here, the target word is, for example, a word included in the target string or split string that is subject to tag determination processing by the tag determination unit 145.
[0099] The tag determination unit 145 inputs the second weight array and at least one feature information corresponding to the target word into the trained model and calculates a score for at least one candidate tag corresponding to the target word. Then, the tag determination unit 145 determines that the tag whose score is above a certain value (for example, the tag with the highest score) is the tag corresponding to the target word.
[0100] Furthermore, the tag determination unit 145 can output a score for the tag of the target word after optimized processing (for example, memory optimization processing). Here, the memory optimization processing includes, for example, processing to optimize the memory usage of the array and processing to optimize the size of the information indicating the attributes of the array, which are used when pattern matching the feature information contained in the weight array and the feature information corresponding to the target word. Note that these optimization processes can be applied not only to pattern matching of feature information but more generally to pattern matching of strings.
[0101] Furthermore, the tag determination unit 145 can perform tag determination processing on multiple target words in multiple segmented strings in parallel.
[0102] Figure 10 shows an example of judgment result information stored in the storage unit 110. The judgment result information stored in the storage unit 110 includes, for example, a judgment result ID, a target string ID, and judged string content information. In this embodiment, the judgment result ID is information that identifies the judgment result information.
[0103] The determined string content information in this embodiment is, for example, information that associates a target string or split string with a tag corresponding to at least one target word contained in the target string or split string.
[0104] In Figure 10, the judgment result ID is associated with the judged string content information, but it may also be associated with the target word. That is, the storage unit 110 may store judgment result information for each string, or it may store judgment result information for each word.
[0105] The output unit 150 of this embodiment outputs judgment result information.
[0106] The output unit 150 may output the judgment result information to, for example, the user terminal 300. In this case, the output unit 150 may output the information to the user terminal 300 in a display manner (for example, color) corresponding to the type of tag (for example, type of part of speech).
[0107] Furthermore, the output unit 150 may output to another information processing system (for example, an information processing system that performs natural language processing following tag determination processing).
[0108] Figure 11 shows experimental results regarding the processing speed of the natural language processing system 100. The figure in Figure 11 shows the time (in milliseconds) and accuracy of the determination of word tags contained in a given string for both the processing method used by the natural language processing system 100 and a processing method different from that of the natural language processing system 100.
[0109] In the diagram shown in Figure 11, A and B show the time and accuracy of the word segmentation process performed before the tag detection process, while C and D show the time and accuracy of the word segmentation process and the tag detection process.
[0110] Furthermore, A and C are results obtained using "KyTea" (Kyoto Text Analysis Toolkit), which is a processing method different from the processing method used in the natural language processing system 100.
[0111] B is the result using "Vaporetto," a processing method different from "KyTea." D is the result using "Vaporetto" for word segmentation and the processing method of the natural language processing system 100 for tag determination. In D, the natural language processing system 100 (in particular the second weight array calculation unit 130) integrates the weights of at least one set of features corresponding to multiple strings that match at least one character from the end, based on the first weight array, and further calculates a second weight array that does not include the weights of features that are not adjacent to the target word.
[0112] As shown in Figure 11, when using processing method (D) in the natural language processing system 100 for tag determination, the processing time and accuracy are improved compared to the result (C) of a different processing method from the natural language processing system 100.
[0113] Furthermore, comparing the increased processing time due to the addition of tag detection processing (i.e., the difference in processing time between A and C, and the difference in processing time between B and D), the difference in processing time between A and C is 223.6 milliseconds, while the difference in processing time between B and D is 43.7 milliseconds. This indicates that the processing speed of tag detection processing using the processing method in natural language processing system 100 is improved compared to the processing speed of tag detection processing using a different processing method than that of natural language processing system 100.
[0114] The natural language processing system 100 can further perform clause splitting, clause type determination, and display processing if the target of the judgment process is, for example, a legal document such as a contract. If the target of the judgment process is a document other than a contract, the natural language processing system 100 can perform delimiter splitting, type determination, and display processing according to the nature of the document. The following describes an example where the target of the judgment process of the natural language processing system 100 is a legal document such as a contract.
[0115] Figure 12 shows an example of a contract 1200 that the natural language processing system 100 is subject to judgment processing. The contract 1200 shown in Figure 12 is a confidentiality agreement between two companies and includes an area 1201 showing the title of the contract, an area 1202 showing the preface, and areas 1211, 1212, and 1213 showing the clauses.
[0116] Before the natural language processing system 100 performs the clause splitting process, clause type determination process, and display process described later, the natural language processing system 100 is unaware that area 1201 represents the title of the contract, area 1202 represents the preface of the contract, and areas 1211, 1212, and 1213 represent clauses.
[0117] The clause division unit 155 of this embodiment divides the contract document 1200 according to sections such as the title, preface, and clauses. The clause division unit 155 can divide the contract document 1200 based, for example, on judgment result information.
[0118] When the clause division unit 155 divides based on the judgment result information, for example, it can divide the text using the section before and after the noun "Article ○" as the delimiter for the "article". The clause division unit 155 may also divide the contract 1200 into articles, or into paragraphs or subparagraphs.
[0119] Furthermore, if the document to be processed is not a contract or similar document, the clause division unit 155 can perform delimiter division processing according to the nature of the document. For example, if the document to be processed is an academic paper, the clause division unit 155 can divide it into sections such as "Background," "Methods," "Results," and "Discussion."
[0120] The clause type determination unit 160 of this embodiment determines the type of each section divided by the clause division unit 155. The type is information indicating the category of the content described, and for example, in the case of a legal document such as a contract, it includes "title," "preface," and "clause." For example, the clause type determination unit 160 can determine that a section in which the noun "Article ○" is written at the beginning of the section is of type "clause."
[0121] Furthermore, if the document to be processed is not a contract or similar document, the clause type determination unit 160 can perform delimiter and splitting processing according to the nature of the document. For example, if the document to be processed is an academic paper, the clause type determination unit 160 can determine the type of section, such as "background," "methods," "results," or "discussion."
[0122] As a result of the clause splitting process by the clause splitting unit 155 and the clause type determination process by the clause type determination unit 160, the natural language processing system 100 can recognize that, with respect to the contract 1200, area 1201 represents the title of the contract, area 1202 represents the preface of the contract, and areas 1211, 1212, and 1213 represent clauses.
[0123] In this embodiment, the display unit 165 displays the contract 1200 and the results of the processing by the clause division unit 155 and the clause type determination unit 160 on the user terminal 300.
[0124] Figure 13 is a flowchart showing an example of the process for generating the second weight array in the natural language processing system 100.
[0125] First, the learning string acquisition unit 115 acquires learning string information from the information processing system 200 (S1301). Next, the feature extraction unit 120 extracts two or more features corresponding to words contained in the learning string and generates feature information (S1302). Subsequently, the learning unit 125 learns based on the learning string information and at least one feature information corresponding to a word contained in the learning string, and generates a first weight array and a trained model (S1303). Then, the second weight array calculation unit 130 calculates a second weight array by integrating the weights of at least one pair of features corresponding to multiple strings that match at least one character from the end, based on the first weight array (S1304).
[0126] Figure 14 is a flowchart showing an example of the tag determination process for target words in the natural language processing system 100.
[0127] First, the natural language processing system 100 obtains target string information containing the target word to be tagged, based on user instructions via the user terminal 300 (S1401). Next, the natural language processing system 100 divides the target string to generate divided string information (S1402). Subsequently, for each divided string, the natural language processing system 100 extracts at least one feature corresponding to the target word contained in the divided string (S1403).
[0128] Next, the natural language processing system 100 determines the tag of the target word for each segmented string based on the second weight array and at least one extracted feature information (S1404). Then, the natural language processing system 100 outputs determination result information that associates the target word with the tag based on the determination result (S1405).
[0129] Furthermore, the natural language processing system 100 performs article segmentation and article type determination based on the determined string information (S1406). Then, the natural language processing system 100 displays the processing results of article segmentation and article type determination on the user terminal 300 (S1407).
[0130] The present invention has been described above. The natural language processing system 100 can determine the tag of a target word based on a second weight array calculated by pre-integrating the weights of at least one pair of features, each corresponding to multiple strings in the first weight array that match at least one character from the end. This makes it possible to perform tag determination processing while suppressing the amount of data to be processed.
[0131] Furthermore, the natural language processing system 100 can determine the tag of a target word based on a second weight array calculated without including the weights of features not adjacent to the target word. This makes it possible to achieve tag determination processing that reduces the amount of data and improves processing speed without compromising the accuracy of the determination.
[0132] Furthermore, the natural language processing system 100 can divide the target string into two or more substrings, each containing two or more characters, and for each substring, it can determine the tag of each target word contained in each substring based on at least one feature corresponding to each target word contained in each substring and a second weight array. This allows for parallel tag determination processing for a single target string, enabling tag determination processing of target words at a higher processing speed.
[0133] This embodiment is provided to facilitate understanding of the present invention and is not intended to limit its interpretation. The present invention may be modified or improved without departing from its spirit, and equivalents thereof are also included.
[0134] The processes and procedures relating to this disclosure can be implemented not only by the apparatus explicitly described in the embodiments, but also by software, hardware, or a combination thereof. Specifically, the processes and procedures described herein can be implemented by implementing logic corresponding to the processes on a medium such as an integrated circuit, volatile memory, non-volatile memory, magnetic disk, or optical storage. Furthermore, the processes and procedures described herein can be implemented as computer programs and executed by various computers, including terminal devices and server devices.
[0135] In this specification, processes and procedures described as being performed by a single device, software, component, and / or module may be performed by multiple devices, multiple software programs, multiple components, and / or multiple modules. Furthermore, various types of information described in this specification as being stored in a single memory and storage device may be stored in multiple memories contained within a single device or distributed across multiple memories located in multiple devices. Moreover, the multiple software and hardware described in this specification may be realized by integrating them into fewer components or by decomposing them into more components. [Explanation of Symbols]
[0136] 100 Natural language processing system, 110 Memory unit, 115 Learning string acquisition unit, 120 Feature extraction unit, 125 Learning unit, 130 Array calculation unit, 135 Target string acquisition unit, 140 String splitting unit, 145 Tag determination unit, 150 Output unit, 155 Article splitting unit, 160 Article type determination unit, 165 Display unit, 200 Information processing system, 300 User terminal
Claims
1. A natural language processing method executed by a processor, Based on a first weight array relating to the weights for determining the tag corresponding to each of the multiple features that match at least one string and any word in the at least one string, the weights of at least one set of the multiple features that match at least one character from the end are integrated to calculate a second weight array, Based on pre-set window width information for the extraction range, extract at least one feature corresponding to the target word, Based on the second weight array and the extracted at least one feature, the tag of the target word is determined, A natural language processing method that includes [this].
2. The natural language processing method according to claim 1, wherein the first weight array is generated by learning from at least one training string in which at least one word is tagged, and a plurality of features corresponding to any word in the training string.
3. The natural language processing method according to claim 1 or 2, wherein calculating the second weight array includes calculating the second weight array which does not include the weights of features that are not adjacent to the target word.
4. This further includes splitting a string to obtain multiple split strings, The aforementioned target word includes multiple target words contained in the multiple segmented strings, Extracting the aforementioned features includes extracting at least one feature corresponding to each of the plurality of target words, Determining the tags includes determining the tags for each of the multiple target words. The natural language processing method according to claim 1 or 2.
5. The plurality of features corresponding to any word in the at least one string are characters or strings of characters located between a predetermined word in the at least one string and a predetermined relative position starting from that predetermined word. The at least one feature corresponding to the target word is a character or string of characters located between the target word and a predetermined relative position starting from the target word. The natural language processing method according to claim 1 or 2.
6. The plurality of features corresponding to any word in the at least one string are the character type of a character or character type of a string that lies between a predetermined word in the at least one string and a predetermined relative position starting from that predetermined word. The at least one feature corresponding to the target word is the character type of a character or character type of a string of characters located between the target word and a predetermined relative position starting from the target word. The natural language processing method according to claim 1 or 2.
7. A natural language processing system comprising at least one processor, The aforementioned at least one processor, Based on a first weight array relating to weights for determining tags corresponding to characters or strings for each of at least one string and all or part of a plurality of features corresponding to any word in the at least one string, the weights of at least one set of the plurality of features corresponding to characters or strings whose last character matches are integrated to calculate a second weight array. Based on pre-set window width information for the extraction range, at least one feature corresponding to a target word containing at least one character is extracted. Based on the second weight array and the extracted at least one feature, the tag of the target word is determined. A natural language processing system configured in such a way.
8. In the processor, Based on a first weight array relating to weights for determining tags corresponding to characters or strings, for each of at least one string and all or part of a plurality of features corresponding to any word in the at least one string, the weights of at least one set of the plurality of features corresponding to characters or strings whose last character matches are integrated to calculate a second weight array, Based on pre-set window width information for the extraction range, extract at least one feature corresponding to a target word containing at least one character, Based on the second weight array and the extracted at least one feature, the tag of the target word is determined, A natural language processing program to execute [this].