Method and apparatus for processing word bank

IN604699BActive Publication Date: 2026-09-30TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
IN202017055970
Authority / Receiving Office
IN · IN
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-05-25
Filing Date
2020-12-23
Publication Date
2026-09-30

AI Technical Summary

Technical Problem

Current tools for labeling Japanese text with kana are inefficient due to the large capacity of thesauri, which slows down the process of finding corresponding kana for Chinese characters.

Method used

A method and device that streamline thesaurus processing by searching for target data records in a secondary lexicon, dividing entries, and storing data records based on kana sets, reducing the number of records in the secondary thesaurus and improving efficiency.

Benefits of technology

The method simplifies the secondary thesaurus, reducing its capacity and enhancing the efficiency of labeling kana in Japanese text, allowing for faster processing and marking of kana in Japanese text.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

A method and apparatus for processing a word bank, which fall within the field of computers. The method comprises: acquiring a first data record in a first word bank (101), wherein the first data record comprises a multi-character entry and a first kana set corresponding to each Chinese character in the multi-character entry, and the first kana set corresponding to the Chinese character comprises at least one kana corresponding to the Chinese character; searching a second word bank for a plurality of target data records corresponding to the first data record (102), wherein target entries in each target data record are different constituent parts of the multi-character entry, the target entries in each target data record form the multi-character entry, and a second kana set corresponding to each Chinese character in the target entries in the target data record is respectively the same as the first kana set corresponding to each Chinese character; and when the plurality of target data records corresponding to the first data record are not found in the second word bank, saving the first data record in the second word bank (103). The method can improve kana labelling efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Invention Title: A method and device for processing thesaurus

[0001] This application claims the priority of the Chinese patent application filed on May 25, 2018 with the application number 201810515382.X and the invention title "A method and device for processing thesaurus", the entire content of which is incorporated by reference In this application.Technical field

[0002] This application relates to the computer field, in particular to a method and device for processing thesaurus.Background technique

[0003] Japanese includes kanji and kana, and the pronunciation of kanji can be marked with a kana. For example, for the Chinese character "body", you can use "しんたい" to mark its pronunciation, that is, the pronunciation of "body" can be "しんたい". Often marked its kana characters waiting in the above article or Japanese lyrics scenarios such as this can the convenience of readers.

[0004] At present, there is a tool for labeling Japanese text with kana. The tool has a thesaurus, which includes multiple data records, and each data record includes an entry and at least the corresponding Chinese characters in the entry. A pseudonym etc. When annotating kana, the tool can be used to read the entry in the text to be labeled, and find out the kana corresponding to each Chinese character in the entry from the thesaurus according to the entry. In the Japanese text, the entry includes the The kana found is marked at the top of each Chinese character.

[0005] In the process of realizing this application, the inventor found that the above method has at least the following defects:

[0006] At present, the capacity of the thesaurus is relatively large, and the thesaurus includes a large number of data records. It takes a long time to obtain the kana corresponding to the Chinese characters in the entry from the thesaurus when tagging the kana, which reduces the efficiency of tagging the kana.

[0007] Summary of the invention

[0008] In order to improve the efficiency of annotating pseudonyms, embodiments of the present application provide a method and device for processing the lexicon. The technical solution is as follows:

[0009] In the first aspect, an embodiment of the present application provides a method for processing a lexicon, and the method includes:

[0010] Acquire the first data record in the first dictionary, the first data record includes a multi-term entry and a first kana set corresponding to each Chinese character in the multi-term entry, and the multi-term entry is a set of a plurality of Chinese characters. Entry, the first kana set corresponding to the Chinese character includes at least one kana corresponding to the Chinese character;

[0011] Search for multiple target data records corresponding to the first data record in the second lexicon, where the target entry in each target data record is a different component of the multiple entries, and in each target data record The target term of ”composes the multiple terms, and the second kana set corresponding to each Chinese character in the target term in the target data record is respectively the same as the first kana set corresponding to each Chinese character;

[0012] When multiple target data records corresponding to the first data record are not found in the second dictionary, the first data record is stored in the second dictionary.

[0013] Optionally, the searching in the second word database for multiple target data records corresponding to the first data record includes:

[0014] Dividing the multiple entries in the first data record into N word entries, where N is an integer greater than 1, and the word entry is an entry including one Chinese character;

[0015] Find the target data record corresponding to each word entry in the second vocabulary, and the target data record corresponding to the word entry includes the word entry and the second kana set corresponding to the Chinese characters in the word entry, The second kana set corresponding to the Chinese characters is the same as the first kana set corresponding to the Chinese characters;

[0016] When the target data record corresponding to each word entry is not found in the second lexicon, it is determined that multiple target data corresponding to the first data record cannot be found in the second lexicon recording.

[0017] Optionally, before acquiring the first data record in the first word database, the method further includes:

[0018] Store each second data record in the first vocabulary in the second vocabulary, and the second data record includes a word entry and a first kana set corresponding to the Chinese characters in the word entry .

[0019] Optionally, the storing each second data record in the first thesaurus in the second thesaurus includes:

[0020] Acquiring any data record in the first dictionary;

[0021] When the data record includes a first pseudonym set, it is determined that the entry in the data record is a word entry and the data record is stored in the second dictionary.

[0022] Optionally, before acquiring the first data record in the first word database, the method further includes:

