Japanese input method and related device and equipment

By syllable segmentation and phonetic conversion network conversion of the entire Japanese phonetic data entered by the user, the problem of low input efficiency of existing Japanese input methods is solved, and efficient Japanese input for the entire Japanese sentence is achieved.

CN114327090BActive Publication Date: 2024-11-29JILIN KEXUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111666617.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-11-29
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The input efficiency of existing Japanese input methods is low, mainly because they can only enter one entry at a time and cannot enter the entire sentence.

Method used

By obtaining the Japanese pronunciation data of the entire sentence input by the user, syllable segmentation is performed, and the pronunciation data of each single word is converted into the corresponding Japanese pronunciation and its combination probability, and the output is sorted based on the combination probability.

Benefits of technology

It realizes the efficiency of Japanese input in the entire sentence, improves the input efficiency, and can quickly complete complete Japanese sentence input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327090B_ABST
    Figure CN114327090B_ABST
Patent Text Reader

Abstract

The present application discloses a Japanese input method and related devices and equipment, wherein the Japanese input method includes: obtaining Japanese phonetic data of a whole sentence input by a user; performing syllable segmentation on the Japanese phonetic data of the whole sentence to obtain the phonetic data of each single word in the Japanese phonetic data of the whole sentence; converting the phonetic data of each single word using a phonetic-to-character conversion network to obtain at least one corresponding Japanese whole sentence and the combination probability of each Japanese whole sentence; sorting each Japanese whole sentence in sequence based on the combination probability and outputting it; wherein the phonetic-to-character conversion network is constructed using multiple Japanese whole sentence samples, the phonetic data of each word in the Japanese whole sentence sample and the corresponding word. The above scheme can improve the efficiency of Japanese input.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of language input, and in particular to a Japanese input method and related devices and equipment. Background Art

[0002] Japanese is the language used in Japan. Japan has a population of more than 100 million. Therefore, inputting Japanese on mobile phones, tablets and other terminals is a rigid demand, thus the Japanese input method was born.

[0003] The current Japanese input method is based on Japanese vocabulary consisting of hiragana, katakana, and Japanese kanji. The Japanese vocabulary is encoded according to the numbers corresponding to the letters in its romanization on the mobile phone keys, and the vocabulary is sorted according to the frequency of use. After entering the number keys corresponding to each Roman letter of the required Japanese word in sequence, several words that conform to the required Japanese form are prompted for selection.

[0004] Most current Japanese input methods are word input, which only allows one word to be input at a time, resulting in low input efficiency. Summary of the invention

[0005] The present application provides a Japanese input method and related devices and equipment to solve the problem of low input efficiency of the Japanese input method existing in the prior art.

[0006] The present application provides a Japanese input method, comprising: obtaining Japanese phonetic data of a whole sentence input by a user; performing syllable segmentation on the Japanese phonetic data of the whole sentence to obtain phonetic data of each single word in the Japanese phonetic data of the whole sentence; performing conversion based on the phonetic data of each single word using a phonetic-to-character conversion network to obtain at least one corresponding Japanese whole sentence and the combination probability of each Japanese whole sentence; and outputting after sorting each Japanese whole sentence in sequence based on the combination probability; wherein the phonetic-to-character conversion network is constructed using multiple Japanese whole sentence samples, the phonetic data of each word in the Japanese whole sentence samples, and the corresponding words.

[0007] Among them, the phonetic-to-character conversion network is constructed using multiple Japanese sentence samples, phonetic data of each character in the Japanese sentence samples, and corresponding characters, including: obtaining multiple Japanese sentence samples, and obtaining phonetic data of each phrase and / or each single character in each Japanese sentence sample; performing syllable segmentation on the phonetic data of each phrase to obtain phonetic data of each character in each phrase, and combining the phonetic data of each character in each phrase and the phonetic data of each single character to obtain phonetic data of each character in each Japanese sentence sample; using each Japanese sentence sample, phonetic data of each character in the Japanese sentence sample, and corresponding characters to construct a phonetic-to-character conversion network.

[0008] Among them, the steps of obtaining multiple Japanese sentence samples and obtaining the phonetic data of each phrase and / or each single word in each Japanese sentence sample include: obtaining multiple Japanese sentence samples, segmenting each Japanese sentence sample respectively, and obtaining the phrases and / or single words of each Japanese sentence sample; determining the phonetic data of each phrase and / or each single word in each Japanese sentence sample based on Japanese words and phonetic standards.

[0009] Among them, the steps of obtaining multiple Japanese whole sentence samples, and performing word segmentation on each Japanese whole sentence sample respectively to obtain phrases and / or single words of each Japanese whole sentence sample include: taking each Japanese whole sentence sample as a Japanese whole sentence sample to be segmented; taking the first character of the Japanese whole sentence sample to be segmented as the word head, and taking each character as the word tail in sequence from back to front in the order of arrangement of each character in the Japanese whole sentence sample to be segmented, until the phrase composed of the word head and the word tail conforms to the Japanese vocabulary and phonetic norms, and obtaining a phrase / or single word and the remaining Japanese whole sentence samples; and performing word segmentation again on the remaining Japanese whole sentence samples as the Japanese whole sentence samples to be segmented, until the word segmentation of each Japanese whole sentence sample is completed, and obtaining the single words and / or phrases of each Japanese whole sentence sample.

[0010] Among them, the step of constructing a phonetic-character conversion network using each Japanese sentence sample and the phonetic data of each character in the Japanese sentence sample includes: training a Japanese language model based on each Japanese sentence sample and the phrases and / or single words of each Japanese sentence sample; establishing a corresponding relationship between the phonetic data of each character in the Japanese sentence sample and each character in the Japanese sentence sample, and constructing a phonetic-character conversion network based on the corresponding relationship and the Japanese language model using a weighted finite state converter.

