Natural language processing device, classification device, and program
The natural language processing device uses a parallel corpus and pattern matching to address ambiguity in Japanese time expression classification, automating the generation of learning data for accurate classification.
Patent Information
- Application Number
- JP2021085397
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-05-20
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-05-20
AI Technical Summary
Existing methods for classifying Japanese time expressions struggle with ambiguity due to similar sentence structures, requiring extensive rules and high-cost supervised learning, making accurate classification difficult.
A natural language processing device that extracts and classifies time expressions by using a parallel corpus of Japanese and another language, leveraging pattern matching and word alignment to determine comprehensive labels through a majority vote and numerical value checks.
Automatically generates learning data for accurate time expression classification, reducing the need for extensive rules and high-cost supervised learning, and improving classification accuracy.
Smart Images

Figure 0007716885000001 
Figure 0007716885000002 
Figure 0007716885000003
Abstract
Description
Technical Field
[0001] The present invention relates to a natural language processing device, a classification device, and a program.
Background Art
[0002] As one of the processes necessary for the recognition of time expressions in natural language texts, classification of time expressions can be mentioned. This is a process of classifying time expressions extracted from a text according to the type of time. Here, the type of time is a category of temporal concepts.
[0003] There can be several definitions, but in a certain study, time expressions are classified into four types: date, time, period, and set. Examples of time expressions classified as dates are "June 8, 2021", examples of time expressions classified as times are "11:59 PM", examples of time expressions classified as periods are "6 months", and examples of time expressions classified as sets are "every year". [Reference] Pustejovsky, J., Ingria, R., Sauri, R., Castano, J., Moszkowicz, J., Katz, G.: The Specification Language TimeML, pp. 545 - 557 (2005)
[0004] In many prior arts, such classification processing is performed by pattern matching of character strings combined with the preceding and following words. The process of recognizing Japanese time expressions is executed by, for example, existing software called normalizeNumexp. In Non - Patent Document 1, the source code of this normalizeNumexp, etc. is publicly available.
Prior Art Documents
Non - Patent Documents
[0005]
Non - Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0006] However, for example, in Japanese time expressions, time expressions that should be classified into different types may have the same or similar sentence structures on the surface. For example, sentences using the expression "*day" are one of them. Examples of sentences containing the expression "1 day" are as follows. Example 1: Since early morning on the 1st, more than 100 people such as cameramen have been closely visiting historical buildings. Example 2: The number of daily infections in the city has been less than 100 for three consecutive days.
[0007] In the sentence of Example 1 above, "1 day" is a time expression that should be classified into the date type. Also, in the sentence of Example 2, "1 day" is a time expression that should be classified into the period type. However, the structures of the sentences containing the expression "1 day" are superficially similar as in this example. Therefore, whether "1 day" in each sentence refers to a date or a period depends on the context. That is, it may not be possible to classify the type of time from only the surface of natural language text.
[0008] To explain in more detail, the expressions "morning of the first day" and "infected people on the first day" in the above examples are similar in terms of surface structures such as the word dependency and part of speech of the words to each other. That is, it is difficult to resolve the ambiguity of the type of time expression only from the word dependency structure and part-of-speech information of the words. To classify the type of time expression more accurately, processing considering the meaning of the sentence becomes necessary.
[0009] In the method shown in Non-Patent Document 1 (a method of classification by matching patterns of words including those before and after time expressions), in order to handle cases with similar sentence structures, an exhaustive and enormous number of rules are required, which is not practical.
[0010] Although the example of "one day" has been described above, the same can be said for other time expressions.
[0011] One approach that is considered effective for processing expressions with the above-mentioned ambiguity is to construct a classifier by supervised learning. However, in order to perform supervised learning, it is necessary to construct an enormous amount of training data with teacher signals attached, which causes another problem of high cost.
[0012] The present invention has been made based on the above-mentioned recognition of problems, and aims to provide a natural language processing device, a classification device, and a program for automatically and accurately classifying the types of time expressions.
Means for Solving the Problems
[0013] [1] In order to solve the above problems, a natural language processing device according to an aspect of the present invention extracts a time expression of a target language from a target language sentence described in the target language, and extracts a time expression of the other language corresponding to the time expression of the target language from another language sentence corresponding to the translation of the target language sentence into the other language. An extraction unit, a target language sentence label estimation unit that estimates a target language sentence label that is a label indicating the type of the extracted time expression of the target language, and an other language sentence label that is a label indicating the type of the extracted time expression of the other language. An other language sentence label estimation unit, an estimation label determination unit that determines a comprehensive label regarding the time expression of the target language sentence based on both the estimated target language sentence label and the other language sentence label, and a learning data output unit that outputs learning data composed of a pair of the target language sentence and the comprehensive label output by the estimation label determination unit.
[0014] [2] Also, in one aspect of the present invention, in the above natural language processing device, the extraction unit extracts the time expression of the target language from the target language sentence by matching with a pattern including a numerical expression.
[0015] [3] Also, in one aspect of the present invention, in the above natural language processing device, the target language is Japanese, and the time expression of the target language is an expression of the date, which is extracted by matching with a pattern obtained by concatenating the numerical expression and the expression "day".
[0016] [4] Also, in one aspect of the present invention, in the above natural language processing device, the extraction unit extracts the time expression of the other language corresponding to the time expression of the target language extracted based on the result of word unit alignment processing between the target language sentence and the other language sentence.
[0017] [5] Also, in one aspect of the present invention, in the above natural language processing device, the target language sentence label estimation unit estimates the target language sentence label based on whether the time expression of the target language in the target language sentence and its vicinity match a pattern corresponding to each of the target language sentence labels, and the other language sentence label estimation unit estimates the other language sentence label based on whether the time expression of the other language in the other language sentence and its vicinity match a pattern corresponding to each of the other language sentence labels.
[0018] [6] Also, in one aspect of the present invention, in the above natural language processing device, the estimated label determination unit determines the comprehensive label by a majority vote between the target language sentence label, which is the result estimated by the target language sentence label estimation unit, and the other language sentence label, which is the result estimated by the other language sentence label estimation unit.
[0019] [7] Also, in one aspect of the present invention, in the above natural language processing device, the other language is only one type of language.
[0020] [8] Also, in one aspect of the present invention, in the above natural language processing apparatus, a numerical value determination unit that determines whether a numerical value represented by a numerical expression included in at least one of the time expression in the target language and the time expression in the other language is within a predetermined range is further provided, and when the determination result by the numerical value determination unit is in at least one of whether it is within the predetermined range, the estimation label determination unit determines the comprehensive label based on the determination result by the numerical value determination unit without depending on either the target language sentence label or the other language sentence label.
[0021] [9] Also, in one aspect of the present invention, in the above natural language processing apparatus, a classification model that inputs a classification target sentence described in the target language and outputs a classification label representing the type of time expression included in the classification target sentence, and a learning control unit that controls the implementation of machine learning of the classification model using the learning data output by the learning data output unit are further provided.
[0022]
[10] Also, in one aspect of the present invention, a classification model that inputs a classification target sentence described in the target language and outputs a classification label representing the type of time expression included in the classification target sentence is provided, and the classification model is a classification apparatus that has been machine-learned using the learning data output by the natural language processing apparatus according to any one of [1] to [8] above.
[0023]
[11] Further, one aspect of the present invention extracts a temporal expression of a target language from a target language sentence described in the target language, and extracts a temporal expression of the other language corresponding to the temporal expression of the target language from another language sentence corresponding to the translation of the target language sentence into another language. An extraction unit, a target language sentence label estimation unit that estimates a target language sentence label that is a label representing the type of the extracted temporal expression of the target language, and another language sentence label that is a label representing the type of the extracted temporal expression of the other language. An other language sentence label estimation unit for estimating, and an estimation label determination unit for determining a comprehensive label regarding the temporal expression of the target language sentence based on both the estimated target language sentence label and the other language sentence label, and the target language sentence, A learning data output unit that outputs learning data composed of a pair of the comprehensive label output by the estimation label determination unit, and a program for causing a computer to function as a natural language processing device including the learning data output unit.
Advantages of the Invention
[0024] According to the present invention, for a sentence in a target language, a teacher signal regarding the type of a temporal expression that is difficult to determine only from the surface of the sentence in the target language can be obtained. That is, learning data suitable for learning a model for obtaining the type of a temporal expression based on a sentence in the target language can be automatically generated.
Brief Description of the Drawings
[0025]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Embodiments for Carrying Out the Invention
[0026] Next, embodiments of the present invention will be described with reference to the drawings. Hereinafter, embodiments will be described for the case where the target language is Japanese and its translated sentence is an English sentence.
[0027] In this embodiment, learning data is generated by automatically assigning a teacher signal to the time expressions included in the text data of the natural language (Japanese) contained in the corpus. Here, the teacher signal automatically assigned is a label representing the type of the time expression.
[0028] Also, in this embodiment, machine learning processing of a classification model is performed using the learning data generated as described above. Thereby, a classification device capable of classifying time expressions by type can be constructed. Further, in this embodiment, the type of time expression included in the text of an unknown natural language (Japanese) is classified using the classification device obtained by performing the above machine learning processing.
[0029] In this embodiment, instead of using single-language data of the target language (Japanese in the description of this embodiment) as the data serving as the basis for generating the above learning data, a parallel corpus is used. The parallel corpus used here is a set of pairs of translated sentences between the above target language (e.g., Japanese) and another language different from the above target language (e.g., English). By using such pairs of translated sentences in this way, it is possible to accurately determine the teacher signal (the correct label to be classified) based on data with a larger amount of information than when using single-language data of the target language. Note that only the surface information of the pairs of translated sentences is used to determine the teacher signal. That is, even when it is difficult to correctly determine the teacher signal only from the surface information of the Japanese sentence, which is the target language, when the pair of translated sentences is a pair of a Japanese sentence and an English sentence, the surface of the translated English sentence can also be used to more accurately determine the teacher signal.
[0030] Hereinafter, as an example, a process of detecting a date expression, which is a type of time expression, and assigning a label representing the type of the date expression will be mainly described.
[0031] In the Japanese notation of "* day", "*" corresponds to a Chinese numeral or an Arabic numeral. That is, what is denoted as "* day" corresponds to time expressions such as "1 day", "one day", "3 days", "ten days", "31 days", "one hundred days", "365 days", etc. In other words, "* day" is a regular expression. Hereinafter, the expression represented as this "* day" will be conveniently referred to as a "date expression". The date expression is a type of time expression.
[0032] In the following example, the date expressions included in the text of the Japanese sentence are classified into two types. The two types are the "date" type and the "other than date" type. The date expression of the "date" type refers to the expression indicating a specific day within a month. For example, "the 25th" included in the expression "on the 25th of next month" is a date expression of the "date" type. Also, "the 15th" included in the expression "in the morning of July 15th" is a date expression of the "date" type. Further, "the whole day today" included in the expression "it has been snowing continuously today" represents a period and is a date expression of the "other than date" type. Incidentally, "the fourth day" in "Yokkaichi City" or "the 22nd" in "Japan U-22 Representative Team" etc. are not originally time expressions, but when classifying into the two types of the "date" type and the "other than date" type, they are classified into the "other than date" type.
[0033] Incidentally, the label representing the "date" type is <date>and represents a label of the "other than date" type <otherwise>Let it be so.
[0034] FIG. 1 is a block diagram showing a schematic functional configuration of a learning data generation device according to the present embodiment. As shown in the figure, the learning data generation device 3 includes a parallel corpus acquisition unit 301, a regular expression extraction unit 302, a numerical value determination unit 303, a target language sentence pattern matching unit 304, a foreign language sentence pattern matching unit 305, an estimated label determination unit 306, and a learning data output unit 307. The learning data generation device 3 is also called a "natural language processing device". The functions of each part constituting the learning data generation device 3 are as described below.
[0035] The parallel corpus acquisition unit 301 acquires data of a parallel corpus given from the outside. When the target language is Japanese and the other language is English, the parallel corpus is a Japanese-English parallel corpus.
[0036] The parallel corpus C acquired by the parallel corpus acquisition unit 301 is C = {(s1, t1), (s2, t2), ···, (s |C| , t |C| )} and can be represented as. Here, (s i , t i ) is the i-th sentence pair included in the parallel corpus C. s i is a Japanese sentence (a series of Japanese words), and t i is an English sentence (a series of English words). That is, s i and t i are a pair of translated sentences. Note that |C| is the size of the parallel corpus C, in other words, the number of sentence pairs included in the parallel corpus C.
[0037] The regular expression extraction unit 302 performs alignment processing on the given sentence pair (s i , t i ) (where 1 ≤ i ≤ |C|). Also, based on the result of the alignment processing, the regular expression extraction unit 302 extracts Japanese sentence s i and English sentence t i From each, an expression that matches a predetermined regular expression is extracted. That is, the regular expression extraction unit 302 extracts a temporal expression of the target language from the target language sentence described in the target language (Japanese). Then, based on the above alignment process, the regular expression extraction unit 302 extracts a temporal expression in another language corresponding to the temporal expression in the target language from another language sentence corresponding to the translation of the target language sentence into another language (English). Note that the regular expression extraction unit 302 is also simply called the "extraction unit".
[0038] The alignment process is a process of performing word-level mapping between the Japanese sentence s i and the English sentence t i The alignment process itself can be performed using existing techniques. The Japanese-English word alignment process can be executed, for example, by the train-model.perl script of an existing tool Moses (the following reference) or fast-align 2, etc. [Reference] Koehn, P., Hoang, H., Birch, A., Callison-Burch, C., Federico, M., Bertoldi, N., Cowan, B., Shen, W., Moran, C., Zens, R., Dyer, C., Bojar, O., Constantin, A., and Herbst, E.: Moses: Open Source Toolkit for Statistical Machine Translation, in Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics Companion Volume Proceedings of the Demo and Poster Sessions, pp. 177-180, Prague, Czech Republic (2007), Association for Computational Linguistics.
[0039] In performing word-level alignment processing between sentences, it is necessary to tokenize both the Japanese sentence and the English sentence in advance. This tokenization process can also be executed by various tools belonging to the prior art. For the Japanese sentence, tools such as MeCab 3 and kytea 4 can be used. For the English sentence, tools such as the Moses tokenizer.perl script and NLTK 5 can be used.
[0040] For the sentence pair (s i ,t i ), the alignment processing result a i is a i ={···,(s k ,(t l ,···,t m )),···} and can be expressed as such. Here, s k is the k-th word (where 1 ≤ k ≤ |s i | (|s i | is the size (number of words) of the sentence s i ) in the Japanese sentence (word sequence) s i . t l and t m are the l-th and m-th words respectively (where 1 ≤ l ≤ m ≤ |t i | (|t i | is the size (number of words) of the sentence t i ) in the English sentence (word sequence) t i . The correspondence relationship (mapping) between the Japanese word and the English word can be one-to-one, one-to-many, many-to-one, or many-to-many.
[0041] When alignment processing is performed for each sentence pair, a parallel corpus C with alignments added is obtained. That is, C = {(s1, t1, a1), (s2, t2, a2), ···, (s |C| , t |C| , a |C| )} is obtained.
[0042] The regular expression extraction unit 302 extracts Japanese date expressions from the above parallel corpus C using regular expressions. That is, the regular expression extraction unit 302 extracts expressions that match the pattern of "* day" from the Japanese sentences in the parallel corpus C and regards this as a date expression. As described above, the "*" (numerical expression) part in "* day" may be an Arabic numeral or a Chinese numeral. Also, the regular expression extraction unit 302 extracts the English expression corresponding to the Japanese date expression from the English sentence based on the above alignment result. That is, the regular expression extraction unit 302 in the present embodiment extracts the time expression of the target language from the target language sentence by matching with a pattern including a numerical expression. When the target language is Japanese, as described above, the regular expression extraction unit 302 extracts the date expression (time expression) by matching with a pattern (the above "* day") in which the numerical expression and the expression "day" are concatenated. Also, as described above, the regular expression extraction unit 302 extracts the time expression of another language (English) corresponding to the extracted time expression of the target language (Japanese) based on the result of the word-level alignment process between the target language sentence and the other language sentence.
[0043] The regular expression extraction unit 302 excludes parallel sentence pairs that do not match the pattern of "* day" from the parallel corpus C. As a result, in subsequent processing, only parallel sentence pairs including date expressions in Japanese sentences are the processing targets.
[0044] The numerical value determination unit 303 determines whether the numerical value included in the date expression is within a predetermined range. More generally, the numerical value determination unit 303 determines whether the numerical value included in the time expression is within a predetermined range. The numerical value determination unit 303 passes the determination result to the estimated label determination unit 306 as necessary. Depending on the determination result of the numerical value determination unit 303, it may be determined what type of expression the time expression included in the sentence pair is. For example, the Japanese expression "33 days" is a date type ( <date>) is extremely unlikely, and types other than date ( <otherwise>) can be regarded as such. Also, for example, the Japanese expression "64 minutes" is extremely unlikely to be of the type indicating time and can be regarded as of the type indicating a period.
[0045] Specifically for the date expression, the numerical determination unit 303 determines whether the numerical value represented by the Chinese numeral or Arabic numeral in the part corresponding to "*" in the pattern of " * days" in Japanese is 31 or less. If this numerical value exceeds 31, the numerical determination unit 303 notifies the estimation label determination unit 306 to that effect. Thereby, the estimation label determination unit 306 determines that the date expression is of a type other than a date ( <otherwise>) can be determined to be so.
[0046] That is, the numerical value determination unit 303 determines whether or not a numerical value represented by a numerical expression included in at least any one of the time expression of the target language and the time expression of another language (in the above description, only the time expression of the target language (Japanese)) is within a predetermined range (for example, the numerical value is 31 or less).
[0047] The target language sentence pattern matching unit 304 estimates the label regarding the date expression in Japanese included in the Japanese sentence. That is, the target language sentence pattern matching unit 304 estimates a target language sentence label which is a label representing the type of the time expression of the target language (Japanese) extracted by the regular expression extraction unit 302. The target language sentence pattern matching unit 304 is also called a "target language sentence label estimation unit". The label given by the target language sentence pattern matching unit 304 as an estimation result represents, for example, the type of the date <date>and representing a type other than a date <otherwise>And representing neither of them <none>It is any one of them.
[0048] Regarding the Japanese date expression, the difficulty of label determination varies depending on the words that appear immediately before or after the date expression itself. For example, when it corresponds to patterns such as "*month* *day*", "*days*", "*day*", etc., the type of the date expression can be easily determined. Specifically, the "*day*" that matches the pattern of "*month* *day*" is of the date type ( <date>) can be determined. Also, the "*day" that matches the patterns of "*days" or "*th day" is of a type other than a date ( <otherwise>) can be determined to be so.
[0049] The target language sentence pattern matching unit 304 attempts to perform a process of matching the frequently occurring Japanese date expression patterns as exemplified above to the Japanese sentence to be determined. Then, when the target language sentence pattern matching unit 304 matches a pattern belonging to the date type, the date expression is labeled <date>is assigned. Also, when the target language sentence pattern matching unit 304 matches a pattern belonging to a type other than the date type, it labels the date expression with <otherwise>is assigned. For a date expression that does not match either the date type or the non - date type in the target language sentence pattern matching unit 304, the label <none>To assign.
[0050] Note that, as exemplified above, the pattern to be matched is not limited to the date expression itself within the sentence, and may include words before and after (in the vicinity) thereof. That is, the target language sentence pattern matching unit 304 estimates the target language sentence label based on whether the time expression of the target language in the target language sentence and its vicinity match the pattern corresponding to each of the target language sentence labels.
[0051] The other language sentence pattern matching unit 305 estimates the label regarding the date expression of the English sentence included in the English sentence. That is, the other language sentence pattern matching unit 305 estimates the other language sentence label, which is a label representing the type of the time expression of the other language (English) extracted by the regular expression extraction unit 302. The other language sentence pattern matching unit 305 is also called the "other language sentence label estimation unit". The label assigned by the other language sentence pattern matching unit 305 as the estimation result, similar to the case of Japanese, represents, for example, that it is the type of date <date>and representing a type other than a date <otherwise>And representing neither of them <none>It is any one of the following.
[0052] The English date expression is, <date>type and <otherwise>There is a tendency to have a superficially different notation from that of the type.
[0053] In an English sentence <date>The patterns of date expressions corresponding to the type are often of the patterns of "month + number" and "month + ordinal number" such as "June 1", "June 1st", "the 1st", etc., and the pattern of "day of the week" such as "Friday". Also, in English <date>Date expressions corresponding to this type tend to be accompanied by prepositions such as "on", "from", "until", etc.
[0054] On the other hand, in English <otherwise>Patterns of date expressions corresponding to the type are "a daily basis" (the corresponding Japanese expression is "on a daily basis"), "new infections per day" (the corresponding Japanese expression is "the number of new infections per day"), "three-day tournament" (the corresponding Japanese expression is "a three-day game"), etc. There are many expressions in which "day" changes in word form or compound words containing "day". Also, in English <otherwise>Date expressions corresponding to the type often involve adverbial phrases including "for" or "during".
[0055] Based on such tendencies of English (other languages), the other-language sentence pattern matching unit 305 i identifies the English date expressions included in the English sentence t <date>Patterns of the type and <otherwise>Match with the pattern of the type and assign the label of the relatively closer type to sentence t i to it.
[0056] Note that the foreign language sentence pattern matching unit 305 has the above English date expression <date>Type and <otherwise>If it does not match any of the types, expand the range by one word before and after the date expression in focus and try pattern matching, and assign the label of the closer type to sentence t i and so on. You may also try expanding the range by one word before and after and performing pattern matching.
[0057] In this way, the pattern to be matched is not limited to the date expression itself in the sentence, and may include words before and after (in the vicinity) of it. That is, the foreign language sentence pattern matching unit 305 estimates the foreign language sentence label based on whether the time expression in the foreign language and its vicinity in the foreign language sentence match the pattern corresponding to each of the foreign language sentence labels.
[0058] Regarding each of Japanese and English, the patterns of the processing by the target language sentence pattern matching unit 304 and the foreign language sentence pattern matching unit 305 will be further described later with reference to FIG. 6.
[0059] The estimated label determination unit 306 estimates a label (referred to as a "comprehensive label") representing the type of the target language sentence based on the determination result by the target language sentence pattern matching unit 304 and the determination result by the foreign language sentence pattern matching unit 305. That is, the estimated label determination unit 306 determines a comprehensive label regarding the time expression of the target language sentence based on both the target language sentence label estimated by the target language sentence pattern matching unit 304 and the foreign language sentence label estimated by the foreign language sentence pattern matching unit 305. As an example, the estimated label determination unit 306 may determine the final label (comprehensive label) by a majority vote between the target language sentence label which is the result estimated by the target language sentence pattern matching unit 304 and the foreign language sentence label which is the result estimated by the foreign language sentence pattern matching unit 305.
[0060] As already described, there may be cases where the estimated label determination unit 306 can determine the final label (comprehensive label) based on the determination result of the numerical value determination unit 303. That is, when the determination result by the numerical value determination unit 303 is that the numerical value is within a predetermined range or not, the estimated label determination unit 306 can determine the final label (comprehensive label) based on the determination result by the numerical value determination unit 303 without depending on either the target language sentence label or the other language sentence label.
[0061] The learning data output unit 307 outputs the generated learning data. This learning data is a set of data of pairs of the original target language sentence (Japanese sentence) and the label (comprehensive label) representing the determination result output by the estimated label determination unit 306.
[0062] FIG. 2 is a schematic diagram showing an example of the data of the translation sentence pair included in the translation corpus acquired by the translation corpus acquisition unit 301. As shown in the figure, this translation corpus is configured as a set of pairs of Japanese sentences and English sentences. This translation corpus may be constructed based on sentences of news in both Japanese and English collected from websites of news agencies and the like, for example.
[0063] The Japanese sentence (target language sentence) in the first example shown in FIG. 2 is "Since the morning of the 1st, more than 100 people, including cameramen, had a close look at the historic building." The corresponding English sentence (other language sentence) is "From the morning of January 1, over 100 visitors, including photographers, got a close look at the historic architecture." The time expression included in the above Japanese sentence is "the 1st". The expression in the English sentence corresponding to "the 1st" in this Japanese sentence is "January 1". That is, the learning data generation device 3 can estimate the type of the time expression based on both the expressions (only the surface layer) of "the 1st" in the Japanese sentence and "January 1" in the English sentence.
[0064] Also, the Japanese sentence of the second example is "The number of daily infections in Tokyo has been below 100 for three consecutive days." And the corresponding English sentence is "The daily number of infections in the prefecture have remained under 100 people per day for three days in a row." The time expressions included in the above Japanese sentence are "one day" and "three days". The expression in the English sentence corresponding to "one day" in this Japanese sentence is "daily". The expression in the English sentence corresponding to "three days" in the Japanese sentence is "three days". That is, the learning data generation device 3 can estimate the type of time expression based on both the above expressions (only the surface layer) in the corresponding Japanese sentence and the above expressions in the English sentence.
[0065] Figures 3 and 4 are flowcharts for explaining the processing procedure of the learning data generation device 3. The whole of Figures 3 and 4 is one flowchart. There is a flow connected using a connector between Figure 3 and Figure 4. The processing shown in this flowchart is the processing for estimating the label for the date expression included in the Japanese sentence. However, for time expressions other than the date expression, the label can also be estimated by the same processing as the processing shown here. Hereinafter, the processing procedure will be described along this flowchart.
[0066] In step S 11 of Figure 3, the parallel corpus acquisition unit 301 reads in a Japanese-English parallel corpus. The Japanese-English parallel corpus includes the data of the set of parallel sentence pairs exemplified in Figure 2.
[0067] Next, in step S12, the regular expression extraction unit 302 performs word alignment processing between the Japanese sentence and the English sentence for each translation pair. What is obtained as a result of performing the word alignment processing is information indicating which word(s) (singular or plural) in the Japanese sentence correspond to which word(s) (singular or plural) in the English sentence. The result obtained here for each sentence pair is called alignment a. Note that the word alignment process itself can be performed using existing techniques.
[0068] Next, in step S13, the regular expression extraction unit 302 excludes from the translation corpus sentence pairs that do not contain a date expression on the Japanese sentence side (target language sentence side). Whether the Japanese sentence contains a date expression is determined by whether there is an expression in the Japanese sentence that matches the pattern "* day". The result of performing such exclusion is called dataset C2.
[0069] Next, in step S14, the learning data generation device 3 extracts one piece of unprocessed data from the above dataset C2. One piece of data here includes the Japanese sentence s, the English sentence t, and the alignment a between these s and t. The series of processes from the following steps S15 to S36 (Figure 4) are processes targeted at the one piece of data extracted here.
[0070] Next, in step S15, the numerical determination unit 303 determines whether the numerical value of the numerical part of the date expression included in the Japanese sentence s of the extracted data, that is, the "*" part in the expression "* day", is 32 or more. If the numerical value is 32 or more, then the date expression is of the "date" type ( <date>) is a determination based on something that cannot be the case. If the numerical value is 32 or more (step S15: YES), the process proceeds to step S16. If the numerical value is less than 32 (step S15: NO), the process proceeds to step S17.
[0071] Next, when proceeding to step S16, the estimated label determination unit 306 determines the type of date expression in this data (represented by variable y) <otherwise>Let's assume. After the completion of this step, the process proceeds to step S36 (Fig. 4).
[0072] Next, when proceeding to step S17, the learning data generation device 3 determines the label based on pattern matching. In step S17, the target language sentence pattern matching unit 304 performs pattern matching on the date expression within the sentence s (Japanese sentence). The pattern matching itself can be performed using existing techniques. Depending on the result of this pattern matching, it branches to either step S18, step S19, or step S20. Specifically,[ <date>If it is a pattern, proceed to step S18. <otherwise>If it is a pattern, proceed to step S19. If the collation result is neither, proceed to step S20.
[0073] Next, when proceeding to step S18, the target language sentence pattern collation unit 304 sets the type (represented by the variable ys) for the Japanese sentence s. <date>Let it be so. Then, proceed to step S31 (Fig. 4).
[0074] Next, when proceeding to step S19, the target language sentence pattern matching unit 304 determines the type (represented by the variable ys) for the Japanese sentence s. <otherwise>Let it be so. Then, proceed to step S31 (Fig. 4).
[0075] Next, when proceeding to step S20, the target language sentence pattern matching unit 304 determines the type (represented by the variable ys) for the Japanese sentence s. <none>Assume this. Then, proceed to step S31 (FIG. 4).
[0076] Moving to FIG. 4, in step S31, the foreign language sentence pattern matching unit 305 performs pattern matching on the date expression in the sentence t (English sentence) corresponding to the date expression in the sentence s (Japanese sentence) within the sentence s (Japanese sentence). Note that the correspondence relationship between the Japanese sentence s and the English sentence t is based on the alignment a of this data. Depending on the result of this pattern matching, it branches to either step S32, step S33, or step S34. Specifically, <date>If it is a pattern, proceed to step S32. <otherwise>If it is a pattern, proceed to step S33. If the collation result is neither, proceed to step S34.
[0077] Next, when proceeding to step S32, the foreign language sentence pattern collation unit 305 determines the type (represented by the variable yt) for the English sentence t. <date>Let it be so. Then, proceed to step S35.
[0078] Next, when proceeding to step S33, the foreign language sentence pattern matching unit 305 determines the type (represented by the variable yt) for the English sentence t. <otherwise>Let it be so. Then, proceed to step S35.
[0079] Next, when proceeding to step S34, the foreign language sentence pattern matching unit 305 determines the type (represented by the variable yt) for the English sentence t. <none>Let it be so. Then, proceed to step S35.
[0080] Next, in step S35, the estimated label determination unit 306 estimates the type (represented by variable y) of the date expression in this data based on the pattern matching results (variables ys and yt) of the above Japanese sentence and English sentence respectively. Specifically, the estimated label determination unit 306 determines the label (variable y) representing the type according to the decision table shown in FIG. 5. <date>or <otherwise>Decide whether to do so or not (not output the data of this case). The decision table in FIG. 5 will be described later.
[0081] Next, in step S36, the learning data output unit 307 adds one piece of data as learning data. Specifically, the learning data output unit 307 adds a pair of the Japanese sentence s and the label y estimated by the estimated label determination unit 306 above (the process of step S16 or S35) to the data set D (the generated learning data). However, if it is determined as "do neither" in the determination in step S35, the learning data output unit 307 does not add the Japanese sentence s of the data of this case to the data set D.
[0082] Next, in step S37, the learning data generation device 3 determines whether there is any unprocessed data remaining in the data set C2. If there is remaining data (step S37: YES), it returns to step S14 to process the next data. If there is no remaining data (step S37: NO), the learning data generation device 3 ends the processing of the entire flowchart. Note that the data included in the data set D (the set of pairs of Japanese sentences and labels (types) that are the estimation results) at the time of ending the processing of the entire flowchart is the learning data generated by the learning data generation device 3.
[0083] FIG. 5 is a schematic diagram showing a decision table for determining the estimated label (y) based on the combination of the pattern matching result ys for the Japanese sentence (target language sentence) and the pattern matching result yt for the English sentence (other language sentence). This decision table is referred to by the estimated label determination unit 306 in the process of step S35 in FIG. 4. As shown in the figure, this decision table has a two-dimensional structure, taking ys (patterns in the target language sentence) in the horizontal direction (column direction) and yt (patterns in the other language sentence) in the vertical direction (row direction). The values of the variable ys and the variable yt are both <date> 、 <otherwise>or <none>It is any one of them. In this decision table, the description at the crossing point of the column corresponding to the value of the variable ys and the row corresponding to the value of the variable yt is the determination result by the estimated label determination unit 306.
[0084] The determination result according to FIG. 5 is <date>or <otherwise>It is either to do so or not to do either. When the label of the determination result is "not do either", the data (Japanese sentence s) is not added to the dataset D. That is, the learning data generation device 3 discards the data of such Japanese sentence s.
[0085] As shown in FIG. 5, the decision table is based on a majority vote as illustrated. That is, in the values of the variable ys and the variable yt <date>If it is more often the case, the label y of the estimation result is <date>is used. Also, at the values of the variable ys and the variable yt <otherwise>If it is more likely, the label y of the estimation result is <otherwise>is set. At the values of the variable ys and the variable yt <date>the number of and <otherwise>When the number of <none>Including the case where it is, it is determined not to determine the label y of the estimation result and to discard the data.
[0086] FIG. 6 is a schematic diagram showing an example of a list of Japanese and English patterns that each of the target language sentence pattern matching unit 304 and the other language sentence pattern matching unit 305 matches. For example, the storage area of the learning data generation device 3 may have a list of patterns shown in FIG. 6 so that each of the target language sentence pattern matching unit 304 and the other language sentence pattern matching unit 305 can refer to this list.
[0087] In FIG. 6, the Japanese date type ( <date>)、Date type other than Japanese date <otherwise>) Date type in English <date>)、Types other than English dates( <otherwise>) For each of them, a list of patterns (strings) is shown.
[0088] As shown, the Japanese date type ( <date>) The patterns included in are "morning of * day", "afternoon of * day", "early morning of * day", "dawn of * day", "* month * day", etc. Regarding "* day" when matching these patterns, the target language sentence pattern matching unit 304 is the date type ( <date>) is determined to be a date expression. Non-Japanese date types ( <otherwise>) The patterns included in are "per day", "for * days", "*th day", "* days in a year", "* days in a year", etc. For "* day" when matching these patterns, the target language sentence pattern matching unit 304 is of a type other than a date ( <otherwise>) is determined to be a date expression.
[0089] Also, the English date type ( <date>) The patterns included in it are "January", "Jan.", "Sunday", "Sun.", "30th", etc. Regarding the English date expressions when matching these patterns, for the other language sentence pattern collation section 305, the date type ( <date>) is determined to be a date expression. For types other than English dates ( <otherwise>) The patterns included in it are "day", "days", "daily", "thirty-days", "day-off", etc. Regarding the English date expressions when matching these patterns, for the other-language sentence pattern matching section 305, for non-date types ( <otherwise>) is determined to be a date expression.
[0090] As one example, a Japanese date type ( <date>) as 36 types of patterns, Japanese date other than type ( <otherwise>) as 27 types of patterns, English date type ( <date>) as 100 types of patterns, and types other than English dates ( <otherwise>) Eighty-one types of patterns are used for pattern matching. Note that the list of patterns shown in FIG. 6 is only an example. When implementing the present invention, this list may be appropriately extended or modified.
[0091] Next, a natural language processing device that utilizes the learning data generated by the learning data generation device 3 described above will be described.
[0092] FIG. 7 is a block diagram showing a schematic functional configuration of the natural language processing device according to the present embodiment. As shown in the figure, the natural language processing device 1 includes a translation corpus storage unit 2, a learning data generation device 3, a learning data storage unit 4, and a classification device 5. Note that the classification device 5 is configured to include classification target sentence data 501, a classification model 502, a classification label 503, and a learning control unit 504. Note that each function included in the natural language processing device 1 can be realized by, for example, a computer and a program. In addition, each function has a storage means as necessary. The storage means is, for example, a variable in a program or a memory allocated by the execution of the program. In addition, if necessary, non-volatile storage means such as a magnetic hard disk device or a solid state drive (SSD) may be used. Further, at least a part of the functions of each functional unit may be realized as a dedicated electronic circuit instead of a program. Each function will be described next.
[0093] The translation corpus storage unit 2 stores a translation corpus (for example, a Japanese-English translation corpus). As described above, this translation corpus is used by the learning data generation device 3 to generate learning data.
[0094] The learning data generation device 3 generates learning data using the translation corpus held by the translation corpus storage unit 2. The learning data is a set of data of a pair of a sentence in the target language (for example, a Japanese sentence) and a label representing the type of the temporal expression included in the sentence.
[0095] The learning data storage unit 4 stores, at least temporarily, the learning data output by the learning data generation device 3.
[0096] The classification device 5 reads the learning data from the learning data storage unit 4 and performs machine learning on the model it has internally using the learning data. Then, the classification device 5 classifies the type of the time expression in an unknown target language sentence (e.g., a Japanese sentence) using the learned model. Note that the classification device 5 is also called a "natural language processing device". Each function that the classification device 5 has internally is as described below.
[0097] The classification target sentence data 501 is the data of the sentence that the classification device 5 targets for classification. The data of the classification target sentence is the data of the text described in the target language (e.g., Japanese). Note that the classification target sentence is a sentence that includes a time expression. The classification target sentence data 501 is in a state of being stored in the storage means and can be read by the classification model 502.
[0098] The classification model 502 is a model that inputs the classification target sentence and outputs a label representing the classification result (type) regarding the time expression that the sentence has. Here, the classification target sentence is a sentence described in the target language in the process of generating the learning data. The classification model 502 is configured to be able to perform machine learning using the learning data. The classification model 502 is realized using, for example, a neural network. However, the classification model 502 may be realized as a model that can perform machine learning using a mechanism other than a neural network. The machine learning method itself can be realized using existing technologies. The machine-learned classification model 502 outputs a classification result based on the information included in the learning data. By learning using appropriate learning data, the classification model 502 can output an appropriate label for an unknown classification target sentence.
[0099] Note that during learning, the classification model 502 takes the target language sentences included in the learning data as input and outputs the classification labels calculated based on the target language sentences. Also, based on the difference between the classification labels and the teacher signals (which are regarded as the correct answers for the classification labels) included in the learning data, the parameters within the classification model 502 are adjusted. When the classification model 502 is implemented by a neural network, the internal parameters of the classification model 502 are adjusted by the method of error backpropagation.
[0100] The classification label 503 is the data output by the classification model 502. As described above, the classification label is calculated and output by the classification model 502 based on the sentence to be classified. The classification label is data representing the type of time expression (for example, date expression) included in the sentence to be classified.
[0101] The learning control unit 504 controls the learning of the classification model 502 based on the learning data. Specifically, the learning control unit 504 provides the data of the target language sentences included in the learning data output by the learning data generation device 3 as the input to the classification model 502. Also, the learning control unit 504 controls the classification model 502 so that the classification model 502 adjusts (updates) its internal parameters based on the difference between the output from the classification model 502 and the teacher signals included in the learning data. That is, the learning control unit 504 controls the implementation of machine learning of the classification model 502.
[0102] As described above, with the configuration shown in FIG. 7, the learning data generation device 3 can generate learning data based on the parallel corpus. Also, the learning control unit 504 of the classification device 5 can perform machine learning of the classification model 502 using the learning data. Further, using the learned classification model 502, the classification device 5 can classify the type of the time expression included in the sentence and assign a label corresponding to the classification result.
[0103] You may implement the modification examples of the embodiment described above. Hereinafter, a plurality of modification examples will be described.
[0104] [Modification Example 1] Above, a configuration for classifying types related to date expressions in particular was described. However, date expressions are merely an example of time expressions. The learning data generation device 3 may perform similar processing for other time expressions instead of date expressions to generate learning data. Japanese date expressions matched the pattern of "* days". As other Japanese time expressions, for patterns such as "* seconds", "* minutes", "* hours", "* months", "* quarters", "* years", "* centuries" (not limited to those listed here), similar processing may be performed. Also, machine learning using the generated learning data may be performed for those time expressions. Further, using the machine-learned classification model, the classification of the type related to the time expression included in an unknown sentence may be automatically performed.
[0105] [Modification Example 2] In the above embodiment, the case where Japanese is the target language was described. Also, an example using an English sentence as the translation of a Japanese sentence was described. As a modification, a language other than Japanese may be used as the target language. Also, as the translation of the target language, any language other than the target language may be used.
[0106] [Modification Example 3] In the above embodiment, a corpus of bilingual translation (i.e., Japanese-English translation) was used. In other words, in the above embodiment, the other language was only one type of language (only English in the example described). As a modification, instead, a corpus of parallel translation of three or more languages may be used. In this case, the first language is the target language. Also, sentences in the second language, the third language, etc. are used as the translated sentences of the sentences in the first language, respectively. Similar to the target language sentence pattern matching unit 304 and the other language sentence pattern matching unit 305 performing pattern matching for the patterns of their respective languages in the above embodiment, in this modification, for each of the first language, the second language, the third language, etc., pattern matching is performed, and estimation is performed for each language. Then, based on the estimation results for each language, the estimated label determination unit 306 makes a determination of the overall type and assigns a label. In this case, the estimated label determination unit 306 makes a determination, for example, by majority vote or by other methods.
[0107] The fewer the number of types of languages referred to as parallel translations, the easier it is to collect parallel translation data and the lower the cost. On the other hand, the larger the number of types of languages referred to as parallel translations, it may lead to determining the type of time expression based on more diverse expressions, and there may be cases where an improvement in the determination system can be expected.
[0108] [Modification Example 4] In the above embodiment, the target language sentence pattern matching unit 304 and the other language sentence pattern matching unit 305 estimated the labels for each of the sentences in a plurality of languages, and the estimated label determination unit 306 synthesized them to perform the final label estimation. Instead, as a modification, the process of outputting a label representing the type of time expression based on sentences in a plurality of languages may be performed using a machine-learnable model (such as a neural network). That is, the model in Modification Example 4 is a model that takes as input sentences in a plurality of languages (for example, Japanese sentences and English sentences) and outputs a label as the estimation result.
[0109] [Modification Example 5] In the above embodiment, the numerical value determination unit 303 has been described as making a determination regarding the numerical value based on matching with the pattern "*day" in the target language (Japanese). As a modification, the numerical value determination unit 303 may make a determination regarding the numerical value based on matching with a pattern in another language (for example, English). Further, the numerical value determination unit 303 may make a determination regarding the numerical value based on matching with a pattern in at least one of the target language and another language.
[0110] As described above, according to this embodiment or its modification, the learning data generation device 3 determines a teacher signal based on information on a translation pair, which is a pair of a sentence in the target language and a sentence in another language. By using not only the sentence in the target language but also the information on its translation, it becomes possible to comprehensively and accurately assign labels to time expressions. That is, for example, it is possible to automatically generate learning data for a model for classifying types of time expressions in natural language texts, such as the expression "*day" in Japanese. Further, machine learning of the classification model 502 can be performed using such learning data. Also, such a machine-learned classification model 502 can assign a label representing the type of time expression regarding the time expression included in an unknown sentence (target language sentence).
[0111] FIG. 8 is a block diagram showing an example of the internal configuration of the natural language processing apparatus 1 (FIG. 7). The natural language processing apparatus 1 or some of its functions can be realized using a computer. As shown in the figure, the computer includes a central processing unit 901, a RAM 902, an input / output port 903, input / output devices 904 and 905, etc., and a bus 906. The computer itself can be realized using existing technologies. The central processing unit 901 executes instructions included in a program read from the RAM 902 or the like. The central processing unit 901 writes data to the RAM 902, reads data from the RAM 902, and performs arithmetic operations and logical operations according to each instruction. The RAM 902 stores data and programs. Each element included in the RAM 902 has an address and can be accessed using the address. Note that RAM is an abbreviation for "random access memory". The input / output port 903 is a port for the central processing unit 901 to exchange data with external input / output devices and the like. The input / output devices 904 and 905 are input / output devices. The input / output devices 904 and 905 exchange data with the central processing unit 901 via the input / output port 903. The bus 906 is a common communication path used inside the computer. For example, the central processing unit 901 reads and writes data in the RAM 902 via the bus 906. Also, for example, the central processing unit 901 accesses the input / output port via the bus 906.
[0112] At least some of the functions of the natural language processing apparatus 1 according to the above-described embodiments or modifications may be realized by a computer and a program. In that case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read into a computer system and executed. Here, the "computer system" shall include hardware such as an OS and peripheral devices. Further, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, a DVD-ROM, a USB memory, or a storage device such as a hard disk incorporated in a computer system. That is, the "computer-readable recording medium" may be a non-transitory computer-readable recording medium. Furthermore, the "computer-readable recording medium" also includes, like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, a medium that temporarily and dynamically holds a program, and also includes, like a volatile memory inside a computer system that becomes a server or a client in that case, a medium that holds a program for a certain period of time. Also, the above program may be for realizing a part of the above-described functions, and may also be realized in combination with a program already recorded in a computer system for realizing the above-described functions.
[0113] As described above, the embodiments of the present invention have been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and designs and the like within the scope not departing from the gist of the present invention are also included.
Industrial Applicability
[0114] The present invention can be used, for example, for the recognition or understanding of sentences described in natural language. However, the scope of use of the present invention is not limited to what is exemplified here.
Explanation of Signs
[0115] 1 Natural language processing device 2 Parallel corpus storage unit 3 Learning data generation device (natural language processing device) 4 Learning data storage unit 5 Classification device (natural language processing device) 301 Parallel corpus acquisition unit 302 Regular expression extraction unit (extraction unit) 303 Numerical determination unit 304 Target language sentence pattern matching unit (target language sentence label estimation unit) 305 Other language sentence pattern matching unit (other language sentence label estimation unit) 306 Estimated label determination unit 307 Learning data output unit 501 Classification target sentence data 502 Classification model 503 Classification label 504 Learning control unit 901 Central processing unit 902 RAM 903 Input / output port 904, 905 Input / output device 906 Bus< / otherwise> < / date> < / otherwise> < / date> < / otherwise> < / otherwise> < / date> < / date> < / otherwise> < / otherwise> < / date> < / date> < / otherwise> < / date> < / otherwise> < / date> < / none> < / otherwise> < / date> < / otherwise> < / otherwise> < / date> < / date> < / otherwise> < / date> < / none> < / otherwise> < / date> < / otherwise> < / date> < / none> < / otherwise> < / date> < / otherwise> < / date> < / none> < / otherwise> < / date> < / otherwise> < / date> < / otherwise> < / date> < / otherwise> < / date> < / otherwise> < / date> < / otherwise> < / otherwise> < / date> < / date> < / otherwise> < / date> < / none> < / otherwise> < / date> < / none> < / otherwise> < / date> < / otherwise> < / date> < / none> < / otherwise> < / date> < / otherwise> < / otherwise> < / date> < / otherwise> < / date>
Claims
1. An extraction unit that extracts a temporal expression of a target language from a target language sentence described in the target language, and extracts a temporal expression of the other language corresponding to the temporal expression of the target language from another language sentence corresponding to a translation of the target language sentence into the other language; A target language sentence label estimation unit that estimates a target language sentence label, which is a label representing the type of the extracted temporal expression of the target language; Another language sentence label estimation unit that estimates another language sentence label, which is a label representing the type of the extracted temporal expression of the other language; An estimated label determination unit that determines a comprehensive label regarding the temporal expression of the target language sentence based on both the estimated target language sentence label and the other language sentence label; A learning data output unit that outputs learning data consisting of a pair of the target language sentence and the comprehensive label output by the estimated label determination unit; comprising The extraction unit extracts the temporal expression of the other language corresponding to the extracted temporal expression of the target language based on the result of word-level alignment processing between the target language sentence and the other language sentence. The target language sentence label estimation unit estimates the target language sentence label based on whether the temporal expression of the target language and its vicinity in the target language sentence match a pattern corresponding to each of the target language sentence labels. The other language sentence label estimation unit estimates the other language sentence label based on whether the temporal expression of the other language and its vicinity in the other language sentence match a pattern corresponding to each of the other language sentence labels. The estimated label determination unit determines the comprehensive label by a majority vote between the target language sentence label estimated by the target language sentence label estimation unit and the other language sentence label estimated by the other language sentence label estimation unit. The target language text label indicates that it is not any type of time expression <none>It may also be < / none> The other-language text label indicates that it is not any type of time expression <none>It may also be < / none> The estimated label determination unit represents that it is not any type of time expression <none>excluding and performing the majority vote. < / none> A natural language processing device.
2. An extraction unit that extracts a temporal expression of a target language from a target language sentence described in the target language, and extracts a temporal expression of the other language corresponding to the temporal expression of the target language from another language sentence corresponding to a translation of the target language sentence into the other language; A target language sentence label estimation unit that estimates a target language sentence label, which is a label representing the type of the extracted temporal expression of the target language; Another language sentence label estimation unit that estimates another language sentence label, which is a label representing the type of the extracted temporal expression of the other language; An estimated label determination unit that determines a comprehensive label regarding the temporal expression of the target language sentence based on both the estimated target language sentence label and the other language sentence label; A learning data output unit that outputs learning data consisting of a pair of the target language sentence and the comprehensive label output by the estimated label determination unit; comprising; The extraction unit extracts the temporal expression of the other language corresponding to the extracted temporal expression of the target language based on the result of word-level alignment processing between the target language sentence and the other language sentence. The target language sentence label estimation unit estimates the target language sentence label by determining whether the temporal expression of the target language and its vicinity in the target language sentence match a pattern corresponding to each of the target language sentence labels. The other language sentence label estimation unit estimates the other language sentence label by determining whether the temporal expression of the other language and its vicinity in the other language sentence match a pattern corresponding to each of the other language sentence labels. The estimated label determination unit determines the comprehensive label by a majority vote between the target language sentence label, which is the result estimated by the target language sentence label estimation unit, and the other language sentence label, which is the result estimated by the other language sentence label estimation unit. The other language is two or more languages. Natural language processing device.
3. The extraction unit extracts the temporal expression of the target language from the target language sentence by matching a pattern including a numerical expression. The natural language processing device according to claim 1 or 2.
4. The target language is Japanese. The temporal expression of the target language is a date expression extracted by matching a pattern in which the numerical expression and the expression "day" are concatenated. The natural language processing device according to claim 3.
5. The other language is only one language. The natural language processing device according to claim 1.
6. A numerical value determination unit that determines whether a numerical value represented by a numerical expression included in at least one of the temporal expression of the target language and the temporal expression of the other language is within a predetermined range; further comprising; When the determination result by the numerical value determination unit is within the predetermined range in at least one case, the estimated label determination unit determines the comprehensive label based on the determination result by the numerical value determination unit without depending on either the target language sentence label or the other language sentence label. The natural language processing device according to any one of claims 1 to 5.
7. A classification model that inputs a classification target sentence described in the target language and outputs a classification label representing the type of time expression included in the classification target sentence, A learning control unit that controls the implementation of machine learning of the classification model using the learning data output by the learning data output unit, The natural language processing device according to any one of claims 1 to 6, further comprising:
8. A classification model that inputs a classification target sentence described in the target language and outputs a classification label representing the type of time expression included in the classification target sentence, comprising: The classification model has been machine-learned using the learning data output by the natural language processing device according to any one of claims 1 to 7. Classification device.
9. A program for causing a computer to function as the natural language processing device according to any one of claims 1 to 7.
Citation Information
Patent Citations
Inherent expression extraction apparatus, and method and program for the same
JP2010128774A