[0023] The data records of the third dictionary including the preset application scenarios are stored in the first dictionary. Each data record in the third dictionary includes an entry, and each Chinese character in the entry corresponds to Collection of pseudonyms and application scenarios.

[0024] Optionally, the storing the data records of the preset application scenarios in the third lexicon in the first lexicon includes:

[0025] Obtain a data record including a preset application scenario from a third dictionary, the data record including an entry, at least one set of kana corresponding to each Chinese character in the first entry, and the at least one set of kana The frequency of use of each pseudonym set of and the preset application scenarios;

[0026] Selecting the kana set corresponding to each Chinese character from the at least one kana set corresponding to each Chinese character according to the frequency of use of the at least one kana set corresponding to each Chinese character;

[0027] The first data record is composed of the one entry and the kana set for each Chinese character selected and stored in the first dictionary.

[0028] In the second aspect, an embodiment of the present application provides a device for processing a vocabulary, and the device includes:

[0029] The acquiring module is used to acquire the first data record in the first vocabulary. The first data record includes a multi-term entry and a first kana set corresponding to each Chinese character in the multi-term entry, and the multi-term entry is Entries including multiple Chinese characters, and the first kana set corresponding to the Chinese characters includes at least one kana corresponding to the Chinese characters;

[0030] The search module is used to search for multiple target data records corresponding to the first data record in the second lexicon, and the target entry in each target data record is a different component of the multiple entries. The target entries in the target data records constitute the multiple entries, and the second kana set corresponding to each Chinese character in the target entry in the target data record is respectively the same as the first kana set corresponding to each Chinese character;

[0031] The saving module is configured to save the first data record in the second dictionary when multiple target data records corresponding to the first data record are not found in the second dictionary.

[0032] Optionally, the search module includes:

[0033] A dividing unit, configured to divide the multiple entries in the first data record into N word entries, where N is an integer greater than 1, and the word entry is an entry including one Chinese character;

[0034] The searching unit is used to search for the target data record corresponding to each word entry in the second vocabulary, and the target data record corresponding to the word entry includes the word entry and the corresponding Chinese characters in the word entry A second kana set, the second kana set corresponding to the Chinese characters, the first kana set corresponding to the Chinese characters are the same;

[0035] The first determining unit is configured to determine that the first data cannot be found from the second dictionary when the target data record corresponding to each word entry is not found in the second dictionary Record the corresponding multiple target data records.

[0036] Optionally, the saving module is also used for:

[0037] Store each second data record in the first vocabulary in the second vocabulary, and the second data record includes a word entry and a first kana set corresponding to the Chinese characters in the word entry .

[0038] Optionally, the saving module includes:

[0039] An obtaining unit, configured to obtain any data record in the first dictionary;

[0040] The second determining unit is configured to determine that the entry in the data record is a word entry when the data record includes a first kana set and save the data record in the second dictionary in.

[0041] Optionally, the saving module is also used for:

[0042] The data records of the third dictionary including the preset application scenarios are stored in the first dictionary. Each data record in the third dictionary includes an entry, and each Chinese character in the entry corresponds to Collection of pseudonyms and application scenarios.

[0043] Optionally, the saving module further includes:

[0044] The second acquiring unit is configured to acquire a data record including a preset application scenario from a third thesaurus, the data record including an entry, at least one set of kana corresponding to each Chinese character in the first entry, The frequency of use of each pseudonym set in the at least one pseudonym set and the preset application scenario;

[0045] The selecting unit is configured to select the kana set corresponding to each Chinese character from the at least one kana set corresponding to each Chinese character according to the use frequency of the at least one kana set corresponding to each Chinese character;

[0046] The storage unit is configured to form a first data record of the one entry, and a set of kana selected for each Chinese character, and store the first data record in the first dictionary.

[0047] In the third aspect, the embodiments of the present application provide a non-volatile computer-readable storage medium for storing a computer program. The computer program is loaded by a processor to execute the first aspect or any of the first aspects. Instructions for the selected implementation method.

[0048] The technical solutions provided by the embodiments of the present application may include the following beneficial effects:

[0049] For any first data record in the first lexicon, if there are multiple target data records in the second lexicon, the second kana set corresponding to the Chinese character in the target term in each target data record and the first data When the first kana sets corresponding to the Chinese characters in the records are the same, the first data record is not stored in the second thesaurus; if the multiple target data records do not exist in the second thesaurus, the first data The records are stored in the second thesaurus, which simplifies the number of data records in the second thesaurus and reduces the capacity of the second thesaurus. Since the capacity of the second thesaurus is small, when the second thesaurus is used to label the kana of each Chinese character in the Japanese text, the efficiency of labeling the kana can be improved.

[0050] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application.Description of the drawings

[0051] The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments that conform to the application, and are used together with the specification to explain the principle of the application.

[0052] Fig. 1 is a flowchart of a method for processing thesaurus according to an embodiment of the present application;

[0053] FIG. 2 is a flowchart of another method for processing the lexicon provided by an embodiment of the present application;

[0054] Figure 3-1 is a flowchart of a method for labeling pseudonyms provided by an embodiment of the present application;

[0055] Figure 3-2 is a schematic diagram of the Japanese text provided by an embodiment of the present application;

[0056] Fig. 4 is a schematic structural diagram of a device for processing a word database provided by an embodiment of the present application;