[0011] Among them, the step of performing syllable segmentation on the phonetic data of each phrase to obtain the phonetic data of each character in each phrase includes: in response to the phonetic data of the phrase cannot be syllable segmented based on Japanese words and phonetic standards; based on the target word in the phrase, part of the phonetic data in the phonetic data of the phrase is intercepted, and based on the Japanese words and phonetic standards, it is determined whether the remaining phonetic data in the phonetic data of the phrase is the phonetic data of the characters other than the target character in the phrase; if the remaining phonetic data is the phonetic data of the characters other than the target character in the phrase, then the part of the phonetic data is determined as the phonetic data of the target character to obtain the phonetic data of each character in the phrase.

[0012] Wherein, the step of intercepting part of the phonetic data of the phrase based on the target character in the phrase comprises: in response to the target character being located at the beginning of the phrase, intercepting part of the phonetic data of the phrase in the phonetic data from the front to the back in accordance with the arrangement order of the phonetic data of the phrase; in response to the target character being located in the word of the phrase, there are a first number of characters located before the target character in the phrase, and there are a second number of characters located after the target character, and the length of the phonetic data of the phrase is a third number, intercepting part of the phonetic data of the phrase in the phonetic data within a preset phonetic range of the phonetic data of the phrase in an incremental manner; wherein the preset phonetic range is from the fourth phonetic data to the fifth number of phonetic data in the phonetic data of the phrase, the fourth number is the first number plus 1, and the fifth number is the difference between the third number and the second number; in response to the target character being located at the end of the phrase, intercepting part of the phonetic data of the phrase in the phonetic data from the back to the front in accordance with the arrangement order of the phonetic data of the phrase.

[0013] The step of intercepting part of the phonetic data of the phrase based on the target character in the phrase also includes: determining the target character of each character in the phrase in sequence according to the arrangement order of each character in the phrase until the phonetic data of each character in the phrase is determined.

[0014] Among them, the step of converting the phonetic data of each single word using a phonetic-to-character conversion network to obtain at least one corresponding Japanese sentence and the combination probability of each Japanese sentence includes: converting the phonetic data of each single word into text based on the phonetic-to-character conversion network to obtain at least one single word and / or phrase and the arrangement probability between at least one single word and / or phrase; sorting at least one single word and / or phrase according to the arrangement probability between at least one single word and / or phrase to obtain at least one Japanese sentence and the combination probability of each Japanese sentence.

[0015] The present application also provides a Japanese input device, including: an acquisition module, used to acquire Japanese phonetic data of a whole sentence input by a user; a syllable segmentation module, used to perform syllable segmentation on the Japanese phonetic data of the whole sentence to obtain the phonetic data of each single word in the Japanese phonetic data of the whole sentence; a conversion module, used to perform conversion based on the phonetic data of each single word using a sound-to-character conversion network to obtain at least one corresponding Japanese whole sentence and the combination probability of each Japanese whole sentence; a sorting module, used to sort each converted Japanese whole sentence in sequence based on the combination probability and then output it; wherein the sound-to-character conversion network is constructed using multiple Japanese whole sentence samples, the phonetic data of each word in the Japanese whole sentence samples and the corresponding words.

[0016] The present application also provides an electronic device, including a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement any of the above Japanese input methods.

[0017] The present application also provides a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, any of the above-mentioned Japanese input methods is implemented.

[0018] In the above scheme, the present application first performs syllable segmentation on the Japanese phonetic data of the whole sentence to obtain the phonetic data of each single word in the Japanese phonetic data of the whole sentence, and then converts it based on the phonetic data of each single word using a phonetic-character conversion network to obtain at least one corresponding Japanese whole sentence and the combination probability of each Japanese whole sentence, and finally sorts each Japanese whole sentence in sequence based on the combination probability and outputs it to complete Japanese input. This embodiment first divides the Japanese phonetic data of the whole sentence into phonetic data corresponding to each word, and then uses multiple Japanese whole sentence samples, the phonetic data of each word in the Japanese whole sentence sample and the corresponding word to construct a phonetic-character conversion network to convert it, thereby obtaining a complete Japanese sentence, thereby realizing the input of a complete Japanese sentence, thereby improving the efficiency of Japanese input. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of an embodiment of the Japanese input method of the present application;

[0020] Figure 2 is a flowchart of another embodiment of the Japanese input method of the present application;

[0021] Figure 3 yes Figure 2 A schematic diagram of a flow chart of an embodiment of constructing a phonetic-character conversion network in an embodiment;

[0022] Figure 4 It is a structural schematic diagram of an embodiment of the Japanese input device of the present application;

[0023] Figure 5 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0024] Figure 6 A schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0025] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0026] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0027] The terms "system" and "network" are often used interchangeably in this document. The term "and / or" in this document merely describes the relationship between associated objects, and there can be three relationships. For example, A and / or B can be: A exists alone, A and B exist simultaneously, or B exists alone. In addition, the character " / " in this document generally indicates an "or" relationship between the associated objects before and after. Furthermore, "multiple" in this document means two or more than two.

[0028] Please refer to Figure 1 , Figure 1 is a schematic flowchart of an embodiment of the Japanese input method of this application.

[0029] Specifically, it may include the following steps:

[0030] Step S11: Obtain the whole-sentence Japanese phonetic notation data input by the user.

[0031] After obtaining the whole-sentence Japanese phonetic notation data input by the user, where the Japanese phonetic notation data includes romaji and hiragana, and the Japanese characters include hiragana, katakana, and Chinese characters. In this embodiment, after obtaining the Japanese phonetic notation data composed of romaji and / or hiragana input by the user, it is converted into a whole-sentence Japanese sentence composed of hiragana, katakana, and / or Chinese characters for output.

[0032] Among them, the whole-sentence Japanese phonetic notation data refers to the pronunciation data corresponding to a complete Japanese sentence. For example: the Japanese sentence is "針金でしばる" (which means "tie up with wire" in Chinese), then its corresponding whole-sentence Japanese phonetic notation data is "はりがねでしばる".

