Language recognition method and device, equipment, medium and product
By adjusting the language detection order according to the language element level of the identified object, and giving priority to the detection of languages with high language element levels, the problem of inefficient detection of mixed languages in the prior art is solved, and more efficient language recognition is achieved.
Patent Information
- Application Number
- CN202411944638.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, the efficiency of hybrid language detection is inefficient, resulting in the need to match the language library one by one when processing multilingual texts, which increases the calculation amount and time cost.
By determining the language element level of the identified object in the corresponding language, the language usage habits of the input content are determined, and the detection order of the unrecognized objects is set accordingly by setting the respective languages, and the detection of languages with high language element levels is preferred.
It improves the efficiency of mixed language recognition, reduces the calculation amount and time cost, and solves the problem of inefficient detection of mixed languages.
Smart Images

Figure CN119886160A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a language recognition method, device, equipment, medium and product. Background Art
[0002] With the development of model detection technology, the application scenarios of using models for language detection are gradually increasing. Language detection can be used in translation, chatbots, intelligent search and other fields. Improving language detection technology will have a significant driving effect on the development of many technologies.
[0003] In the prior art, language detection faces the application demand of mixed language detection. For mixed language detection, text containing multiple languages is usually input into a recognition model. The recognition model compares the fields in the text with the existing language library one by one to match the corresponding language of each field.
[0004] However, since there are many fields in the text, each time multiple fields in the text are processed, they need to be matched with the existing language library one by one, which makes the recognition process of mixed languages very inefficient and affects the processing efficiency of mixed language matching. Summary of the invention
[0005] The embodiments of the present application provide a language recognition method, apparatus, device, medium and product for improving the efficiency of mixed language recognition.
[0006] In a first aspect, an embodiment of the present application provides a language recognition method, comprising:
[0007] Determine an object to be identified in the input content;
[0008] Based on the language element levels of the recognized objects in the input content, the corresponding languages are selected in turn to perform language recognition on the objects to be recognized until a language recognition result of the objects to be recognized is obtained.
[0009] In a possible implementation, based on the language element level of the recognized object in the input content, the corresponding language is selected in sequence to perform language recognition on the object to be recognized until a language recognition result of the object to be recognized is obtained, including:
[0010] Determining a language order to be applied to language recognition based on the language element levels of the recognized objects in the input content;
[0011] Based on the language ranking used for language recognition, corresponding languages are selected in turn to perform language recognition on the object to be recognized until a language recognition result of the object to be recognized is obtained.
[0012] In a possible implementation, determining the language ranking for language recognition based on the language element levels of the recognized objects in the input content includes:
[0013] Determining an initial ordering of languages for the identified objects based on the levels of language elements of the identified objects in the input content;
[0014] Based on the initial language ranking of the recognized objects, the initial language ranking is adjusted to determine the language ranking applied to language recognition.
[0015] In a possible implementation manner, when the recognized object in the input content does not exist, after determining the object to be recognized in the input content, the method further includes:
[0016] Based on the preset language selection rules, the corresponding languages are selected in turn to perform language recognition on the object to be recognized, and the language information of the object to be recognized is determined;
[0017] The language element level of the object to be identified is determined according to the language information of the object to be identified.
[0018] In a possible implementation, based on the language element levels of the recognized objects in the input content, corresponding languages are sequentially selected to perform language recognition on the objects to be recognized until a language recognition result of the objects to be recognized is obtained, the method further includes:
[0019] If the recognized language in the language recognition result is the same as the language of the recognized object, and the language element level in the language recognition result is higher than the language element level of the recognized object, the language element level of the recognized object is updated according to the language element level in the language recognition result.
[0020] In a possible implementation, after all objects in the input content are identified, the language element level of the object is adjusted according to the occurrence frequency of the object.
[0021] In a possible implementation, the language element level is determined according to the commonness of the recognized object in the corresponding language.
[0022] In a second aspect, an embodiment of the present application provides a language recognition device, including:
[0023] A determination module, used to determine the object to be identified in the input content;
[0024] The recognition module is used to select the corresponding language in turn to perform language recognition on the object to be recognized based on the language element level of the recognized object in the input content, until the language recognition result of the object to be recognized is obtained.
[0025] In a third aspect, an embodiment of the present application provides a language recognition device, including: a memory, a processor;
[0026] Memory stores computer-executable instructions;
[0027] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0028] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0029] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0030] The embodiments of the present application provide a language recognition method, apparatus, device, medium and product. The method uses the recognized objects in the input content that have a context-dependent relationship with the unrecognized objects, the languages corresponding to the recognized objects, and the language element levels of the recognized objects in the corresponding languages to sequentially select the corresponding languages to perform language recognition on the objects to be recognized until the language recognition result of the objects to be recognized is obtained. When performing mixed language recognition, the languages of the recognized objects with higher language element levels are used as the language objects that are preferentially used in the expression habits of the input content. Therefore, when performing mixed language recognition, the recognition efficiency of the unrecognized objects in the input content can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0032] Figure 1 A schematic diagram of a scenario of a language recognition method provided in an embodiment of the present application;
[0033] Figure 2 A flow chart of a language recognition method provided in an embodiment of the present application Figure 1 ;
[0034] Figure 3 A flow chart of a language recognition method provided in an embodiment of the present application Figure 2 ;
[0035] Figure 4 A schematic diagram of the structure of a language recognition device provided in an embodiment of the present application;
[0036] Figure 5A schematic diagram of the structure of a language recognition device provided in an embodiment of the present application.
[0037] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0038] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0039] In the prior art, when identifying the language of a text content, language detection is usually performed in the order of the text, or the text is divided into several sections and the language of each word in each section is identified. Since each word must re-select the corresponding language for identification and matching, when the number of texts is large, when the number of languages that need to be identified in the text content increases, or when there are many languages stored in the existing language library, the recognition efficiency of mixed languages is low, and the calculation amount and time cost are increased.
[0040] The embodiment of the present application provides a language identification method, which determines the language usage habits of the input content by determining the language element level of the identified object in the corresponding language, and sets the detection order of each language for the unrecognized object accordingly, wherein the higher the level of the language element level, the more frequently used language the corresponding language is for the user who generates the input content, so the language can be used for detection first during detection, thereby speeding up the recognition efficiency of the object to be identified. Moreover, each word in a language is identified, and the language element level corresponding to the word is matched. If a high-level word is identified, the language recognition order corresponding to the word is advanced, thereby achieving the effect of dynamically changing the language recognition order by using the language element level, further improving the recognition efficiency of the language, and as the language of the input content is continuously identified, the recognition speed is also continuously improved, solving the problem of low efficiency in mixed language recognition.
[0041] Figure 1 A scenario diagram of a language recognition method provided in an embodiment of the present application, such as Figure 1As shown, the execution entity of this method can be a language recognition system, which can be a server. Among them, the server can be a device such as a computer, a notebook, a tablet or a mobile phone. The implementation manner of the execution entity in this embodiment is not particularly limited, as long as the execution entity can determine the object to be recognized in the input content; based on the language element levels of the recognized objects in the input content, select the corresponding languages in sequence to perform language recognition on the object to be recognized until the language recognition result of the object to be recognized is obtained.
[0042] The following uses specific embodiments to elaborate in detail on the technical solutions of this application and how the technical solutions of this application solve the above technical problems. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The following will describe the embodiments of this application with reference to the accompanying drawings.
[0043] Figure 2 It is a flowchart of a language recognition method provided by an embodiment of this application Figure 1 , as Figure 2 shown, this method includes:
[0044] S201. Determine the object to be recognized in the input content.
[0045] Among them, the input content can refer to the original text data that the user provides to the language recognition system and needs to be processed. The input content can be a sentence, a paragraph of text, or a document.
[0046] The object can refer to a character, a word, or a sentence, and the object to be recognized can refer to the part in the input content whose language needs to be judged. The object to be recognized may be a part of the input content, or the object to be recognized may also be the entire input content. Among them, the acquisition of the object to be recognized can be obtained from the first field of the input content, or from the middle field of the input content. This application does not limit the acquisition method of the object to be recognized.
[0047] For example, the user input content is: お元気ですか?how are you, I'm great. The object can refer to the word "お" in the input content, or the sentence "how are you", or the complete content of "お元気ですか?how are you, I'm great".
[0048] S202. Based on the language element levels of the recognized objects in the input content, select the corresponding languages in sequence to perform language recognition on the object to be recognized until the language recognition result of the object to be recognized is obtained.
[0049] The recognized object may refer to the part of the input content whose language has been recognized, which is used to assist in recognizing the rest of the input content. Because in a text, if there is already a recognized language, then the remaining text is likely to belong to the recognized language. Using the recognized language to verify the remaining part first is more efficient than direct recognition. The recognized object can be part of the input content or all of the input content. The recognized object can contain multiple language types or only one language type.
[0050] The language element level can refer to the hierarchical record of language elements divided according to specific rules in a specific language or corpus, which is used to improve the recognition efficiency of mixed languages by the language recognition system. Among them, the specific rules can refer to the division according to the complexity of the language, or according to the characteristics of the language. The language element level can be divided into two levels, three levels, or more than three levels. The specific number of levels is set according to demand.
[0051] In some embodiments, the level of language elements can be changed according to the usage scenario. For example, when identifying programming-related vocabulary, if the programming language input by the user is only identified based on the frequency of words in the regular vocabulary, the recognition will be inaccurate and slow, because specific programming vocabulary is not common in daily use. Therefore, dividing the language element level according to the usage scenario can also speed up the efficiency of mixed language recognition.
[0052] In this embodiment of the present application, the language element level is determined according to the commonness of the identified object in the corresponding language.
[0053] Commonness may refer to the frequency with which a certain language element appears in its corresponding language. Commonness may be divided according to a ratio, and the ratio is set according to demand. Commonness makes the level of language elements not fixed, and it can be set dynamically according to the frequency with which the language element appears in its corresponding language.
[0054] In some embodiments, the language element level is divided into three categories according to the commonness of the identified object in the corresponding language, namely high frequency, medium frequency and low frequency, corresponding to 0-7%, 7-19% and 19-100% usage in the vocabulary, respectively, which means that after the common words in the vocabulary are sorted according to the frequency of use, they can be divided into high frequency, medium frequency and low frequency, which is used to divide the entire vocabulary. Among them, each language element level corresponds to a different language, but each language can correspond to multiple language element levels.
[0055] In some embodiments, there may be the same words in the vocabulary corresponding to the language element levels in multiple languages. For example, the Chinese character "元" belongs to Chinese, Japanese, and Korean. In Chinese, "元" usually refers to the beginning, the first place, the root, and can also be used as a currency unit (such as "元" in Renminbi). In Japanese, "元" is often used to mean "starting point, origin", for example, "元気" (げんき, meaning healthy, energetic), and in some cases, "元" also means "original, former", such as "元彼" (ex-boyfriend). "元" is also used as a Chinese character in Korean, pronounced and is commonly seen in names or used in some compound words. At the same time, "元" is also the symbol of the Korean won (the currency unit of South Korea). For this situation, "元" is classified into different language element levels according to the usage frequency in different languages.
[0056] The language identification result can refer to the result obtained after the input content is identified by the language identification system. The language identification result can include multiple language types or only one language type. In the embodiments of the present application, the language identification result includes the language type of each identification object, the order in which each language is identified, the language element level corresponding to the identification object, and the proportion of each language in the input text. The order in which each language is identified can be represented by a serial number. When Japanese is identified first, the order in which Japanese is identified is 1. If French is then identified, the order in which French is identified is 2.
[0057] Among them, the proportion of each language in the input text can refer to the proportion of a specific language in the entire input content. This proportion can be obtained by calculating the proportion of the number of characters, words, or sentences of each language relative to the total amount of the entire text. The proportion of each language in the input text is updated in real time during the identification process of the input content.
[0058] Among them, in the embodiments of the present application, based on the language element levels of the identified objects in the input content, the corresponding languages are sequentially selected to perform language identification on the object to be identified until the language identification result of the object to be identified is obtained, including:
[0059] Based on the language element levels of the identified objects in the input content, determine the language sorting applied to language identification;
[0060] Based on the language sorting applied to language identification, sequentially select the corresponding languages to perform language identification on the object to be identified until the language identification result of the object to be identified is obtained.
[0061] Among them, the language sorting can refer to the priority order, which is used to guide the language recognition system to try which language first when performing language recognition, so as to improve the efficiency and accuracy of language recognition. When analyzing the parts of the input content that have been successfully recognized as a certain language, evaluate the language elements in these parts, calculate the frequencies in their respective languages, determine the language element levels, and then use the language element levels to obtain which language to try first for recognition and which language to try subsequently.
[0062] Among them, in the embodiment of the present application, based on the language element levels of the recognized objects in the input content, the language sorting applied to language recognition is determined, including:
[0063] Based on the language element levels of the recognized objects in the input content, determine the initial language sorting for the recognized objects;
[0064] Based on the initial language sorting of the recognized objects, adjust the initial language sorting to determine the language sorting applied to language recognition.
[0065] Among them, the initial language sorting can refer to the initially established language priority order, which is the languages that may exist in the input text based on the existing information. The initial language sorting can change continuously during the recognition process until the final language sorting is obtained.
[0066] Adjusting the initial language sorting can refer to the process of further optimizing the initial language sorting after establishing the initial language sorting. The reason for adjustment is that the language element levels recognized subsequently are higher than those of the recognized objects. Adjusting the initial language sorting can further accelerate the recognition rate.
[0067] In the embodiment of the present application, because the language sorting is the result obtained through dynamic update, as more objects to be recognized are recognized, the languages existing in the objects to be recognized are added to the language sorting, and the recognized existing languages are used to recognize the unrecognized objects. The possibility that the languages corresponding to the unrecognized objects are the same as the recognized existing languages is greater, which will gradually accelerate the recognition process.
[0068] For example, the input content is: お元気ですか?how are you, 我好极了. After reading the word "how", retrieve the previously recognized Japanese in order. If not detected, then detect again according to the uncalibrated language. The detection is successful for English. After saving, read the next word "are", and will detect according to the calibrated language order, detect Japanese and English in turn, and match successfully with English, without reducing the efficiency by detecting other languages.
[0069] The embodiment of the present application provides a language recognition method, which determines the language present in the input content by analyzing the known language elements in the input content, and then uses the recognized language to determine the language of the object to be recognized, and selects the recognition order according to the priority by identifying the language priority of the known language elements in the input content, so that the recognition process is accelerated due to the division of priorities. Through this step-by-step screening and dynamic adjustment mechanism, the language recognition system can more accurately recognize multilingual texts, especially when facing ambiguous words, and ultimately provide users with more intelligent and accurate language processing services.
[0070] Figure 3 A flow chart of a language recognition method provided in an embodiment of the present application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a language recognition method is described in detail. When the recognized object in the input content does not exist, after determining the object to be recognized in the input content, the method further includes:
[0071] S301 . Based on a preset language selection rule, select corresponding languages in turn to perform language recognition on an object to be recognized, and determine language information of the object to be recognized.
[0072] Among them, the preset language selection rules may refer to a pre-set language sorting table, which reflects the language sorting under a certain rule. The language selection rules can be used to quickly locate the language that may exist in the input content before any language is recognized, rather than trying to match all languages with the input content.
[0073] Selecting the corresponding language to perform language recognition on the object to be recognized in sequence may refer to sequentially comparing the selected language with the object to be recognized. For example, in the preset language selection rule, French is selected for comparison, and a word in the input content is selected to match French. If the word does not match French, another language is changed to match according to the order of the language selection rule.
[0074] S302: Determine the language element level of the object to be identified according to the language information of the object to be identified.
[0075] In the embodiments of the present application, when initially identifying the language, the descending order table of the usage frequencies of different languages in the world is used as the language selection rule. The top five in the descending order table are English, Chinese, Hindi, Spanish, and French. During the detection, the descending order table can be used first. For example, first detect with English, then with Chinese, and so on. After obtaining the language ranking of the current input content during the detection, use the language ranking for detection first. If none of the languages in the language ranking match, then use the languages in the descending order table for detection, thereby further accelerating the recognition process.
[0076] In the embodiments of the present application, based on the language element levels of the identified objects in the input content, corresponding languages are sequentially selected to perform language identification on the object to be identified. After obtaining the language identification result of the object to be identified, the method further includes:
[0077] If the identified language in the language identification result is the same as the language of the identified object, and the language element level in the language identification result is higher than the language element level of the identified object, then update the language element level of the identified object according to the language element level in the language identification result.
[0078] For example, the user inputs a text of mixed languages: "お元気ですか?how are you, 我好极了。" The system first constructs an initial language ranking based on the language element levels of the identified objects and finds that "お" belongs to the 1st-level high-frequency words in Japanese, so it is initially determined as Japanese. As "how" is read, the system fails to find a match in Japanese but successfully matches in English and updates the language ranking to Japanese and English. When the Chinese word "我" is read, the system recognizes that this is a 1st-level high-frequency word in Chinese. Since the Chinese recognition result is different from the previously identified objects (Japanese, English), the system adds a new language as Chinese. Continuing to read "好", it is again confirmed as a 1st-level high-frequency word in Chinese. At this time, because the newly recognized Chinese level is higher than the previously undefined ratio, the system updates the language element level of the identified object according to this higher language element level. The final adjusted language distribution is: {{sequence number: 1; language: Japanese; level: 1st level}, {sequence number: 2; language: English; level: 2nd level}, {sequence number: 3; language: Chinese; level: 1st level}}. If the user continues to input content, the system can first detect with Japanese and Chinese under the 1st-level arrangement. If it does not match, then detect with English under the 2nd level. In this way, the system not only accurately identifies multi-language texts but also improves the recognition efficiency.
[0079] In some embodiments, after all objects in the input content are recognized, adjust the language element levels of the objects according to the occurrence frequencies of the objects.
[0080] Among them, the occurrence frequency of an object can refer to the number of times each word appears in the user's input content this time. The statistics of the occurrence frequency can be used to improve the language element level, so that for the next recognition, the new language element level can be utilized. For users who have used the language recognition system multiple times, the possibility of using the same language and similar vocabulary is higher. In this way, the updated language element level enables the recognition ability of the system to be updated and the recognition speed to be faster.
[0081] For example, the frequency of the Chinese character "是" is 31422712, and the frequency of the Chinese character "一" is 35278860. The user inputs a sentence "你是不是一个好人?". After recognition, it is found that in this sentence, the frequency of "是" is 2, and the frequency of "一" is 1. Then after this sentence ends, the system will automatically update the frequencies, increasing "是" by 2 points to 31422714, and increasing "一" by 1 point to 35278861, thus achieving the adaptive update of word frequencies. The more times the user uses it, the more accurate the system's frequency statistics will be, and it can better classify the word list into high-frequency, medium-frequency, and low-frequency categories. The faster the recognition speed, the shorter the waiting time for the user.
[0082] At the same time, for example, the frequency of the word "how" is 10000, which is exactly at the top of the second-level word list. Then after this user interaction, the word frequency of "how" will increase by 1 point and rank in the top 7%. Then when the user inputs the word "how" again later, there is no need to wait until the second-level word library to retrieve successfully. It can be retrieved successfully when retrieving in the first-level word library, which also realizes the self-adaptation of word frequency update.
[0083] The language recognition method provided by the embodiments of this application quickly locates the language in the input content through the preset language selection rules and language element levels. The language recognition system first constructs an initial language ranking based on the language element levels of the recognized objects, and then sequentially selects the corresponding languages for recognition, updating the language ranking and language element levels. During the recognition process, the system adjusts the language element levels according to the occurrence frequencies of the words, realizing the self-adaptive update of word frequencies, thereby improving the recognition speed and accuracy. In addition, after the recognition process ends, according to the recognition of the user's input content, the frequency of each word is updated, and the language element level corresponding to the word is adjusted, so that the recognition ability of the system is updated with each recognition.
[0084] Figure 4 This is a schematic structural diagram of the language recognition device provided by the embodiments of this application, as Figure 4 shown. The language recognition device 40 provided in this embodiment includes:
[0085] A determination module 401, configured to determine the object to be recognized in the input content;
[0086] The recognition module 402 is used to select corresponding languages to perform language recognition on the object to be recognized based on the language element level of the recognized object in the input content, until a language recognition result of the object to be recognized is obtained;
[0087] In a possible implementation, the identification module 402 is further configured to:
[0088] Determining a language order to be applied to language recognition based on the language element levels of the recognized objects in the input content;
[0089] Based on the language ranking used for language recognition, corresponding languages are selected in turn to perform language recognition on the object to be recognized until a language recognition result of the object to be recognized is obtained.
[0090] In a possible implementation, the identification module 402 is further configured to:
[0091] Determining an initial ordering of languages for the identified objects based on the levels of language elements of the identified objects in the input content;
[0092] Based on the initial language ranking of the recognized objects, the initial language ranking is adjusted to determine the language ranking applied to language recognition.
[0093] In a possible implementation, the identification module 402 is further configured to:
[0094] Based on the preset language selection rules, the corresponding languages are selected in turn to perform language recognition on the object to be recognized, and the language information of the object to be recognized is determined;
[0095] The language element level of the object to be identified is determined according to the language information of the object to be identified.
[0096] In a possible implementation, the identification module 402 is further configured to:
[0097] If the recognized language in the language recognition result is the same as the language of the recognized object, and the language element level in the language recognition result is higher than the language element level of the recognized object, the language element level of the recognized object is updated according to the language element level in the language recognition result.
[0098] In a possible implementation, the identification module 402 is further configured to:
[0099] After all objects in the input content are identified, the language element level of the object is adjusted according to the frequency of occurrence of the object.
[0100] The language recognition device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0101] Figure 5 This is a schematic diagram of the structure of the language recognition device provided in the embodiment of the present application. Figure 5 As shown, the language recognition device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0102] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0103] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0104] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0105] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0106] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0107] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0108] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0109] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0110] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0111] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple 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 an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0112] 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 multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0113] In addition, each functional unit in each embodiment of the present invention 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.
[0114] If the function 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 invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. 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, etc. Various media that can store program codes.
[0115] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0116] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A language recognition method, characterized in that: include: Determine an object to be identified in the input content; Based on the language element levels of the recognized objects in the input content, corresponding languages are selected in sequence to perform language recognition on the object to be recognized, until a language recognition result of the object to be recognized is obtained.
2. The method according to claim 1, characterized in that The step of sequentially selecting corresponding languages to perform language recognition on the object to be recognized based on the language element levels of the recognized object in the input content until a language recognition result of the object to be recognized is obtained includes: Determining a language ranking for language recognition based on the language element levels of the identified objects in the input content; Based on the language ranking applied to language recognition, corresponding languages are selected in turn to perform language recognition on the object to be recognized until a language recognition result of the object to be recognized is obtained.
3. The method according to claim 2, characterized in that The step of determining the language order applied to language recognition based on the language element levels of the recognized objects in the input content includes: Determining an initial language ranking for the identified objects based on language element levels of the identified objects in the input content; Based on the initial language ranking of the recognized objects, the initial language ranking is adjusted to determine the language ranking applied to language recognition.
4. The method according to claim 1, characterized in that: When the identified object in the input content does not exist, after determining the object to be identified in the input content, the method further includes: Based on the preset language selection rules, corresponding languages are selected in turn to perform language recognition on the object to be recognized, and the language information of the object to be recognized is determined; The language element level of the object to be identified is determined according to the language information of the object to be identified.
5. The method according to any one of claims 1 to 4, characterized in that After selecting corresponding languages to perform language recognition on the object to be recognized based on the language element levels of the recognized object in the input content until a language recognition result of the object to be recognized is obtained, the method further includes: If the recognized language in the language recognition result is the same as the language of the recognized object, and the language element level in the language recognition result is higher than the language element level of the recognized object, the language element level of the recognized object is updated according to the language element level in the language recognition result.
6. The method according to any one of claims 1 to 4, characterized in that After all objects in the input content are identified, the language element level of the object is adjusted according to the occurrence frequency of the object.
7. The method according to any one of claims 1 to 4, characterized in that The language element level is determined according to the commonness of the recognized object in the corresponding language.
8. A language recognition device, characterized in that: include: A determination module, used to determine the object to be identified in the input content; The recognition module is used to select corresponding languages in turn to perform language recognition on the object to be recognized based on the language element level of the recognized object in the input content, until a language recognition result of the object to be recognized is obtained.
9. A language recognition device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Patent Citations
Real-time translation system for automatically identifying multinational languages and method thereof
CN101770456A
Language identification method
CN112016308A
Language determination method and device, electronic equipment and storage medium
CN113380224A
Language identification method and device
CN113688625A
Method and device for identifying fonts and languages and storage medium
CN115526168A