[0057] FIG. 5 is a schematic diagram of a terminal structure provided by an embodiment of the present application.

[0058] Through the above drawings, the specific embodiments of the present application have been shown, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the concept of the present application in any way, but to explain the concept of the present application for those skilled in the art by referring to specific embodiments.detailed description

[0059] The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.

[0060] Referring to Fig. 1, an embodiment of the present application provides a method for processing a lexicon, and the method includes:

[0061] Step 101: Obtain a first data record in a first dictionary. The first data record includes a multi-term entry and a first kana set corresponding to each Chinese character in the multi-term entry, and the multi-term entry includes a plurality of Chinese characters The first kana set corresponding to the Chinese character includes at least one kana corresponding to the Chinese character.

[0062] Step 102: Search for multiple target data records corresponding to the first data record in the second lexicon, the target entry in each target data record is a different component of the multiple entries, and the target in each target data record The entries form the multiple entries, and the second kana set corresponding to each Chinese character in the target entry entry in the target data record is respectively the same as the first kana set corresponding to each Chinese character.

[0063] Step 103: When multiple target data records corresponding to the first data record are not found in the second thesaurus, the first data record is stored in the second thesaurus.

[0064] In the embodiment of the present application, for any first data record in the first dictionary, if there are multiple target data records in the second dictionary, each target data record in the target term corresponding to the Chinese character in the first data record When the second kana set is the same as the first kana set corresponding to the Chinese character in the first data record, the first data record is not saved in the second dictionary; if the multiple target data does not exist in the second dictionary Records, the first data record is saved in the second thesaurus, which simplifies the number of data records in the second thesaurus, reduces the capacity of the second thesaurus, and uses the second thesaurus to mark the Japanese text When the kana of each Chinese character is used, the efficiency of marking the kana can be improved.

[0065] Referring to FIG. 2, an embodiment of the present application provides a method for processing a thesaurus. The method is used to streamline the first thesaurus to obtain a second thesaurus. The number of data records included in the second thesaurus is less than that of the first. The number of data records included in the lexicon, and the method includes:

[0066] Step 201: Save each second data record in the first word bank in the second word bank. The second data record includes a word entry and the first kana set corresponding to the Chinese characters in the word entry. Articles are entries that include one Chinese character.

[0067] Optionally, before performing this step, you can also create a blank second vocabulary.

[0068] Optionally, before performing this step, the first vocabulary can also be obtained. There are many ways to obtain the first thesaurus. In this step, the ways to obtain the first thesaurus are listed as follows:

[0069] In the first way, the first thesaurus may be a thesaurus included in a tool for annotating pseudonyms. In this step, the asaurus included in a certain tool can be acquired as the first thesaurus. This tool can be used to mark the kana of the Chinese characters in the Japanese text of a certain application scene. For example, the application scenario can be news or lyrics and other application scenarios. For news application scenarios, use the first tool corresponding to the news application scenario. The first tool is dedicated to marking the pseudonyms of Chinese characters in the news manuscript; for the lyrics application scenario, use the lyrics application The second tool corresponding to the scene, the second tool is dedicated to marking the kana of the Chinese characters in the lyrics text. That is, in this step, the word database included in the first tool can be acquired as the first word database or the word database included in the second tool can be acquired as the first word database.

[0070] Since the pronunciation of the same Chinese character in Japanese is different in different application scenarios, that is, the kana marked on the Chinese character is different in different application scenarios, the thesaurus of the first tool and the thesaurus of the second tool are different.

[0071] In this step, in addition to obtaining the first vocabulary in the first way, the first vocabulary may also be obtained in other ways. For example, the second method is also listed below. In the second method, data records including preset application scenarios in the third dictionary are stored in the first dictionary.

[0072] Among them, the third lexicon is a general lexicon, which can be applied to different application scenarios. Each data record in the third lexicon includes an entry, a set of kana corresponding to each Chinese character in the entry, and an application scenario. The set of kana corresponding to the Chinese character includes at least one kana corresponding to the Chinese character.

[0073] Optionally, for any data record in the third thesaurus, for each Chinese character in the data record, the data record may include a set of kana corresponding to the Chinese character, or may include multiple characters corresponding to the Chinese character. A set of kana, that is, each Chinese character in the data record corresponds to at least one set of kana. The data record may also include the frequency of use corresponding to each kana set, and may also include the part of speech of the entry in the data record, etc. information.

[0074] Optionally, when a data record including a preset application scenario is obtained from the third thesaurus, according to the usage frequency of at least one set of kana corresponding to each Chinese character in the data record, the data record corresponding to each Chinese character Select the kana set corresponding to each Chinese character from at least one kana set, and select the kana set for each Chinese character as the first kana set corresponding to each Chinese character. The entry in the data record is the entry in the entry. The first kana set selected for each Chinese character and the part-of-speech information of the term in the data record form a first data record and are stored in the first thesaurus.

[0075] Optionally, for at least one kana set corresponding to each Chinese character, the kana set with the highest frequency of use may be selected from the at least one kana set corresponding to the Chinese character as the first kana set corresponding to the Chinese character.

[0076] Optionally, each data record in the first vocabulary includes a vocabulary and a first kana set corresponding to each Chinese character in the vocabulary, and may also include information such as part of speech of the vocabulary.