[0033] Step S12: Perform syllable segmentation on the whole-sentence Japanese phonetic notation data to obtain the phonetic notation data of each single character in the whole-sentence Japanese phonetic notation data.

[0034] After obtaining the whole-sentence Japanese phonetic notation data, perform syllable segmentation on the whole-sentence Japanese phonetic notation data to obtain the phonetic notation data of each single character in the whole-sentence Japanese phonetic notation data. Syllable segmentation is to segment the input whole romaji and / or hiragana phonetic notation data into the phonetic notation of each single character. For example: the input whole-sentence Japanese phonetic notation data in hiragana "はりがねでしばる", after syllable segmentation, the result is "はりがねでしばる", where "はり", "がね", "で", "し", "ば", "る" respectively correspond to the pronunciation of a single character. The phonetic notation data of each single character can be separated by a space or other special symbols.

[0035] In a specific application scenario, the whole sentence of Japanese phonetic data can be segmented into syllables based on Japanese words and phonetic standards to obtain the phonetic data of each word in the whole sentence of Japanese phonetic data. Among them, the Japanese words and phonetic standards are determined based on the Japanese dictionary, that is, the official terminology standard of the Japanese language. The Japanese dictionary includes each Japanese word and the corresponding phonetic of each word. In another specific application scenario, the whole sentence of Japanese phonetic data can also be segmented into syllables through the constructed phonetic-character conversion network to obtain the phonetic data of each word in the whole sentence of Japanese phonetic data.

[0036] Step S13: Based on the phonetic data of each single word, the phonetic-character conversion network is used to convert it to obtain at least one corresponding Japanese sentence and the combination probability of each Japanese sentence.

[0037] After obtaining the phonetic data of each single word in the whole sentence Japanese phonetic data, the phonetic data of each single word is converted using a phonetic-character conversion network to obtain at least one corresponding Japanese whole sentence after conversion and the combination probability of each Japanese whole sentence.

[0038] The phonetic-character conversion network is constructed by using multiple Japanese sentence samples, the phonetic data of each character in the Japanese sentence samples, and the corresponding characters. It can convert the phonetic data of each character into the corresponding character, and then combine the characters into a complete Japanese sentence.

[0039] Therefore, the phonetic-to-character conversion network can perform conversion based on the phonetic data of each single word to obtain at least one corresponding Japanese sentence and the combination probability of each Japanese sentence. In a specific application scenario, the phonetic-to-character conversion network can perform conversion based on the phonetic data of each single word to obtain each single word corresponding to the phonetic data, and then combine each single word into a Japanese sentence. Since there is a situation where one sound corresponds to multiple words, the Japanese phonetic data of the whole sentence may also correspond to different Japanese sentences. Therefore, in the process of combining each single word into a Japanese sentence, each single word will be combined into at least one Japanese sentence, and the combination probability between at least one Japanese sentence will be determined.

[0040] In a specific application scenario, the combination probability between at least one Japanese sentence converted from the same Japanese phonetic data can be determined based on the user's language habits. In another specific application scenario, the combination probability between the Japanese sentences can also be determined by using the frequency of occurrence of at least one Japanese sentence in multiple Japanese sentence samples used in the process of building the phonetic-character conversion network.

[0041] Step S14: sorting the Japanese complete sentences in sequence based on the combination probability and outputting them.

[0042] After obtaining at least one Japanese complete sentence and its combination probability, the Japanese complete sentences are sequentially sorted based on the combination probability and then output. Specifically, based on the size of the combination probability, at least one Japanese complete sentence can be sequentially sorted in descending order of probability and then output for the user to select and complete the Japanese complete sentence input. Alternatively, based on the combination probability and considering the user's habits, the Japanese complete sentences can be sequentially sorted and then output.

[0043] Through the above steps, the Japanese input method of this embodiment first performs syllable segmentation on the Japanese phonetic data of the whole sentence to obtain the phonetic data of each single word in the Japanese phonetic data of the whole sentence, and then converts it based on the phonetic data of each single word using the phonetic-character conversion network to obtain at least one corresponding Japanese whole sentence and the combination probability of each Japanese whole sentence, and finally sorts each Japanese whole sentence in sequence based on the combination probability and outputs it to complete Japanese input. This embodiment first divides the Japanese phonetic data of the whole sentence into phonetic data corresponding to each word, and then uses multiple Japanese whole sentence samples, the phonetic data of each word in the Japanese whole sentence sample and the corresponding word to construct a phonetic-character conversion network to convert it, thereby obtaining a complete Japanese sentence, thereby realizing the input of a complete Japanese sentence, thereby improving the efficiency of Japanese input.

[0044] See also Figure 2 , Figure 2 This is a flow chart of another embodiment of the Japanese input method of the present application. Specifically, it may include the following steps:

[0045] Step S21: Acquire the Japanese phonetic notation data of the entire sentence input by the user.

[0046] The Japanese phonetic data of the whole sentence input by the user is obtained. In a specific application scenario, the Japanese phonetic data of the whole sentence input by the user through the Romaji keyboard and / or the Hiragana keyboard can be accepted.

[0047] Step S22: performing syllable segmentation on the entire sentence Japanese phonetic data to obtain phonetic data of each word in the entire sentence Japanese phonetic data.

[0048] After the Japanese phonetic notation data of the whole sentence is obtained, the Japanese phonetic notation data of the whole sentence is segmented into syllables to obtain the phonetic data of each single word in the Japanese phonetic notation data of the whole sentence.

[0049] In a specific application scenario, the constructed phonetic-character conversion network can be used to perform syllable segmentation on the entire sentence of Japanese phonetic data to obtain the phonetic data of each single word in the entire sentence of Japanese phonetic data. In other application scenarios, the entire sentence of Japanese phonetic data can also be segmented into syllables by other syllable segmentation methods. This is not limited here.