[0077] For example, referring to the first vocabulary shown in Table 1 below, the first data record in the first vocabulary shown in Table 1 includes the entry "思い出す", and the Chinese character "思" in this entry corresponds to the first data record. A set of kana (おも), the first set of kana (だ) corresponding to the entry "出", and the part of speech of the entry is "five paragraph verbs". The second data record in the first thesaurus shown in Table 1 includes the entry "思い", the first kana set (おも) corresponding to the Chinese character "思" in the entry, and the part of speech of the entry As the "five verbs". The third data record in the first thesaurus shown in Table 1 includes the entry "出す", the first kana set (だ) corresponding to the Chinese character "出" in this entry, and the part of speech of the entry is "Five-phase verb".

[0078] Table 1: The first thesaurus

[0079] [Table 0001]Entry First kana set Part of speech思い出す (おも)、(だ) Five-part verbThink (おも) Five-part verbOut (だ) Five-part verb... ... ...

[0080] This step can be: Obtain any data record in the first thesaurus; if the data record includes a first kana set, determine that the entry in the data record is a word entry that includes a Chinese character and put the data The record is recorded as the second data and saved in the second dictionary. Each of the second data records in the first first thesaurus is acquired in the above manner and stored in the second thesaurus.

[0081] For example, to obtain the first data record in the first thesaurus shown in Table 1, the first data record includes two sets of first kana, namely (おも) and (だ), so the first data The entry "思い出す" in the record includes two Chinese characters, not a word entry that includes one Chinese character.

[0082] Get the second data record in the first thesaurus shown in Table 1. The second data record includes a first kana set (おも), so the entry "思い" in the second data record includes one Chinese characters are word strips that include one Chinese character. The second data record can be used as the second data record and stored in the second thesaurus as shown in Table 2.

[0083] Obtain the third data record in the first thesaurus shown in Table 1. The third data record includes a first kana set (だ), so the entry "出す" in the third data record includes a Chinese character , Is a word bar that includes a Chinese character. The third data record can be used as the second data record and stored in the second word database as shown in Table 2.

[0084] Table 2: The second thesaurus

[0085] [表0002]Entry The second set of pseudonyms Part of speechThink (おも) Five-part verbOut (だ) Five-part verbthink (おも) Five-part verb... ... ...

[0086] Step 202: Obtain a first data record in a first dictionary. The first data record includes a multi-term entry and a first kana set corresponding to each Chinese character in the multi-term entry, and the multi-term entry includes a plurality of Chinese characters. The first kana set corresponding to the Chinese character includes at least one kana corresponding to the Chinese character.

[0087] The first data record is a data record other than the second data record in the first thesaurus, so in this step, a data record can be obtained from other data records in the first thesaurus except the second data record as the first data record. data record.

[0088] For example, the second data record and the third data record in the first lexicon shown in Table 1 are the second data records including word entries, so the two data records are divided from the first lexicon shown in Table 1. One data record is acquired from data records other than the second data record. Assuming that the first data record is acquired and used as the first data record, the first data record includes multiple terms "思い出す", the first kana set (おも)和 (だ), and the part of speech of the multi-entry is "five paragraph verbs".

[0089] Step 203: Look up whether there are multiple target data records corresponding to the first data record in the second lexicon. The target entry in each target data record is a different component of the multiple entries. The target term forms the multiple terms, and the second kana set corresponding to each Chinese character in the target term in the target data record is respectively the same as the first kana set corresponding to each Chinese character.

[0090] Optionally, this step can be implemented through the following steps from 2031 to:

[0091] 2031: Divide the multiple entries in the first data record into N word entries, where N is an integer greater than 1.

[0092] Optionally, in this step, the multiple vocabulary entries can be divided into N vocabulary entries including one Chinese character. For example, the first data record may be divided into two word items, which are "思い" and "出す", which include multiple terms "思い出す".

[0093] 2032: Look up whether there is a target data record corresponding to each word entry in the second vocabulary. The target data record corresponding to the word entry includes the word entry and the second kana set corresponding to the Chinese characters in the word entry. The second kana set corresponding to the Chinese character is the same as the first kana set corresponding to the Chinese character.

[0094] Optionally, for any word entry among the N word entries, a second word database is searched for whether the data record of the word entry is included. If the data record is found, determine whether the second kana set corresponding to the Chinese characters in the word bar in the data record is the same as the first kana set corresponding to the Chinese characters in the word bar in the first data record; If it is determined that the second kana set corresponding to the Chinese character in the word entry is the same as the first kana set corresponding to the Chinese character, then the data record is used as the target data record corresponding to the word entry; otherwise, the second word is determined The target data record corresponding to the word entry does not exist in the library.

[0095] For example, for the word bar "思い", the first data record including the word bar "思い" is searched from the second dictionary shown in Table 2. The first data record includes the word bar "思い" ", the second set of kana (おも) and the part of speech "five paragraph verbs". The second kana set (おも) corresponding to the Chinese character "思" in the word bar "思い" in the first data record and the Chinese character "思" in the word bar "思い" in the first data record The corresponding first kana set (おも) is the same, so the first data record is the target data record corresponding to the word bar "思い".

[0096] For another example, for the word entry "出す", the second data record including the word entry "出す" is searched from the second dictionary shown in Table 2. The second data record includes the word entry "出す", the second kana set (だ), and the part of speech "five paragraph verbs". The second kana set (だ) corresponding to the Chinese character "出" in the word bar "出す" in the second data record and the Chinese character "出" in the word bar "出す" in the first data record The corresponding first kana set (だ) is the same, so the second data record is the target data record corresponding to the word bar "出す".

[0097] 2033: If there is a target data record corresponding to each word entry in the second lexicon, it is determined that there are multiple target data records corresponding to the first data record in the second lexicon.

[0098] For example, for the two word strips divided into the multi-word "思い出す", the two word strips have corresponding target data records, so that it can be determined that there are multiple words corresponding to the first data record in the second word database. Target data record.

[0099] Optionally, if the target data record corresponding to each word entry does not exist in the second thesaurus, it can be determined that there are no multiple target data records corresponding to the first data record in the second thesaurus.

[0100] If it is determined that there are multiple target data records corresponding to the first data record in the second lexicon, there is no need to add the first data record to the second lexicon, that is, the multiple targets can be used in the second lexicon The data record replaces the first data record, thereby reducing the number of data records in the second dictionary.

[0101] Step 204: If the multiple target data records do not exist in the second thesaurus, save the first data record in the second thesaurus.

[0102] In the embodiment of the present application, for any first data record in the first dictionary, if there are multiple target data records in the second dictionary, each target data record in the target term corresponding to the Chinese character in the first data record When the second kana set is the same as the first kana set corresponding to the Chinese character in the first data record, the first data record is not saved in the second dictionary; if the multiple target data does not exist in the second dictionary Records, the first data record is saved in the second thesaurus, which simplifies the number of data records in the second thesaurus, reduces the capacity of the second thesaurus, and uses the second thesaurus to mark the Japanese text When the kana of each Chinese character is used, the efficiency of marking the kana can be improved. Since the capacity of the second thesaurus is small, the second thesaurus can be installed on the mobile terminal, and the kana of each Chinese character in the Japanese text can be marked on the mobile terminal.

[0103] Referring to Figure 3-1, an embodiment of the present application provides a method for labeling kana. The method can use the second thesaurus obtained in any of the above embodiments to label the kana of the Chinese characters in the Japanese text. The method includes:

[0104] Step 301: Obtain the first Chinese character in the Japanese text, and use the first Chinese character as the entry to be processed.

[0105] For example, for the Japanese text "思い出す", the first Chinese character "思" is used as the entry to be processed.

[0106] Step 302: Search whether there is a data record that includes the term to be processed in the second dictionary, if it exists, execute 303, if it does not exist, execute 305.

[0107] Look up whether there is a data record in the second word database shown in Table 2 that includes the term "think" to be processed, and the result of the search is that there is a third data record in Table 2 that includes the term "think" to be processed.

[0108] Step 303: Determine the kana in the kana set corresponding to each Chinese character in the entry to be processed in the data record as the kana corresponding to each Chinese character in the entry to be processed.

[0109] For example, the kana in the kana set (おも) corresponding to the Chinese character "思" in the entry to be processed in the third data record is determined as the kana corresponding to the Chinese character "思", that is, the kana corresponding to the Chinese character "思"お和も.

[0110] Step 304: Acquire the next unacquired word in the Japanese text, form a new word to be processed with the word and the word to be processed, and return to step 302.

[0111] Obtain the next unacquired word "い" from the Japanese text "思い出す", and compose the new word "思い" to be processed into the word "思" to be processed and the word "い" to be processed. Look up whether there is a data record that includes the term "思い" in the second thesaurus shown in Table 2, and the result of the search is that there is a first data record in Table 2 that includes the term "思い" to be processed. Determine the kana in the kana set (おも) corresponding to the Chinese character "思" in the Chinese character "思い" in the entry to be processed in the first data record as the kana corresponding to the Chinese character "思", that is, the Chinese character "思" The corresponding pseudonyms are お和も.

[0112] From the Japanese text "思い出す", the next unacquired word "out" is obtained, and the word "思い" to be processed and the word "out" obtained are formed into a new word "思い出" to be processed. Look up whether there is a data record that includes the word "思い出" in the second thesaurus shown in Table 2, and the result of the search is that there is no data record that contains the word "思い出" in Table 2, and go to step 305 .

[0113] Step 305: Use the kana corresponding to the Chinese character in the entry to be processed to label the Chinese character in the Japanese text.

[0114] For example, in the entry "思い出" to be processed, only the Chinese character "思" has corresponding kana, which are お and も respectively. Therefore, in the Japanese text "思い出す", the Chinese character "思" can be marked with the kana corresponding to the Chinese character "思". , And the result is shown in Figure 3-2.

[0115] Step 306: If there are still Chinese characters without kana in the Japanese text, obtain the first Chinese character from the Chinese characters without kana, use the first Chinese character as the entry to be processed, and go to step 302.

[0116] If there are no Chinese characters without kana in the Japanese text, the operation is ended, and each Chinese character in the Japanese text is marked with kana.

[0117] The following are device embodiments of this application, which can be used to implement the method embodiments of this application. For details that are not disclosed in the device embodiments of this application, please refer to the method embodiments of this application.

[0118] Referring to FIG. 4, an embodiment of the present application provides an apparatus 400 for processing a vocabulary, and the apparatus 400 includes:

[0119] The obtaining module 401 is configured to obtain a first data record in a first vocabulary. The first data record includes a multi-term entry and a first kana set corresponding to each Chinese character in the multi-term entry. In order to include multiple Chinese characters, the first kana set corresponding to the Chinese characters includes at least one kana corresponding to the Chinese characters;

[0120] The search module 402 is configured to search the second thesaurus for whether there are multiple target data records corresponding to the first data record in the second thesaurus, and the target entry in each target data record is the multiple entry The target entry in each target data record constitutes the multiple entries, and the second kana set corresponding to each Chinese character in the target entry in the target data record is respectively associated with each Chinese character The corresponding first kana set is the same;

[0121] The saving module 403 is configured to save the first data record in the second dictionary when multiple target data records corresponding to the first data record are not found in the second dictionary.

[0122] Optionally, the search module 402 includes:

[0123] A dividing unit, configured to divide the multiple entries in the first data record into N word entries, where N is an integer greater than 1, and the word entry is an entry including one Chinese character;

[0124] The search unit is used to search for the target data record corresponding to each word entry in the second vocabulary. The target data record corresponding to the word entry includes the word entry and the corresponding Chinese characters in the word entry A second kana set, the second kana set corresponding to the Chinese characters is the same as the first kana set corresponding to the Chinese characters;

[0125] The first determining unit is configured to determine that the first data cannot be found from the second dictionary when the target data record corresponding to each word entry is not found in the second dictionary Record the corresponding multiple target data records.

[0126] Optionally, the saving module 403 is also used for:

[0127] Store each second data record in the first vocabulary in the second vocabulary, and the second data record includes a word entry and a first kana set corresponding to the Chinese characters in the word entry .

[0128] Optionally, the saving module 403 includes:

[0129] An obtaining unit, configured to obtain any data record in the first dictionary;

[0130] The second determining unit is configured to determine that the entry in the data record is a word entry when the data record includes a first kana set and save the data record in the second dictionary in.

[0131] Optionally, the saving module 403 is also used for:

[0132] The data records of the third dictionary including the preset application scenarios are stored in the first dictionary. Each data record in the third dictionary includes an entry, and each Chinese character in the entry corresponds to Collection of pseudonyms and application scenarios.

[0133] Optionally, the saving module 403 further includes:

[0134] The second acquiring unit is configured to acquire a data record including a preset application scenario from a third thesaurus, the data record including an entry, at least one set of kana corresponding to each Chinese character in the first entry, The frequency of use of each pseudonym set in the at least one pseudonym set and the preset application scenario;

[0135] The selecting unit is configured to select the kana set corresponding to each Chinese character from the at least one kana set corresponding to each Chinese character according to the use frequency of the at least one kana set corresponding to each Chinese character;

[0136] The storage unit is configured to form a first data record of the one entry, and a set of kana selected for each Chinese character, and store the first data record in the first dictionary.

[0137] In the embodiment of the present application, for any first data record in the first dictionary, if there are multiple target data records in the second dictionary, each target data record in the target term corresponding to the Chinese character in the first data record When the second kana set is the same as the first kana set corresponding to the Chinese character in the first data record, the first data record is not saved in the second dictionary; if the multiple target data does not exist in the second dictionary Records, the first data record is saved in the second thesaurus, which simplifies the number of data records in the second thesaurus, reduces the capacity of the second thesaurus, and uses the second thesaurus to mark the Japanese text When the kana of each Chinese character is used, the efficiency of marking the kana can be improved.

[0138] Regarding the device in the foregoing embodiment, the specific manner in which each module performs operation has been described in detail in the embodiment of the method, and detailed description will not be given here.

[0139] Fig. 5 shows a structural block diagram of a terminal 500 provided by an exemplary embodiment of the present invention. The terminal 500 can be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic Video experts compress the standard audio level 4) Player, laptop or desktop computer. The terminal 500 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.

[0140] Generally, the terminal 500 includes a processor 501 and a memory 502.

[0141] The processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 501 may adopt at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). achieve. The processor 501 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the awake state, also called a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor used to process data in the standby state. In some embodiments, the processor 501 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing content that needs to be displayed on the display screen. In some embodiments, the processor 501 may further include an AI (Artificial Intelligence, artificial intelligence) processor, which is used to process calculation operations related to machine learning.

[0142] The memory 502 may include one or more computer-readable storage media, which may be non-transitory. The memory 502 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 502 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 501 to implement the method provided in any of the foregoing embodiments.

[0143] In some embodiments, the terminal 500 may optionally further include: a peripheral device interface 503 and at least one peripheral device. The processor 501, the memory 502, and the peripheral device interface 503 may be connected by a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 503 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 504, a touch screen 505, a camera 506, an audio circuit 507, a positioning component 508, and a power supply 509.

[0144] The peripheral device interface 503 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 501 and the memory 502. In some embodiments, the processor 501, the memory 502, and the peripheral device interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 501, the memory 502, and the peripheral device interface 503 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0145] The radio frequency circuit 504 is used for receiving and transmitting RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals. The radio frequency circuit 504 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on. The radio frequency circuit 504 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: World Wide Web, Metropolitan Area Network, Intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), wireless local area network and / or WiFi (Wireless Fidelity, wireless fidelity) network. In some embodiments, the radio frequency circuit 504 may also include a circuit related to NFC (Near Field Communication), which is not limited in this application.