[0050] See also Figure 3 , Figure 3 yes Figure 2Schematic flowchart of constructing a phonetic-character conversion network in an embodiment.

[0051] Step S31: Obtain a plurality of Japanese full-sentence samples, and obtain the phonetic data of each phrase and / or each single character in each Japanese full-sentence sample.

[0052] First, obtain a plurality of Japanese full-sentence samples. Specifically, a large number of complete Japanese sentences can be collected through tools such as web crawlers; or a large number of complete Japanese sentences can be obtained from a large number of e-books. The specific acquisition method is not limited here.

[0053] Then, obtain the phonetic data of each phrase and / or each single character in each Japanese full-sentence sample. Specifically, the phonetic data of each phrase and / or each single character in each Japanese full-sentence sample can be determined based on the Japanese word and phonetic norms, that is, the Japanese dictionary.

[0054] In a specific application scenario, after obtaining a plurality of Japanese full-sentence samples, each Japanese full-sentence sample can be segmented to obtain the phrases and / or single characters of each Japanese full-sentence sample, and then the phonetic data of each phrase and / or each single character in each Japanese full-sentence sample can be determined based on the Japanese word and phonetic norms.

[0055] Among them, the segmentation step includes: taking each Japanese full-sentence sample as the Japanese full-sentence sample to be segmented, then taking the first character of the Japanese full-sentence sample to be segmented as the beginning of the word, and sequentially taking each character as the end of the word from back to front according to the arrangement order of each character in the Japanese full-sentence sample to be segmented until the phrase composed of the beginning and the end of the word conforms to the Japanese word and phonetic norms, obtaining a phrase / or single character and the remaining Japanese full-sentence sample. For example: when the Japanese full-sentence sample to be segmented is "針金でしばる", taking the first character "針" as the beginning of the word, according to the order of "針金でしばる", first taking the last character "る" as the end of the word from back to front, and judging whether the word "針金でしばる" composed of "針" and "る" is a word based on the Japanese word and phonetic norms. When it is not, then taking "ば" as the end of the word from back to front for judgment until it is judged that "針金" is a word that conforms to the Japanese word and phonetic norms. At this time, a word "針金" and the remaining Japanese full-sentence sample "でしばる" are obtained.

[0056] Then, the remaining Japanese full-sentence samples are used as Japanese full-sentence samples to be segmented again until the segmentation of each Japanese full-sentence sample is completed, obtaining the single characters and / or phrases of each Japanese full-sentence sample. For example: taking the remaining Japanese full-sentence sample "でしばる" as the Japanese full-sentence sample to be segmented again, using the first character "で" in the Japanese full-sentence sample to be segmented as the beginning of the word, and following the arrangement order, using the last character "る" as the end of the word, and judging whether the word "でしばる" formed between "で" and "る" is a word based on Japanese word and phonetic annotation norms. When it is not, then take "ば" as the end of the word and judge from the back to the front until it is judged that "で" is a word that conforms to Japanese word and phonetic annotation norms, and so on until the single characters and / or phrases of each Japanese full-sentence sample are obtained, that is, "針金でしばる".

[0057] The above segmentation method can improve the accuracy of segmentation and avoid the interference of short words on long words.

[0058] In other application scenarios, it is also possible to obtain each phrase and / or each single character and its phonetic annotation data in each Japanese full-sentence sample through other segmentation methods, which are not limited here.

[0059] In a specific application scenario, after determining the single characters and / or phrases of each Japanese full-sentence sample, the srilm tool (Stanford Research Institute Language Modeling Toolkit) can be used to train based on each Japanese full-sentence sample and its single characters and / or phrases to obtain a Japanese language model. Among them, the input of the Japanese language model is the single characters and / or phrases of each Japanese full-sentence sample, and the output is the whole-sentence combination type and combination probability between single characters and / or phrases. Among them, the combination probability between single characters and / or phrases can be output in ARPA format. For example: when the Japanese full-sentence sample corresponding to the single character and / or phrase is "針金でしばる", its combination probability is as follows:

[0060] “\data

[0061] ngram 1=nr#number of unigrams

[0062] ngram 2=nr#number of bigrams

[0063] \1-grams:

[0064] p1針金bow1

[0065] \2-grams:

[0066] p2針金で

[0067] p3でしばる

[0068] \end\”

[0069] Among them, p1 represents the probability of the appearance of "針金" (wire), p2 represents the probability of the appearance of "で" after "針金", and similarly, p3 represents the probability of the appearance of "しばる" after "で".

[0070] The Japanese language model of this embodiment can determine the arrangement probability between each single character and / or phrase in a Japanese whole sentence, and then obtain the combined probability of the corresponding Japanese whole sentences.

[0071] Step S32: Perform syllable segmentation on the phonetic data of each phrase to obtain the phonetic data of each character in each phrase, and comprehensively obtain the phonetic data of each character in each Japanese whole sentence sample based on the phonetic data of each character in each phrase and the phonetic data of each single character.

[0072] After obtaining each phrase and / or each single character and their phonetic data in each Japanese whole sentence sample, considering that the phonetic data corresponding to the Japanese words in the Japanese dictionary and the phonetic data corresponding to the phrases in the phonetic specification are not assigned to each character in the phrase, this step performs syllable segmentation on the phonetic data of each phrase. Through syllable segmentation, the phonetic data of the phrase is distributed to each character in the phrase, so as to obtain the phonetic data of each character in each phrase. Finally, the phonetic data of each character in each phrase and the phonetic data of each single character are comprehensively obtained to obtain the phonetic data of each character in each Japanese whole sentence sample.

[0073] In a specific implementation manner, since there are various grammars in Japanese itself, such as voiceless-voiced sound transformation, liaison, kun reading, imperative transformation, etc., the phonetic data of each character in each phrase in the Japanese whole sentence sample may be different from the phonetic data marked in the Japanese dictionary. Therefore, there may be a situation where the phonetic data of the phrase cannot be syllable-segmented based on the Japanese words and the phonetic specification. For example, the result of syllable segmentation of the phonetic data "はりがね" of "針金" is "はり" and "がね". Among them, "はり" is the pronunciation of "針", and "がね" is the pronunciation of "金". However, in the Japanese dictionary, the pronunciation of "金" is "かね", and it has undergone voiceless-voiced sound transformation in the phrase "針金", so the pronunciation of "金" cannot be directly determined based on the Japanese words and the phonetic specification.

[0074] Then, in response to the fact that the phonetic data of the phrase cannot be syllable-segmented based on the Japanese words and the phonetic specification, it indicates that there is a change in the pronunciation of the character in the phrase. Then, based on the target character in the phrase, part of the phonetic data in the phonetic data of the phrase is intercepted, and it is judged whether the remaining phonetic data in the phonetic data of the phrase is the phonetic data of the characters other than the target character in the phrase according to the Japanese words and the phonetic specification; if the remaining phonetic data is the phonetic data of the characters other than the target character in the phrase, the part of the phonetic data is determined as the phonetic data of the target character to obtain the phonetic data of each character in the phrase.

[0075] Among them, the method for determining the target character is: according to the arrangement order of each character in the phrase, each character is determined as the target character in turn, until the phonetic data of each character in the phrase is determined. Specifically, each character can be determined as the target character in turn from front to back according to the arrangement order of each character in the phrase, or each character can be determined as the target character in turn from back to front according to the arrangement order of each character in the phrase. For example, in the word "needle gold", "needle" can be used as the target character according to the order of arrangement, and part of the phonetic data corresponding to "needle gold" is intercepted based on "needle", and based on Japanese words and phonetic norms, it is judged whether the remaining phonetic data in the phonetic data corresponding to "needle gold" is the phonetic data other than the target character in the phrase, if not, then "gold" is used as the target character according to the order of arrangement, and the above judgment is performed until the phonetic data of each character in "needle gold" is determined.

[0076] In a specific embodiment, the step of intercepting part of the phonetic data of the phrase based on the target character in the phrase specifically includes:

[0077] In response to the target character being located at the beginning of the phrase, part of the phonetic data of the phrase is intercepted in increasing order from the front to the back according to the arrangement sequence of the phonetic data of the phrase.

[0078] In response to a target character being located in a word of a phrase, a first number of characters existing before the target character and a second number of characters existing after the target character in the phrase, and the length of the phonetic data of the phrase being a third number, part of the phonetic data in the phonetic data of the phrase is sequentially and incrementally intercepted within a preset phonetic range of the phonetic data of the phrase; wherein the preset phonetic range is from the fourth to the fifth number of phonetic data in the phonetic data of the phrase, the fourth number is the first number plus 1, and the fifth number is the difference between the third number and the second number.

[0079] In a specific application scenario, when the target character is located in a word of a phrase, there are m characters in front of it and n characters behind it. Assuming that the total length of the phonetic data is k, then part of the phonetic data is intercepted in increasing order from m+i pinyins backward, the value range of i is (1, kmn), and the maximum interception is kn, and the intercepted part of the phonetic data is assigned to the target character, and it is judged whether the first m+i-1 phonetic data are the phonetic data corresponding to the first m characters, and whether the phonetic data at the end that is not intercepted is the phonetic data corresponding to the last n characters. If both are true, then the intercepted part of the phonetic data is assigned to the target character, and the phonetic data in front of the intercepted part of the phonetic data and the phonetic data behind the intercepted part of the phonetic data are respectively assigned to the first m characters and the last n characters of the target character according to the arrangement of the phrase, thereby obtaining the phonetic data of each character in the phrase.

[0080] In response to the target character being at the end of a phrase, part of the phonetic data of the phrase is sequentially intercepted incrementally from the end in the order of arrangement of the phonetic data of the phrase.

[0081] In a specific application scenario, the phonetic data of "針金" is "はりがね". Assuming the target character is "金" and it is at the end of the word, then, starting from the end in the order of arrangement of the phonetic data, first assign "ね" to "金", and check if the remaining part of the phonetic data, "はりが", is the sound of "針". If not, increment further and assign "がね" to "金", and check if the remaining part of the phonetic data, "はり", is the sound of "針". Since the result is yes, then "金" has an additional sound "がね", and the pronunciation "はりがね" of "針金" is split into "はりがね".

[0082] Among them, the method of syllable segmentation for the entire Japanese sentence phonetic data in step S22 can also be performed by using the above method of intercepting part of the phonetic data for segmentation.

[0083] In this step, the phonetic data of each character is obtained, and the phonetic-character conversion network constructed using the phonetic data of each character enables the phonetic-character conversion network to divide the entire Japanese sentence phonetic data into the phonetic data of each character.

[0084] After obtaining the phonetic data of each character in the above manner, when a certain character has different phonetic data, different special symbols can be used to mark the character to distinguish different phonetic data, facilitating the phonetic-character conversion by the phonetic-character conversion network. For example, both "がね" and "かね" are the sounds of "金". After obtaining the characters of "針金", in this word, if "金" is pronounced as "がね", then "針金" will be phonetically annotated as "針金#1", indicating that the pronunciation of "金" in "針金#1" is "がね", which is distinguished from its own pronunciation "かね".

[0085] Step S33: Construct a phonetic-character conversion network using each Japanese sentence sample, the phonetic data of each character in the Japanese sentence sample, and the corresponding characters.

[0086] Construct a phonetic-character conversion network using each Japanese sentence sample, the phonetic data of each character in the Japanese sentence sample, and the corresponding characters.

[0087] In a specific application scenario, after obtaining the phonetic data of each character in the Japanese sentence sample and the corresponding characters, the phonetic data of each character in the Japanese sentence sample and the corresponding characters can be fused with the Japanese language model in step S31 to construct a phonetic-character conversion network. Thus, a phonetic-character conversion network can be obtained that can divide the entire Japanese sentence phonetic data into the phonetic data corresponding to each character, then convert the phonetic data corresponding to each character into the corresponding character, and finally combine the characters into phrases and the entire Japanese sentence.