[0146] The display screen 505 is used to display UI (User Interface). The UI can include graphics, text, icons, videos, and any combination thereof. When the display screen 505 is a touch display screen, the display screen 505 also has the ability to collect touch signals on or above the surface of the display screen 505. The touch signal can be input to the processor 501 as a control signal for processing. At this time, the display screen 505 may also be used to provide virtual buttons and / or virtual keyboards, also called soft buttons and / or soft keyboards. In some embodiments, there may be one display screen 505, which is provided with the front panel of the terminal 500; in other embodiments, there may be at least two display screens 505, which are respectively provided on different surfaces of the terminal 500 or in a folded design; In still other embodiments, the display screen 505 may be a flexible display screen, which is disposed on the curved surface or the folding surface of the terminal 500. Furthermore, the display screen 505 can also be configured as a non-rectangular irregular pattern, that is, a special-shaped screen. The display screen 505 may be made of materials such as LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light emitting diode), etc.

[0147] The camera assembly 506 is used to capture images or videos. Optionally, the camera assembly 506 includes a front camera and a rear camera. Generally, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, each of which is a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth-of-field camera to realize the background blur function, the main camera Integrate with the wide-angle camera to achieve panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, the camera assembly 506 may also include a flash. The flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to a combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.

[0148] The audio circuit 507 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 501 for processing, or input to the radio frequency circuit 504 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively set in different parts of the terminal 500. The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 501 or the radio frequency circuit 504 into sound waves. The speaker can be a traditional thin-film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into human audible sound waves, but also convert the electrical signal into human inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 507 may also include a headphone jack.

[0149] The positioning component 508 is used to locate the current geographic location of the terminal 500 to implement navigation or LBS (Location Based Service). The positioning component 508 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, or the Galileo system of Russia.

[0150] The power supply 509 is used to supply power to various components in the terminal 500. The power source 509 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power source 509 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0151] In some embodiments, the terminal 500 further includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: an acceleration sensor 511, a gyroscope sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515, and a proximity sensor 516.

[0152] The acceleration sensor 511 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 500. For example, the acceleration sensor 511 can be used to detect the components of gravitational acceleration on three coordinate axes. The processor 501 may control the touch screen 505 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 511. The acceleration sensor 511 may also be used for the collection of game or user motion data.

[0153] The gyroscope sensor 512 can detect the body direction and the rotation angle of the terminal 500, and the gyroscope sensor 512 can cooperate with the acceleration sensor 511 to collect the user's 3D actions on the terminal 500. The processor 501 can implement the following functions according to the data collected by the gyroscope sensor 512: motion sensing (for example, changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0154] The pressure sensor 513 may be disposed on the side frame of the terminal 500 and / or the lower layer of the touch screen 505. When the pressure sensor 513 is arranged on the side frame of the terminal 500, the user's holding signal of the terminal 500 can be detected, and the processor 501 performs left and right hand recognition or quick operation according to the holding signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed on the lower layer of the touch display screen 505, the processor 501 can control the operability controls on the UI interface according to the user's pressure operation on the touch display screen 505. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0155] The fingerprint sensor 514 is used to collect the user's fingerprint. The processor 501 can identify the user's identity according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 can identify the user's identity according to the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 501 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 514 may be provided on the front, back or side of the terminal 500. When a physical button or a manufacturer logo is provided on the terminal 500, the fingerprint sensor 514 can be integrated with the physical button or the manufacturer logo.

[0156] The optical sensor 515 is used to collect the ambient light intensity. In an embodiment, the processor 501 may control the display brightness of the touch screen 505 according to the ambient light intensity collected by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 505 is increased; when the ambient light intensity is low, the display brightness of the touch screen 505 is decreased. In another embodiment, the processor 501 may also dynamically adjust the shooting parameters of the camera assembly 506 according to the ambient light intensity collected by the optical sensor 515.

[0157] The proximity sensor 516, also called a distance sensor, is usually arranged on the front panel of the terminal 500. The proximity sensor 516 is used to collect the distance between the user and the front of the terminal 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front of the terminal 500 gradually decreases, the processor 501 controls the touch screen 505 to switch from the on-screen state to the off-screen state; when the proximity sensor 516 detects When the distance between the user and the front of the terminal 500 gradually increases, the processor 501 controls the touch display screen 505 to switch from the rest screen state to the bright screen state.

[0158] Those skilled in the art can understand that the structure shown in FIG. 5 does not constitute a limitation on the terminal 500, and may include more or fewer components than shown in the figure, or combine some components, or adopt different component arrangements.

[0159] After considering the specification and practicing the application disclosed herein, those skilled in the art will easily think of other embodiments of the application. This application is intended to cover any variations, uses, or adaptive changes of this application. These variations, uses, or adaptive changes follow the general principles of this application and include common knowledge or customary technical means in the technical field that are not disclosed in this application. . The description and the embodiments are only regarded as exemplary, and the true scope and spirit of the application are pointed out by the following claims.

[0160] It should be understood that the present application is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the application is only limited by the appended claims.

Claims

Claims