[0088] In a specific implementation, the combination probability of each Japanese whole sentence sample can be determined based on each Japanese whole sentence sample and the single words and / or phrases in each Japanese whole sentence sample; then, a corresponding relationship is established between the phonetic data of each word in the Japanese whole sentence sample and each word in each Japanese whole sentence sample, and a phonetic-character conversion network is constructed based on the corresponding relationship, each Japanese whole sentence sample and the combination probability of each Japanese whole sentence sample using a weighted finite state transducer (WFST network).

[0089] Among them, the WFST network is composed of nodes and arcs, the nodes represent the state, and the arcs have three parts: input syllables, output characters, and scores. Since the number of output characters on the arc is 1, this embodiment uses a weighted finite state converter (WFST network) based on the phonetic data of each character in the Japanese whole sentence sample and each character in each Japanese whole sentence sample to build a phonetic-character conversion network, which can match the structural characteristics of the WFST network and realize the construction of the phonetic-character conversion network.

[0090] In a specific application scenario, the arrangement probability between single words and / or phrases in each Japanese whole sentence sample can be determined based on each Japanese whole sentence sample, and then the combination probability of the Japanese whole sentence samples corresponding to each Japanese whole sentence sample can be determined based on the arrangement probability between the single words and / or phrases in each Japanese whole sentence sample.

[0091] The constructed phonetic-character conversion network has the functions of syllable segmentation and phonetic-character conversion.

[0092] Step S23: Based on the phonetic-to-character conversion network, the phonetic data of each word is converted into text to obtain at least one word and / or phrase and the arrangement probability between at least one word and / or phrase, and at least one word and / or phrase is sorted according to the arrangement probability between at least one word and / or phrase to obtain at least one Japanese sentence and the combination probability of each Japanese sentence.

[0093] After obtaining the phonetic data of each word in the Japanese phonetic data of the whole sentence, the phonetic data of each word is converted into text based on the phonetic-to-character conversion network to obtain at least one word and / or phrase and the arrangement probability between at least one word and / or phrase, and at least one word and / or phrase is sorted according to the arrangement probability between at least one word and / or phrase to obtain at least one Japanese whole sentence and the combination probability of each Japanese whole sentence.

[0094] Specifically, the arrangement probability between the single words and / or phrases in each Japanese sentence is determined based on the type and quantity of each Japanese sentence sample in the phonetic-character conversion network, and then the combination probability of the Japanese sentence corresponding to each Japanese sentence is determined based on the arrangement probability between the single words and / or phrases in each Japanese sentence. Among them, the single words and / or phrases with the largest arrangement probability can be combined to obtain a Japanese sentence.

[0095] Step S24: Sort each Japanese full sentence in sequence based on the combined probability and then output.

[0096] After obtaining at least one Japanese full sentence and its combined probability, sort each Japanese full sentence in sequence based on the combined probability and then output. Specifically, based on the magnitude of the combined probability, sort at least one Japanese full sentence in descending order of probability in sequence and then output, for the user to select, thus completing the input of the Japanese full sentence.

[0097] In a specific application scenario, when the user inputs the hiragana pinyin "はりがねでしばる", after syllable segmentation, the result is "はりがねでしばる". According to the syllable segmentation, through the phonogram conversion network for conversion, "針金でしばる" is obtained, and their arrangement probabilities are 0, p1, p2, 0, 0, p3 respectively, then the combined probability is "0 + p1 + p2 + 0 + 0 + p3". Among them, the meaning of the first arrangement probability 0 is the probability that がね follows はり. Since "針金" is a complete word and there is no other combination method, the probability that がね follows はり is set to 0. The setting of the subsequent 0 and the meaning of the arrangement probability are similar and will not be elaborated here. Thus, through the above method, the input of the full Japanese sentence can be realized.

[0098] Through the above steps, the Japanese input method of this embodiment can train a phonogram conversion network with syllable segmentation and phonogram conversion functions based on the language characteristics of Japanese, and avoid the influence of Japanese grammar transformation on the phonogram data by the method of judging the phonogram data of the target character by intercepting part of the phonogram data in the phrase based on the target character, so as to determine the phonogram data of each character from the sentence itself, thereby realizing the correspondence between each character and the corresponding phonogram data and realizing the phonetic conversion of single characters. Moreover, this embodiment also performs word segmentation by taking each Japanese full sentence sample as the Japanese full sentence sample to be segmented, then taking the first character of the Japanese full sentence sample to be segmented as the beginning of the word, and sequentially taking each character as the end of the word from back to front in the order of the characters in the Japanese full sentence sample to be segmented until the word segmentation is successful, which can improve the accuracy of word segmentation and avoid the interference of short words on long words. This embodiment uses the phonogram conversion network to convert the phonogram data of the full Japanese sentence input by the user to obtain a complete Japanese sentence, thereby realizing the input of the complete Japanese sentence and further improving the Japanese input efficiency.

[0099] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of an embodiment of the Japanese input device of the present application.

[0100] The Japanese input device 40 of this embodiment includes: an acquisition module 41, a syllable segmentation module 42, a conversion module 43 and a sorting module 44. The acquisition module 41 is used to acquire the Japanese phonetic data of the whole sentence input by the user; the syllable segmentation module 42 is used to perform syllable segmentation on the Japanese phonetic data of the whole sentence to obtain the phonetic data of each single word in the Japanese phonetic data of the whole sentence; the conversion module 43 is used to perform conversion based on the phonetic data of each single word using a phonetic-character conversion network to obtain at least one corresponding Japanese whole sentence and the combination probability of each Japanese whole sentence; the sorting module 44 is used to sort the converted Japanese whole sentences in sequence based on the combination probability and then output them.

[0101] The acquisition module 41 is also used to acquire multiple Japanese sentence samples, and acquire the phonetic data of each phrase and / or each single word in each Japanese sentence sample; perform syllable segmentation on the phonetic data of each phrase to obtain the phonetic data of each word in each phrase, and combine the phonetic data of each word in each phrase and the phonetic data of each single word to obtain the phonetic data of each word in each Japanese sentence sample; and construct a phonetic-character conversion network using each Japanese sentence sample, the phonetic data of each word in the Japanese sentence sample, and the corresponding characters.

[0102] The acquisition module 41 is also used to acquire multiple Japanese sentence samples, segment each Japanese sentence sample, and obtain the phrases and / or single words of each Japanese sentence sample; determine the phonetic data of each phrase and / or each single word in each Japanese sentence sample based on Japanese words and phonetic standards.

[0103] The acquisition module 41 is also used to use each Japanese sentence sample as a Japanese sentence sample to be segmented; use the first character of the Japanese sentence sample to be segmented as the beginning of the word, and use each character as the end of the word in the order of arrangement of the characters in the Japanese sentence sample to be segmented from back to front, until the phrase composed of the beginning of the word and the end of the word conforms to the Japanese vocabulary and phonetic standards, and obtain a phrase / or a single word and the remaining Japanese sentence samples; use the remaining Japanese sentence samples as Japanese sentence samples to be segmented again, until the segmentation of each Japanese sentence sample is completed, and obtain the single word and / or phrase of each Japanese sentence sample.

[0104] The acquisition module 41 is also used to train a Japanese language model based on each Japanese sentence sample and the phrases and / or single words of each Japanese sentence sample; establish a correspondence between the phonetic data of each word in the Japanese sentence sample and each word in each Japanese sentence sample, and construct a phonetic-character conversion network based on the correspondence and the Japanese language model using a weighted finite state converter.

[0105] The acquisition module 41 is also used for responding to the fact that the phonetic data of the phrase cannot be segmented into syllables based on the Japanese words and phonetic specifications; intercepting part of the phonetic data of the phrase based on the target word in the phrase, and judging whether the remaining phonetic data in the phonetic data of the phrase is the phonetic data of the words other than the target word in the phrase based on the Japanese words and phonetic specifications; if the remaining phonetic data is the phonetic data of the words other than the target word in the phrase, determining part of the phonetic data as the phonetic data of the target word to obtain the phonetic data of each word in the phrase.

[0106] The acquisition module 41 is also used for, in response to the target character being located at the beginning of a phrase, intercepting part of the phonetic data of the phrase in the phonetic data in sequence from front to back in accordance with the arrangement order of the phonetic data of the phrase; in response to the target character being located in a word of the phrase, there are a first number of characters located before the target character in the phrase, and there are a second number of characters located after the target character, and the length of the phonetic data of the phrase is a third number, intercepting part of the phonetic data of the phrase in sequence within a preset phonetic range of the phonetic data of the phrase in sequence; wherein the preset phonetic range is from the fourth number of phonetic data to the fifth number of phonetic data in the phonetic data of the phrase, the fourth number is the first number plus 1, and the fifth number is the difference between the third number and the second number; in response to the target character being located at the end of the phrase, intercepting part of the phonetic data of the phrase in sequence from back to front in accordance with the arrangement order of the phonetic data of the phrase.

[0107] The acquisition module 41 is also used to determine the target characters of each character in turn according to the arrangement order of each character in the phrase, until the phonetic data of each character in the phrase is determined.

[0108] The conversion module 43 is also used to perform text conversion on the phonetic data of each word based on the phonetic-character conversion network to obtain at least one word and / or phrase and the arrangement probability between at least one word and / or phrase; sort at least one word and / or phrase according to the arrangement probability between at least one word and / or phrase to obtain at least one Japanese sentence and the combination probability of each Japanese sentence.

[0109] The above scheme can improve the efficiency of Japanese input.

[0110] See also Figure 5 , Figure 5 : is a schematic diagram of a framework of an embodiment of an electronic device of the present application. The electronic device 50 includes a memory 51 and a processor 52 coupled to each other, and the processor 52 is used to execute program instructions stored in the memory 51 to implement the steps of any of the above Japanese input method embodiments. In a specific implementation scenario, the electronic device 50 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 50 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.

[0111] Specifically, the processor 52 is used to control itself and the memory 51 to implement the steps of any of the above-mentioned Japanese input method embodiments. The processor 52 can also be called a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip with signal processing capabilities. The processor 52 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 52 can be implemented by an integrated circuit chip.

[0112] The above scheme can improve the efficiency of Japanese input.

[0113] See also Figure 6 , Figure 6 The computer-readable storage medium 60 stores program instructions 601 that can be executed by a processor, and the program instructions 601 are used to implement the steps of any of the above Japanese input method embodiments.

[0114] The above scheme can improve the efficiency of Japanese input.

[0115] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0117] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0119] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A Japanese input method, characterized in that: The Japanese input method comprises: Get the Japanese phonetic data of the whole sentence input by the user; Performing syllable segmentation on the entire sentence Japanese phonetic data to obtain phonetic data of each word in the entire sentence Japanese phonetic data; Based on the phonetic data of each single word, the phonetic data is converted using a phonetic-character conversion network to obtain at least one corresponding Japanese sentence and a combination probability of each Japanese sentence; sorting the Japanese complete sentences in sequence based on the combination probability and then outputting them; The phonetic-character conversion network is constructed by using a plurality of Japanese sentence samples, the phonetic data of each character in the Japanese sentence samples and the corresponding characters.