1. A method for processing a thesaurus, characterized in that the method comprises: obtaining a first data record in a first thesaurus, the first data record including a multi-term and each of the multi-terms A first kana set corresponding to a Chinese character, the multiple entries are entries that include multiple Chinese characters, and the first kana set corresponding to a Chinese character includes at least one kana corresponding to the Chinese character; searching for the first kana in the second dictionary Multiple target data records corresponding to the data record, the target entry in each target data record is a different component of the multiple entries, and the target entry in each target data record constitutes the multiple entries, The second kana set corresponding to each Chinese character in the target entry in the target data record is the same as the first kana set corresponding to each Chinese character; when the first kana set is not found in the second dictionary If the data record corresponds to multiple target data records, the first data record is stored in the second dictionary.

2. The method according to claim 1, wherein the searching for multiple target data records corresponding to the first data record in the second lexicon comprises: combining multiple entries in the first data record Divide into N word items, where N is an integer greater than 1, the word item is an item including one Chinese character; search the target data record corresponding to each word item in the second dictionary, the word item The corresponding target data record includes the word bar and the second kana set corresponding to the Chinese characters in the word bar, and the second kana set corresponding to the Chinese character is the same as the first kana set corresponding to the Chinese character; If the target data record corresponding to each word entry is not found in the second lexicon, it is determined that multiple target data records corresponding to the first data record cannot be found in the second lexicon.

3. The method according to claim 1 or 2, characterized in that, before the obtaining the first data record in the first thesaurus, it further comprises: storing each second data record in the first thesaurus in the In the second dictionary, the second data record includes a word entry and the first kana set corresponding to the Chinese characters in the word entry.

4. The method according to claim 3, wherein the storing each second data record in the first thesaurus in the second thesaurus comprises: obtaining the data in the first thesaurus Any data record; when the data record includes a first kana set, determine that the entry in the data record is a word entry and save the data record in the second dictionary.

5. The method according to claim 1 or 2, characterized in that, before acquiring the first data record in the first thesaurus, it further comprises: saving the data records including the preset application scenarios in the third thesaurus in the first In a vocabulary database, each data record in the third vocabulary includes a vocabulary, a set of pseudonyms corresponding to each Chinese character in the vocabulary, and application scenarios.

6. The method according to claim 5, wherein the storing data records of the preset application scenarios in the third thesaurus in the first thesaurus comprises: obtaining the preset applications from the third thesaurus A data record of a scene, the data record includes an entry, at least one set of kana corresponding to each Chinese character in the first entry, the frequency of use of each set of kana in the at least one set of kana, and the Preset application scenarios; select the kana set corresponding to each Chinese character from the at least one kana set corresponding to each Chinese character according to the frequency of use of the at least one kana set corresponding to each Chinese character; Entries, selecting a set of kana for each Chinese character, form a first data record and store it in the first dictionary.

7. A device for processing a thesaurus, characterized in that the device comprises: an acquisition module for acquiring a first data record in a first thesaurus, the first data record including a multi-term entry and the multi-word The first kana set corresponding to each Chinese character in the entry, the multiple entries are entries that include multiple Chinese characters, and the first kana set corresponding to the Chinese characters includes at least one kana corresponding to the Chinese character; the search module is used to search The second dictionary searches for multiple target data records corresponding to the first data record, the target entry in each target data record is a different component of the multiple entries, and the target data record in each target data record The target term forms the multiple terms, and the second kana set corresponding to each Chinese character in the target term in the target data record is the same as the first kana set corresponding to each Chinese character; the saving module is used for when If multiple target data records corresponding to the first data record are not found in the second dictionary, the first data record is stored in the second dictionary.

8. 7. The device according to claim 7, wherein the search module comprises: a dividing unit, configured to divide the multi-term entries in the first data record into N word entries, where N is an integer greater than 1, The word entry is an entry that includes one Chinese character; the searching unit is used to search for the target data record corresponding to each word entry in the second dictionary, and the target data record corresponding to the word entry includes the single The entry and the second kana set corresponding to the Chinese characters in the word entry, the second kana set corresponding to the Chinese characters is the same as the first kana set corresponding to the Chinese characters; the first determining unit is used for when the If the target data record corresponding to each word entry is not found in the second lexicon, it is determined that multiple target data records corresponding to the first data record cannot be found in the second lexicon.

9. The device according to claim 7 or 8, wherein the saving module is further configured to: save each second data record in the first vocabulary in the second vocabulary, and the The second data record includes a word bar and the first kana set corresponding to the Chinese characters in the word bar.

10. 9. The device according to claim 9, wherein the storage module comprises: a first acquiring unit, configured to acquire any data record in the first dictionary; a second determining unit, configured to When the data record includes a first pseudonym set, it is determined that the entry in the data record is a word entry and the data record is stored in the second dictionary.

11. The device according to claim 7 or 8, wherein the saving module is further configured to: save data records in the third vocabulary including preset application scenarios in the first vocabulary, and the third vocabulary Each data record in the thesaurus includes an entry, a set of pseudonyms corresponding to each Chinese character in the entry, and application scenarios.

12. The device according to claim 11, wherein the saving module further comprises: a second acquiring unit, configured to acquire a data record including a preset application scenario from a third dictionary, the data record including a word Article, at least one set of kana corresponding to each Chinese character in the first entry, the frequency of use of each set of kana in the at least one set of kana, and the preset application scenario; State the frequency of use of at least one kana set corresponding to each Chinese character, and select the kana set corresponding to each Chinese character from the at least one kana set corresponding to each Chinese character; a storage unit for storing the one entry , Select a set of kana for each Chinese character to form a first data record and save it in the first word database.