2. The Japanese input method according to claim 1, characterized in that: The phonetic-character conversion network is constructed by using a plurality of Japanese sentence samples, phonetic data of each character in the Japanese sentence samples and the corresponding characters, and includes: Acquire multiple Japanese sentence samples, and acquire phonetic data of each phrase and / or each single word in each Japanese sentence sample; Performing syllable segmentation on the phonetic data of each phrase to obtain phonetic data of each character in each phrase, and synthesizing the phonetic data of each character in each phrase and the phonetic data of each single character to obtain phonetic data of each character in each Japanese sentence sample; The phonetic-character conversion network is constructed using each of the Japanese sentence samples, the phonetic data of each character in the Japanese sentence samples, and the corresponding characters.

3. The Japanese input method according to claim 2, characterized in that: The step of obtaining a plurality of Japanese sentence samples and obtaining the phonetic data of each phrase and / or each word in each Japanese sentence sample comprises: Acquire the plurality of Japanese sentence samples, and segment each Japanese sentence sample to obtain a phrase and / or a single word of each Japanese sentence sample; The phonetic data of each phrase and / or each single word in each Japanese sentence sample is determined based on Japanese words and phonetic standards.

4. The Japanese input method according to claim 3, characterized in that: The step of acquiring the plurality of Japanese sentence samples and segmenting each Japanese sentence sample to obtain a phrase and / or a single word of each Japanese sentence sample comprises: Each Japanese sentence sample is used as a Japanese sentence sample to be segmented; The first character of the Japanese sentence sample to be segmented is taken as the beginning of the word, and each character is taken as the ending of the word in sequence from back to front according to the arrangement order of each character in the Japanese sentence sample to be segmented, until the phrase composed of the beginning of the word and the ending of the word meets the Japanese word and phonetic standard, thereby obtaining a phrase / or a single character and the remaining Japanese sentence sample; The remaining Japanese whole sentence samples are used as Japanese whole sentence samples to be segmented again, until the segmentation of each Japanese whole sentence sample is completed, and the single words and / or phrases of each Japanese whole sentence sample are obtained.

5. The Japanese input method according to claim 3, characterized in that: The step of constructing the phonetic-to-character conversion network using the Japanese sentence samples and the phonetic data of each character in the Japanese sentence samples comprises: Training a Japanese language model based on the Japanese sentence samples and the phrases and / or words of the Japanese sentence samples; The phonetic data of each character in the Japanese sentence sample is established in a corresponding relationship with each character in each Japanese sentence sample, and the phonetic character conversion network is constructed by using a weighted finite state converter based on the corresponding relationship and the Japanese language model.

6. The Japanese input method according to any one of claims 2 to 5, characterized in that: The step of performing syllable segmentation on the phonetic data of each phrase to obtain the phonetic data of each word in each phrase comprises: In response to the phonetic data of the phrase being unable to perform syllable segmentation based on the Japanese words and phonetic norms; Based on the target character in the phrase, a part of the phonetic data of the phrase is intercepted, and based on the Japanese words and the phonetic standard, it is determined whether the remaining phonetic data in the phonetic data of the phrase is the phonetic data of the characters other than the target character in the phrase; If the remaining phonetic data is phonetic data of characters other than the target character in the phrase, the partial phonetic data is determined as the phonetic data of the target character to obtain phonetic data of each character in the phrase.

7. The Japanese input method according to claim 6, characterized in that: The step of intercepting part of the phonetic data of the phrase based on the target word in the phrase comprises: In response to the target character being located at the beginning of the phrase, a portion of the phonetic data of the phrase is intercepted in increasing order from front to back according to the arrangement sequence of the phonetic data of the phrase; In response to the target character being located in a word of the phrase, a first number of characters existing before the target character and a second number of characters existing after the target character in the phrase, and the length of the phonetic data of the phrase being a third number, part of the phonetic data of the phonetic data of the phrase is intercepted sequentially and incrementally within a preset phonetic range of the phonetic data of the phrase; wherein the preset phonetic range is from the fourth phonetic data to the fifth number of phonetic data in the phonetic data of the phrase, the fourth number is the first number plus 1, and the fifth number is the difference between the third number and the second number; In response to the target character being located at the end of the phrase, part of the phonetic data of the phrase is intercepted in increasing order from the back to the front according to the arrangement sequence of the phonetic data of the phrase.

8. The Japanese input method according to claim 7, characterized in that: The step of intercepting part of the phonetic data of the phrase based on the target word in the phrase also includes: According to the arrangement order of each character in the phrase, each character is sequentially determined as the target character until the phonetic data of each character in the phrase is determined.

9. The Japanese input method according to claim 1, characterized in that: The step of converting the phonetic data of each word using a phonetic-character conversion network to obtain at least one corresponding Japanese sentence and the combination probability of each Japanese sentence comprises: Based on the phonetic-to-character conversion network, the phonetic data of each word is converted into text to obtain at least one word and / or phrase and the arrangement probability between the at least one word and / or phrase; The at least one single word and / or phrase is sorted according to the arrangement probability between the at least one single word and / or phrase to obtain the at least one Japanese sentence and the combination probability of each Japanese sentence.

10. A Japanese input device, characterized in that: The Japanese input device comprises: The acquisition module is used to obtain the Japanese phonetic data of the entire sentence input by the user; A syllable segmentation module, used for performing syllable segmentation on the whole sentence Japanese phonetic data to obtain phonetic data of each word in the whole sentence Japanese phonetic data; A conversion module, used for converting the phonetic data of each single word using a phonetic-character conversion network to obtain at least one corresponding Japanese sentence and a combination probability of each Japanese sentence; A sorting module, used for sorting the converted Japanese sentences in sequence based on the combination probability and then outputting them; The phonetic-character conversion network is constructed by using a plurality of Japanese sentence samples, the phonetic data of each character in the Japanese sentence samples and the corresponding characters.

11. An electronic device, characterized in that: The invention comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the Japanese input method according to any one of claims 1 to 9.

12. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the Japanese input method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Input method candidate result display method, related equipment and readable storage medium

    CN111090341A

  • Voice processing method and system, electronic device and storage medium

    CN113157852A