CN108108356B - Character translation method, device and equipment - Google Patents

Character translation method, device and equipment Download PDF

Info

Publication number
CN108108356B
CN108108356B CN201611053134.5A CN201611053134A CN108108356B CN 108108356 B CN108108356 B CN 108108356B CN 201611053134 A CN201611053134 A CN 201611053134A CN 108108356 B CN108108356 B CN 108108356B
Authority
CN
China
Prior art keywords
language type
character string
user
content
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611053134.5A
Other languages
Chinese (zh)
Other versions
CN108108356A (en
Inventor
涂畅
张扬
王砚峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201611053134.5A priority Critical patent/CN108108356B/en
Publication of CN108108356A publication Critical patent/CN108108356A/en
Application granted granted Critical
Publication of CN108108356B publication Critical patent/CN108108356B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

The invention relates to the field of computers, and discloses a character translation method, a character translation device and character translation equipment, which are used for solving the technical problem that the translation effect of content translation in the prior art is poor. The method comprises the following steps: when the page contains the content of the first language type, determining the recognition range of a user of the electronic equipment for the character string of the first language type; determining the content to be prompted in the page based on the identification range; and providing a translation result of a second language type aiming at the content to be prompted. The technical effect of improving the translation effect of the character string of the first language type is achieved.

Description

Character translation method, device and equipment
Technical Field
The invention relates to the field of computers, in particular to a method, a device and equipment for translating characters.
Background
With the continuous development of scientific technology, electronic technology has also been developed rapidly, and the variety of electronic products is increasing. For example, electronic devices such as a notebook computer, a desktop computer, a smart phone, and a tablet computer have become an important part in life of people, and a user can use the electronic devices such as the mobile phone and the tablet computer to perform activities such as office work and entertainment anytime and anywhere, and enjoy convenience brought by scientific and technological development.
Typically, the electronic device is capable of providing functions to translate pages, such as: in the prior art, when a page is translated, the whole page is often translated, or a user selects a part of the page to translate, and due to the fact that the translation level of a translation machine is poor, the translation effect is poor, and therefore the reading experience of the user is poor.
Disclosure of Invention
The invention provides a character translation method, a device and equipment, which are used for solving the technical problem of poor translation effect of translating contents in the prior art.
In a first aspect, an embodiment of the present invention provides a text translation method, including:
when the page contains the content of the first language type, determining the recognition range of a user of the electronic equipment for the character string of the first language type;
determining the content to be prompted in the page based on the identification range;
and providing a translation result of a second language type aiming at the content to be prompted.
With reference to the first aspect, in a first optional embodiment, the providing a translation result of a second language type for the content to be prompted includes:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
With reference to the first aspect or the first optional embodiment of the first aspect, in a second optional embodiment, the method further comprises:
determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which cannot be identified by the user and are presumed in the first language type, and the second database comprises character strings which can be identified by the user and are presumed in the first language type;
the determining the content to be prompted in the page based on the identification range includes:
matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
With reference to the second optional embodiment of the first aspect, in a third optional embodiment, the method further comprises:
providing at least two recognition levels for the first language type to the user; determining the recognition level of the user for the first language type based on the selection operation of the user; determining a character string which can be recognized by the user in the first language type according to the recognition level; and/or the presence of a gas in the gas,
providing the character string of the first language type for the user to recognize, and determining the character string which can be recognized by the user and is presumed in the first language type based on the recognition result; and/or the presence of a gas in the gas,
determining a character string which can be recognized by the user in the first language type based on the historical operation record of the user for the character string of the first language type;
and establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type.
With reference to the first aspect or the first optional embodiment of the first aspect, in a fourth optional embodiment, after providing a translation result of the second language type for the content to be prompted, the method further includes:
receiving a first preset operation aiming at a first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the gas,
receiving a second preset operation aiming at a second character string; and responding to the second preset operation, and determining the second character string as a character string which can be recognized by the user.
With reference to the fourth optional embodiment of the first aspect, in a fifth optional embodiment, after the determining the first character string as a character string that cannot be recognized by the user, the method further includes:
providing translation results for the second language type for the first string; and/or the presence of a gas in the gas,
and adding the first character string into the first database.
With reference to the fourth optional embodiment of the first aspect, in a sixth optional embodiment, after the determining the second character string as the character string recognizable by the user, the method further includes:
deleting the translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And adding the second character string into the second database.
With reference to the first aspect or the first optional embodiment of the first aspect, in a seventh optional embodiment, the method further comprises:
judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
if the proportion is larger than the first preset proportion, translating the content of the first language type according to the syntactic structure of the second language type to obtain a translation result;
and if the proportion is not larger than the first preset proportion, respectively translating each character string in the content of the first language type to obtain the translation result.
In a second aspect, an embodiment of the present invention provides a character translation apparatus, including:
the electronic equipment comprises a first determining module, a second determining module and a display module, wherein the first determining module is used for determining the recognition range of a user of the electronic equipment for a character string of a first language type when the page contains the content of the first language type;
the second determining module is used for determining the content to be prompted in the page based on the identification range;
and the first providing module is used for providing a translation result of a second language type aiming at the content to be prompted.
With reference to the second aspect, in a first optional embodiment, the first providing module is configured to:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
With reference to the second aspect or the first optional embodiment of the second aspect, in a second optional embodiment, the first determining module is configured to: determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which cannot be identified by the user and are presumed in the first language type, and the second database comprises character strings which can be identified by the user and are presumed in the first language type;
the second determining module is configured to: matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
In combination with the second optional embodiment of the second aspect, in a third optional embodiment, the apparatus further comprises:
a second providing module for providing at least two recognition levels for the first language type to the user; determining the recognition level of the user for the first language type based on the selection operation of the user; determining a character string which can be recognized by the user in the first language type according to the recognition level; and/or the presence of a gas in the gas,
a third providing module, configured to provide the character string of the first language type to the user for recognition, and determine, based on a recognition result, a character string that can be recognized by the user and is presumed in the first language type; and/or the presence of a gas in the gas,
a third determining module, configured to determine, based on a historical operation record of the user for the character string of the first language type, a character string that can be recognized by the user in the first language type by inference;
and the establishing module is used for establishing the first database or the second database based on the character string which can be identified by the user and is presumed in the first language type.
With reference to the second aspect or the first optional embodiment of the second aspect, in a fourth optional embodiment, the apparatus further includes:
the fourth determining module is used for receiving a first preset operation aiming at the first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the gas,
a fifth determining module, configured to receive a second preset operation for a second character string; and responding to the second preset operation, and determining the second character string as a character string which can be recognized by the user.
In combination with the fourth alternative embodiment of the second aspect, in a fifth alternative embodiment, the apparatus further comprises:
a fourth providing module for providing a translation result of the second language type for the first character string; and/or the presence of a gas in the gas,
and the first adding module is used for adding the first character string into the first database.
In combination with the fourth alternative embodiment of the second aspect, in a sixth alternative embodiment, the apparatus further comprises:
a deletion module configured to delete a translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And the second adding module is used for adding the second character string into the second database.
With reference to the second aspect or the first alternative embodiment of the second aspect, in a seventh alternative embodiment, the apparatus further includes:
the judging module is used for judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
the first translation module is used for translating the content of the first language type according to the syntactic structure of the second language type to obtain the translation result if the proportion is larger than the first preset proportion;
and the second translation module is used for translating each character string in the content of the first language type respectively to obtain the translation result if the proportion is not greater than the first preset proportion.
In a third aspect, an apparatus comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors comprises instructions for:
when the page contains the content of the first language type, determining the recognition range of a user of equipment for the character string of the first language type;
determining the content to be prompted in the page based on the identification range;
and providing a translation result of a second language type aiming at the content to be prompted.
In combination with the third aspect, in one optional embodiment, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
In combination with the third aspect or the first optional embodiment of the third aspect, in another optional embodiment, the apparatus is further configured to execute, by the one or more processors, the one or more programs including instructions for:
determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which cannot be identified by the user and are presumed in the first language type, and the second database comprises character strings which can be identified by the user and are presumed in the first language type;
the determining the content to be prompted in the page based on the identification range includes:
matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
In combination with the second optional embodiment of the third aspect, in another optional embodiment, the apparatus is further configured to execute the one or more programs by the one or more processors includes instructions for:
providing at least two recognition levels for the first language type to the user; determining the recognition level of the user for the first language type based on the selection operation of the user; determining a character string which can be recognized by the user in the first language type according to the recognition level; and/or the presence of a gas in the gas,
providing the character string of the first language type for the user to recognize, and determining the character string which can be recognized by the user and is presumed in the first language type based on the recognition result; and/or the presence of a gas in the gas,
determining a character string which can be recognized by the user in the first language type based on the historical operation record of the user for the character string of the first language type;
and establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type.
In combination with the third aspect or the first optional embodiment of the third aspect, in another optional embodiment, the apparatus is further configured to execute the one or more programs by the one or more processors including instructions for:
receiving a first preset operation aiming at a first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the gas,
receiving a second preset operation aiming at a second character string; and responding to the second preset operation, and determining the second character string as a character string which can be recognized by the user.
In combination with the fourth optional embodiment of the third aspect, in a fifth optional embodiment, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
providing translation results for the first string in the second language type; and/or the presence of a gas in the gas,
and adding the first character string into the first database.
In combination with the fourth optional embodiment of the third aspect, in another optional embodiment, the apparatus is further configured to execute the one or more programs by the one or more processors includes instructions for:
deleting the translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And adding the second character string into the second database.
In combination with the third aspect or the first optional embodiment of the third aspect, in another optional embodiment, the apparatus is further configured to execute the one or more programs by the one or more processors including instructions for:
judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
if the proportion is larger than the first preset proportion, translating the content of the first language type according to the syntactic structure of the second language type to obtain a translation result;
and if the proportion is not larger than the first preset proportion, respectively translating each character string in the content of the first language type to obtain the translation result.
The invention has the following beneficial effects:
in the embodiment of the invention, when the page contains the content of the first language type, the identification range of the user of the electronic equipment for the character string of the first language type is determined; determining the content to be prompted in the page based on the identification range; and providing a translation result of a second language type aiming at the content to be prompted. That is to say, only the translation result is provided for the content to be prompted corresponding to the recognition range of the user, but not for the whole page, so that on one hand, the inaccuracy of the translation result caused by the poor translation level of the translation machine can be prevented, and on the other hand, the accuracy of the translation range can be ensured as the provided translation result is determined based on the recognition range of the user, so that the technical effect of improving the translation effect of the character string of the first language type is achieved, and the reading experience of the user is improved.
Drawings
FIG. 1 is a flow chart of a text translation method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a text translation apparatus according to an embodiment of the present invention;
FIG. 3 is a block diagram of an electronic device implementing a text translation method in an embodiment of the present invention;
fig. 4 is a structural diagram of a server for implementing the text translation method in the embodiment of the present invention.
Detailed Description
The invention provides a character translation method, a device and equipment, which are used for solving the technical problem of poor translation effect of translating contents in the prior art.
In order to solve the technical problems, the general idea of the embodiment of the present application is as follows:
when the page contains the content of the first language type, determining the recognition range of a user of the electronic equipment for the character string of the first language type; determining the content to be prompted in the page based on the identification range; and providing a translation result of a second language type aiming at the content to be prompted. That is to say, only the translation result is provided for the content to be prompted corresponding to the recognition range of the user, but not for the whole page, so that on one hand, the inaccuracy of the translation result caused by the poor translation level of the translation machine can be prevented, and on the other hand, the accuracy of the translation range can be ensured as the provided translation result is determined based on the recognition range of the user, so that the technical effect of improving the translation effect of the character string of the first language type is achieved, and the reading experience of the user is improved. In order to better understand the technical solutions of the present invention, the following detailed descriptions of the technical solutions of the present invention are provided with the accompanying drawings and the specific embodiments, and it should be understood that the specific features in the embodiments and the examples of the present invention are the detailed descriptions of the technical solutions of the present invention, and are not limitations of the technical solutions of the present invention, and the technical features in the embodiments and the examples of the present invention may be combined with each other without conflict.
In a first aspect, an embodiment of the present invention provides a method for translating a word, please refer to fig. 1, including:
step S101: when the page contains the content of the first language type, determining the recognition range of a user of the electronic equipment for the character string of the first language type;
step S102: determining the content to be prompted in the page based on the identification range;
step S103: and providing a translation result of a second language type aiming at the content to be prompted.
For example, the scheme may be applied to an electronic device with a translation function, for example: mobile phones, tablet computers, notebook computers, all-in-one machines, PCs (Personal computers), and the like; the solution can also be applied to servers, for example: when the server provides a page (for example, webpage content) for a user, if the content of the first language type is determined to be contained in the page, the translation result of the second language type can be obtained based on the scheme, and can be provided for the user.
In step S101, the page is, for example: text, web pages, and the like. The first language type is, for example, english, korean, japanese, etc., which may include only one language type, or may include multiple language types, which may be set by the user, or the system may detect a common language type of the user of the electronic device, and may determine that all other language types except the common language type are the first language type; still alternatively, the system may detect historical translation behavior of a user of the electronic device, and determine the first language type based on the historical translation behavior, such as: if there may be translation behaviors in the english translation and the legal translation in the historical translation behaviors of the user, it may be determined that the first language type includes: english, french, etc., wherein the first language type in the historical translation behavior may comprise a language type commonly used by the user, such as: the user common language type is chinese, but the user may not recognize the uncommon word, and the translation result may also be provided for the uncommon word in chinese, of course, the first language type may also include other language types besides the user common language type, and the embodiment of the present invention is not limited.
The second language type may also be one or more language types, which may be the same as the first language type, for example: for uncommon words in the first language type, which may not be known by the user, in which case the uncommon words in the first language type may be replaced by synonyms or synonyms, in which case the second language type is the same as the first language type; the second language type may also be different from the first language type, for example: the common language type of the user is Chinese, the page contains English content, and the English content can be translated into Chinese content.
In addition, in the specific implementation process, in step S101, when it is detected that the content of the first language type exists in the page, a translation mechanism for the content of the first language type may be triggered; the translation mechanism for content in the first language type may also be triggered based on a user trigger, such as: the user opens a certain page (for example, text or a webpage, etc.) to trigger the intelligent translation function of the page, and then enters an entry for translating the content of the first language type into one or more languages, and the electronic device obtains the content of the first language type through the entry and performs subsequent translation operation on the content.
The character string in the embodiment of the present invention refers to a basic unit of a language type, for example: if the first language type is Chinese, its character string refers to Chinese characters, if the first language type is English, its character string refers to words, and so on.
Wherein, the recognition scope of the user of the electronic device for the character string of the first language type can be selected by the user instantly, for example: the recognition level of the character string of the first language type may be provided, and the recognition level may be selected by the user on the basis of the recognition degree of the character of the first language type by the user, and the recognition range of the character string of the first language type by the user is determined by the recognition level, for example: for each recognition level, a corresponding character string (a character string that can be recognized by the user at the recognition level, a character string that cannot be recognized by the user at the recognition level, or the like) may be set, and after the user selects the recognition level, the character string corresponding to the recognition level is directly acquired, and the recognition range of the user is determined based on the character string corresponding to the recognition level.
The recognition range of the user for the character string of the first language type may also be set in advance, for example: a first database or a second database may be preset, and an identification range of a user for a character string of a first language type is determined based on the first database or the second database, where, for example, the first database includes a character string that is presumed to be unrecognizable by the user in the first language type, and the identification range of the user is a character string other than the character string included in the first database; the second database contains, for example, a character string which is presumed to be recognizable by the user in the first language type, and the recognition range of the user is the character string contained in the first database, and the character which is presumed to be unrecognizable by the user may be a character which cannot be recognized by the user and may also be a character which is presumed to be ambiguous and cannot be recognized by the user in a specific scene; the characters that the user can recognize may be characters that the user can recognize at all, or may be characters that the user can recognize in a specific scene.
In a specific implementation, the character strings that can be recognized by the presumed user may be determined, and then the second database may be established based on the character strings that can be recognized by the presumed user. In this case, the character string recognizable by the presumed user may be directly added to the second database. In the specific implementation process, the character strings that can be recognized by the presumed user may be removed from the character strings included in the first language type, and the character strings that cannot be recognized by the presumed user may be obtained and added to the first database.
In the implementation process, the character string that can be recognized by the inferred user can be determined in various ways, and three of them are listed below for description, but of course, in the implementation process, the determination is not limited to the following three cases.
First, providing at least two recognition levels for the first language type to the user; determining the recognition level of the user for the first language type based on the selection operation of the user; and determining character strings which can be recognized by the user in the first language type according to the recognition level.
For example, three levels of a primary level, a middle level and a high level (of course, other levels are also possible) may be set, a character string included therein (which may be presumed as a character string that can be recognized by a user at the recognition level or a character string that cannot be recognized by a user at the recognition level) may be set for each level, and then the three levels of the primary level, the middle level and the high level are provided to the user, and the user selects the recognition level of the character string for the first language type; after receiving a selection operation by a user, character strings included in a recognition level corresponding to the selection operation are acquired, and the character strings are determined as character strings that can be recognized by a presumed user.
According to the scheme, the character string which can be identified by the user can be determined and presumed based on simple operation of the user, so that the efficiency of determining the character string which can be identified by the user is improved.
Secondly, the character strings of the first language type are provided for the user to be recognized, and the character strings which can be recognized by the user in the first language type are determined based on the recognition result.
For example, a character string of the first language type may be provided to a user for recognition, and the character string that can be recognized by the user may be marked, so as to determine a character string that can be recognized by the presumed user; alternatively, a character string that cannot be recognized by the user is marked, and a character string that cannot be recognized by the user is removed from all character strings, and a character string that can be recognized by the presumed user is obtained. In the scheme, all character strings of the first language type can be provided for a user to identify; the character string of the first language type may also be divided into a plurality of recognition levels, and then a part of the character string is provided from each recognition level for the user to recognize, if the user can recognize a character string of a certain recognition level that is greater than a preset ratio (for example, 80%, 90%, etc.), all the character strings included in the recognition level are used as characters that the user is presumed to recognize, and of course, the character string of the first language type may also be provided to the user to recognize in other ways, which is not limited in the embodiment of the present invention.
In the above, the character string that can be recognized by the presumed user is determined from the recognition result of the character string of the first language type by the user, so that the determined character string that can be recognized by the user is more accurate.
Thirdly, based on the historical operation records of the user for the character strings of the first language type, the character strings which can be recognized by the user are determined in the first language type.
For example, the historical operation record is, for example: history translation records, history mark records and the like, and when the page provides the content of the first language type, the page can provide some operation entries for the content of the first language type, such as: an operation entry for translating a character string therein, an operation entry for marking a character string therein, and the like, wherein for a certain character string, if a user does not know the meaning of the character string, the character string may be translated through the translation operation entry, and in this case, the character string may be determined as a character string which cannot be recognized by the user; alternatively, if the user does not know the meaning of a certain character string, the user may mark the certain character string as an original word by directly using the operation entry for marking, and in this case, the certain character string may be determined as a character string that the user cannot recognize. After the character string that cannot be recognized by the user is determined, the character string that cannot be recognized by the user may be removed from all the character strings included in the first language type, and the character string that can be recognized by the presumed user may be determined.
In the scheme, the character string which cannot be identified by the user can be determined without extra operation of the user, so that the determination mode is more convenient and faster.
In step S102, determining the content to be prompted in the page based on the identification range includes, for example: and determining the content which cannot be identified by the user or the content which needs to be reminded of the attention of the user in the page based on the identification range, wherein the content which cannot be identified by the user or the content which needs to be reminded of the attention of the user is presumed to be the content which needs to be reminded.
For example, the content outside the identification range of the user can be obtained from the character string of the first language type included in the page as the content to be prompted. Based on the scheme, the translation result can be provided for the content which cannot be identified by the user.
In another optional embodiment, the content needing to be memorized by the user with emphasis can be determined based on the recognition range, and the content needing to be memorized with emphasis is the content needing to be prompted. In step S102, the content of the first language type may be directly matched with the database that needs to be memorized with emphasis, so as to obtain the content that needs to be memorized with emphasis and/or the character string that may not be recognized as the content that needs to be prompted, so as to deepen the user' S grasp of the content that needs to be memorized with emphasis.
As an optional embodiment, the determining content to be prompted in the page based on the identification range includes: matching the page content contained in the page with the character strings in the first database or the first character library, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
For example, it may be determined whether each character string in the content of the first language type included in the page is located in the second database, and if not, it is determined that the corresponding character string is the content to be prompted; or judging whether each character string in the content of the first language type contained in the page is located in the first database, and if so, determining that the corresponding character string is the content to be prompted.
In step S103, the translation result may be provided to the user in various ways, and two of them are listed below for introduction, and of course, in the specific implementation process, the following two cases are not limited.
First, the providing a translation result of a second language type for the content to be prompted includes: and displaying the content to be prompted and correspondingly displaying the translation result of the second language type.
For example, for each string in the content to be prompted, the translation result of its corresponding second language type may be displayed at the top, side, or bottom thereof, for example: the character string of the first language type is "cooperate", the translation result corresponding to the second language type may be a partial chinese translation result, such as "cooperation", or the entire chinese translation result of the character string, or an english comment, or the entire or partial translation result of multiple languages, such as chinese and korean, etc., for example, a specific translation result may be marked by a bracket or a small word beside the cooperate, so as to display the character string of the first language type in comparison with the translation result of the second language type, which not only enables the user to conveniently know the content of the first language type, but also enables the user to learn in comparison. Still alternatively, in a specific implementation process, only a prompt message (e.g., a translation icon, a font highlight, a button, etc.) may be given for each translation result of the second language type, the user may trigger the prompt message if the corresponding translation result needs to be displayed, and the electronic device may give the corresponding translation result after detecting that the user triggers the prompt message. Prompt information can be given for each translation result of the second language type, a translation list can be provided for a user to select after the prompt information is triggered, for example, a list of options of characters such as Chinese, japanese, korean, and a few names can be provided, and translation of corresponding characters can be provided after the user triggers one or more options.
Secondly, providing a translation result of a second language type for the content to be prompted includes: and replacing the content to be prompted in the page with the translation result of the second language type.
For example, if the character string of the first language type is "Cooperate" and corresponds to the translation result of the second language type, for example, "Cooperate", the "Cooperate" may be replaced by "Cooperate" in the position of the original character string "Cooperate" in the page, so that the display space of the display unit of the electronic device may be saved.
As an alternative embodiment, the method further comprises: judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not; if the proportion is larger than the first preset proportion, translating the content of the first language type according to the syntactic structure of the second language type to obtain a translation result; if the ratio is not greater than the first preset ratio, translating each character string of the content needing to be prompted in the content of the first language type respectively, or translating the same character string of the content needing to be prompted in the content of the first language type only once, for example, giving a translation prompt or giving a translation when the first language occurs, and the like, to obtain the translation result.
For example, the number of the character strings included in the content to be prompted and the total number of the character strings of the first language type included in the page may be counted, and then the proportion of the content to be prompted may be determined by dividing the number of the character strings included in the content to be prompted by the total number of the character strings; the first preset ratio is, for example: 30%, 40%, etc. If the proportion of the content to be prompted is smaller than a first preset proportion, it indicates that the user can roughly understand the character strings of the first language type in the page, and only a small number of character strings cannot understand the character strings, under this condition, a translation result can be provided for each character string of the content to be prompted in the content of the first language type, or the same character string of the content to be prompted in the content of the first language type can be translated only once to assist the user in identifying; if the proportion of the content to be prompted is greater than the first preset proportion, it indicates that most of the character strings of the first language type in the page are not understood by the user, and if translation is completely performed on each character string, the translation result of a single character string is not easy to be understood by the user due to the fact that the grammatical structure of the second language type may not be the same as the grammatical structure of the first language type, and under the condition, the content of the first language type in the page is translated integrally according to the grammatical structure of the second language type. In the scheme, the translation modes for translating the character strings in the first language type are different based on different numbers of the character strings in the first language type in the page, so that the method has more pertinence and is more convenient for a user to master the content of the character strings in the first language type.
Of course, in a specific implementation process, if the proportion of the content to be prompted in the content of the first language type is not greater than the first preset proportion, for each character string of the content to be prompted in the content of the first language type, translation results of a plurality of character strings associated with the character string may also be provided, for example: the translation phrase, the translation sentence and the like, or the same character string phrase or sentence aiming at the content needing prompting in the content of the first language type can be translated only once.
As an alternative embodiment, the method further comprises: judging whether the proportion of the content to be prompted in the content of the first language type is smaller than a second preset proportion or not; if the translation result is smaller than the second preset proportion, the translation result is not provided; and if the translation result is not smaller than the second preset proportion, executing the step of providing the translation result.
For example, the method for determining the proportion of the content to be prompted in the content of the first language type is not described herein again because the description is given above. The second preset ratio is, for example: 5%, 10%, and the like, if the proportion of the content needing to be prompted is smaller than the second preset proportion, it indicates that the user can often accurately acquire the content of the first language type, and therefore translation is not needed for the content, so as to reduce the processing load of the device; if the content is required to be prompted to occupy a ratio greater than the second preset ratio, it is indicated that the user often cannot accurately acquire the content of the first language type, and therefore translation is required to be performed on the content to assist the user in mastering the content.
In the specific implementation process, some operations may also be performed on the content in the page, for example:
(1) Receiving a first preset operation aiming at a first character string; and responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user.
For example, the first character string is a character string included in the content of the first language type, and the first predetermined operation is, for example: a selection operation, a click operation, a translation operation, etc., and if the first preset operation is detected, it indicates that the user may not recognize the first character string.
Further, after the first character string is determined to be the character string which cannot be recognized by the user, correlation processing may be performed on the first character string, for example: (1) providing translation results for the second language type for the first string; (2) by adding the first character string to the first database, it is possible to update the character string included in the first database, which is supposed to be unrecognizable by the user, based on the user's operation. Further, the number of times of providing the translation result for each character string can be counted, and if the number reaches a preset number (for example: 5, 10, etc.), the number can be deleted from the first database; or, if the difference between the time of generating the translation result for a certain character string last time and the current time is smaller than the preset time difference (for example, 1 hour, 1 day, etc.), the translation result corresponding to the character string may be deleted when the translation result is provided.
(2) Receiving a second preset operation aiming at a second character string; and responding to the second preset operation, and determining the second character string as a character string which can be recognized by the user.
For example, the second character string may be a character string of the first language type in which the translation result exists, or may be a translation result for a character string of the first language type, and the second preset operation may be, for example: a delete operation, a scribe operation, etc., if the second preset operation is detected, it is determined that the user may be able to recognize the second character string.
Further, after the second character string is determined as the character string that can be recognized by the user, some related processing may be performed on the second character string, for example: (1) deleting the translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; (2) by adding the second character string to the second database, it is possible to update the character string included in the second database, which is recognizable by the presumed user, based on the user operation. Further, in the implementation process, the last time of the second character string appearing in the page may be counted, and it is determined whether the difference between the last time of the second character string and the current time is greater than a preset time difference (e.g., 1 day, 1 week, etc.), if so, the user may forget the meaning of the second character string, in which case, the second character string may be deleted from the second database.
In a second aspect, based on the same inventive concept, a text translation apparatus, please refer to fig. 2, includes:
the first determining module 20 is configured to determine, when a page includes content of a first language type, a recognition range of a user of the electronic device for a character string of the first language type;
a second determining module 21, configured to determine, based on the identification range, content to be prompted in the page;
the first providing module 22 is configured to provide a translation result of the second language type for the content to be prompted.
Optionally, the first providing module 22 is configured to:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
Optionally, the first determining module 20 is configured to: determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which cannot be identified by the user and are presumed in the first language type, and the second database comprises character strings which can be identified by the user and are presumed in the first language type;
the second determining module 21 is configured to: matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
Optionally, the apparatus further comprises:
a second providing module for providing at least two recognition levels for the first language type to the user; determining the recognition level of the user for the first language type based on the selection operation of the user; determining a character string which can be recognized by the user in the first language type according to the recognition level; and/or the presence of a gas in the atmosphere,
a third providing module, configured to provide the character string of the first language type to the user for recognition, and determine, based on a recognition result, a character string that can be recognized by the user and is presumed in the first language type; and/or the presence of a gas in the gas,
a third determining module, configured to determine, based on a historical operation record of the user for the character string of the first language type, a character string that can be recognized by the user in the first language type by inference;
and the establishing module is used for establishing the first database or the second database based on the character string which can be identified by the user and is presumed in the first language type.
Optionally, the apparatus further comprises:
the fourth determining module is used for receiving a first preset operation aiming at the first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the atmosphere,
a fifth determining module, configured to receive a second preset operation for the second character string; and responding to the second preset operation, and determining the second character string as a character string which can be recognized by the user.
Optionally, the apparatus further comprises:
a fourth providing module for providing a translation result of the second language type for the first character string; and/or the presence of a gas in the atmosphere,
and the first adding module is used for adding the first character string into the first database.
Optionally, the apparatus further comprises:
a deletion module configured to delete a translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And the second adding module is used for adding the second character string into the second database.
Optionally, the apparatus further comprises:
the judging module is used for judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
the first translation module is used for translating the content of the first language type according to the syntactic structure of the second language type to obtain the translation result if the proportion is larger than the first preset proportion;
and the second translation module is used for translating each character string in the content of the first language type respectively to obtain the translation result if the proportion is not greater than the first preset proportion.
Since the apparatus introduced in the second aspect of the present invention is an apparatus for implementing the text translation method introduced in the first aspect of the present invention, based on the text translation method introduced in the first aspect of the present invention, a person skilled in the art can understand the specific structure and the variations of the apparatus introduced in the second aspect of the present invention, and thus details are not described here, and all the apparatuses for implementing the text translation method introduced in the first aspect of the present invention belong to the scope to be protected by the embodiments of the present invention.
In a third aspect, based on the same inventive concept, an embodiment of the present invention provides an apparatus, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by the one or more processors, the one or more programs including instructions for:
when the page contains the content of the first language type, determining the recognition range of a user of equipment for the character string of the first language type;
determining the content to be prompted in the page based on the identification range;
and providing a translation result of a second language type aiming at the content to be prompted.
For example, the device is an electronic device located at a client, or a server, and the embodiments of the present invention are not limited thereto.
Optionally, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
Optionally, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which cannot be identified by the user and are presumed in the first language type, and the second database comprises character strings which can be identified by the user and are presumed in the first language type;
the determining the content to be prompted in the page based on the identification range includes:
matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
Optionally, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
providing at least two recognition levels for the first language type to the user; determining the recognition level of the user for the first language type based on the selection operation of the user; determining a character string which is presumed to be recognized by the user in the first language type based on the recognition level; and/or the presence of a gas in the gas,
providing the character string of the first language type for the user to recognize, and determining the character string which can be recognized by the user and is presumed in the first language type based on the recognition result; and/or the presence of a gas in the gas,
determining a character string which can be recognized by the user in the first language type based on the historical operation record of the user for the character string of the first language type;
and establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type.
Optionally, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
receiving a first preset operation aiming at a first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the gas,
receiving a second preset operation aiming at a second character string; and responding to the second preset operation, and determining the second character string as a character string which can be recognized by the user.
Optionally, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
providing translation results for the second language type for the first string; and/or the presence of a gas in the gas,
and adding the first character string into the first database.
Optionally, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
deleting the translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And adding the second character string into the second database.
Optionally, the apparatus is also configured to execute the one or more programs by the one or more processors including instructions for:
judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
if the proportion is larger than the first preset proportion, translating the content of the first language type according to the syntactic structure of the second language type to obtain a translation result;
and if the proportion is not larger than the first preset proportion, respectively translating each character string in the content of the first language type to obtain the translation result.
Since the apparatus described in the third aspect of the present invention is an apparatus used for implementing the text translation method described in the first aspect of the present invention, based on the text translation method described in the first aspect of the present invention, a person skilled in the art can understand the specific structure and the modification of the apparatus described in the third aspect of the present invention, and therefore will not be described herein again, and all the apparatuses used for implementing the text translation method described in the first aspect of the present invention belong to the scope of the present invention to be protected.
FIG. 3 is a block diagram of an electronic device 800 illustrating a method of text translation, according to an example embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, 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 or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 can also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of word translation, the method comprising:
when the page contains the content of the first language type, determining the recognition range of a user of the electronic equipment for the character string of the first language type;
determining the content to be prompted in the page based on the identification range;
and providing a translation result of a second language type aiming at the content to be prompted.
Fig. 4 is a schematic structural diagram of a server in an embodiment of the present invention. The server 1900 may vary widely by configuration or performance and may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of a server, enable the server to perform a method of word translation, the method comprising:
when the page contains the content of the first language type, determining the recognition range of a user of the electronic equipment for the character string of the first language type;
determining the content to be prompted in the page based on the identification range;
and providing a translation result of a second language type aiming at the content to be prompted.
One or more embodiments of the invention have at least the following beneficial effects:
in the embodiment of the invention, when the page contains the content of the first language type, the identification range of the user of the electronic equipment for the character string of the first language type is determined; determining the content to be prompted in the page based on the identification range; and providing a translation result of a second language type aiming at the content to be prompted. That is to say, only the translation result is provided for the content to be prompted corresponding to the recognition range of the user, but not for the whole page, so that on one hand, the inaccuracy of the translation result caused by the poor translation level of the translation machine can be prevented, and on the other hand, the accuracy of the translation range can be ensured as the provided translation result is determined based on the recognition range of the user, so that the technical effect of improving the translation effect of the character string of the first language type is achieved, and the reading experience of the user is improved. As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (22)

1. A method of translating words, comprising:
when the page contains the content of the first language type, triggering a content translation mechanism of the first language type, and entering an entrance for translating the content of the first language type into one or more language types;
acquiring the content of the first language type through the entrance and determining the recognition range of the user of the electronic equipment for the character string of the first language type, wherein the recognition range comprises the following steps: determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which are presumed in the first language type and cannot be identified by the user, and the second database comprises character strings which are presumed in the first language type and can be identified by the user, and the establishing process of the first database or the second database comprises the following steps: determining a character string which is presumed to be recognizable by a user in a first language type based on the recognition level of the user for the characters of the first language type, wherein the character string which can be recognized by the user under the recognition level or the character string which cannot be recognized by the user under the recognition level is set for each recognition level; establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type;
determining the content to be prompted in the page based on the identification range;
providing a translation result of a second language type aiming at the content to be prompted;
receiving a first preset operation aiming at a first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the atmosphere,
receiving a second preset operation aiming at a second character string; responding to the second preset operation, and determining the second character string as a character string which can be identified by the user;
wherein the second language type is one or more language types, and the second language type is the same as or different from the first language type; when the second language type is the same as the first language type, the translation result of the second language type is a synonym or synonym of the character string of the first language type.
2. The method of claim 1, wherein providing translation results in a second language type for the content to be prompted comprises:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
3. The method of claim 1 or 2, wherein the method further comprises:
the determining of the content to be prompted in the page based on the identification range includes:
matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
4. The method of claim 3, wherein the method further comprises:
providing the character string of the first language type for the user to recognize, and determining the character string which can be recognized by the user and is presumed in the first language type based on the recognition result; and/or the presence of a gas in the gas,
determining a character string which can be recognized by the user in the first language type based on the historical operation record of the user for the character string of the first language type;
and establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type.
5. The method of claim 1, wherein after the determining the first string as presumably unrecognized by the user, the method further comprises:
providing translation results for the second language type for the first string; and/or the presence of a gas in the gas,
and adding the first character string into a first database.
6. The method of claim 1, wherein after the determining the second character string as the presumed character string recognizable by the user, the method further comprises:
deleting the translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And adding the second character string into a second database.
7. The method of claim 1 or 2, wherein the method further comprises:
judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
if the proportion is larger than the first preset proportion, translating the content of the first language type according to the syntactic structure of the second language type to obtain a translation result;
and if the proportion is not larger than the first preset proportion, respectively translating each character string in the content of the first language type to obtain the translation result.
8. A character translation apparatus comprising:
the first determining module is used for triggering a content translation mechanism of the first language type when the page contains the content of the first language type, and entering an entrance for translating the content of the first language type into one or more language types; acquiring the content of the first language type through the entrance and determining the recognition range of a user of the electronic equipment for the character string of the first language type; the method is specifically used for: determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which cannot be identified by the user and are presumed in the first language type, the second database comprises character strings which can be identified by the user and are presumed in the first language type, and the establishing process of the first database or the second database comprises the following steps: determining a character string which is presumed to be recognizable by a user in a first language type based on the recognition level of the user for the characters of the first language type, wherein the character string which can be recognized by the user under the recognition level or the character string which cannot be recognized by the user under the recognition level is set for each recognition level; establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type;
the second determining module is used for determining the content to be prompted in the page based on the identification range;
the first providing module is used for providing a translation result of a second language type aiming at the content needing to be prompted;
the fourth determining module is used for receiving a first preset operation aiming at the first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the gas,
a fifth determining module, configured to receive a second preset operation for the second character string; responding to the second preset operation, and determining the second character string as a character string which can be identified by the user;
wherein the second language type is one or more language types, and the second language type is the same as or different from the first language type; when the second language type is the same as the first language type, the translation result of the second language type is a synonym or synonym of the character string of the first language type.
9. The apparatus of claim 8, wherein the first providing module is to:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
10. The apparatus of claim 8 or 9,
the second determining module is configured to: matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
11. The apparatus of claim 10, wherein the apparatus further comprises:
a third providing module, configured to provide the character string of the first language type to the user for recognition, and determine, based on a recognition result, a character string that can be recognized by the user and is presumed in the first language type; and/or the presence of a gas in the gas,
a third determining module, configured to determine, based on a historical operation record of the user for the character string of the first language type, a character string that can be recognized by the user in the first language type by inference;
and the establishing module is used for establishing the first database or the second database based on the character string which can be identified by the user and is presumed in the first language type.
12. The apparatus of claim 8, wherein the apparatus further comprises:
a fourth providing module for providing a translation result of the second language type for the first character string; and/or the presence of a gas in the gas,
and the first adding module is used for adding the first character string into a first database.
13. The apparatus of claim 8, wherein the apparatus further comprises:
a deletion module configured to delete a translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And the second adding module is used for adding the second character string into a second database.
14. The apparatus of claim 8 or 9, wherein the apparatus further comprises:
the judging module is used for judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
the first translation module is used for translating the content of the first language type according to the syntactic structure of the second language type to obtain the translation result if the proportion is larger than the first preset proportion;
and the second translation module is used for translating each character string in the content of the first language type respectively to obtain the translation result if the proportion is not greater than the first preset proportion.
15. An electronic device comprising memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs comprising instructions for:
when the page contains the content of the first language type, triggering a content translation mechanism of the first language type, and entering an entrance for translating the content of the first language type into one or more language types;
acquiring the content of the first language type through the entrance and determining the recognition range of the user of the equipment for the character string of the first language type, wherein the recognition range comprises the following steps: determining the identification range based on a pre-established first database or a second database, wherein the first database comprises character strings which cannot be identified by the user and are presumed in the first language type, the second database comprises character strings which can be identified by the user and are presumed in the first language type, and the establishing process of the first database or the second database comprises the following steps: determining a character string which is presumed to be recognizable by a user in a first language type based on the recognition level of the user for the characters of the first language type, wherein the character string which can be recognized by the user under the recognition level or the character string which cannot be recognized by the user under the recognition level is set for each recognition level; establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type;
determining the content to be prompted in the page based on the identification range;
providing a translation result of a second language type aiming at the content to be prompted;
receiving a first preset operation aiming at a first character string; responding to the first preset operation, and determining the first character string as a character string which cannot be identified by the user; and/or the presence of a gas in the gas,
receiving a second preset operation aiming at a second character string; responding to the second preset operation, and determining the second character string as a character string which can be identified by the user;
wherein the second language type is one or more language types, and the second language type is the same as or different from the first language type; when the second language type is the same as the first language type, the translation result of the second language type is a synonym or synonym of the character string of the first language type.
16. The apparatus of claim 15, wherein the apparatus being further configured to execute the one or more programs by one or more processors includes instructions for:
displaying the content to be prompted and correspondingly displaying the translation result of the second language type; alternatively, the first and second electrodes may be,
and replacing the content to be prompted in the page with the translation result of the second language type.
17. The apparatus of claim 15 or 16, wherein the apparatus being further configured to execute the one or more programs by one or more processors includes instructions for:
the determining the content to be prompted in the page based on the identification range includes:
matching the content of the first language type contained in the page with the character strings in the first database or the second database, and further determining the character strings which cannot be identified by the presumed user, wherein the character strings which cannot be identified by the presumed user are the content to be prompted.
18. The apparatus of claim 17, wherein the apparatus being further configured to execute the one or more programs by one or more processors includes instructions for:
providing the character string of the first language type for the user to recognize, and determining the character string which can be recognized by the user and is presumed in the first language type based on the recognition result; and/or the presence of a gas in the gas,
determining a character string which can be recognized by the user in the first language type based on the historical operation record of the user for the character string of the first language type;
and establishing the first database or the second database based on the character string which can be recognized by the user and is presumed in the first language type.
19. The apparatus of claim 15, wherein the apparatus being further configured to execute the one or more programs by one or more processors includes instructions for:
providing translation results for the first string in the second language type; and/or the presence of a gas in the gas,
and adding the first character string into a first database.
20. The apparatus of claim 15, wherein the apparatus being further configured to execute the one or more programs by one or more processors includes instructions for:
deleting the translation result of the second language type of the second character string if the translation result of the second language type is provided for the second character string; and/or
And adding the second character string into a second database.
21. The apparatus of claim 15 or 16, wherein the apparatus is further configured to execute the one or more programs by one or more processors includes instructions for:
judging whether the proportion of the content needing to be prompted in the content of the first language type is larger than a first preset proportion or not;
if the proportion is larger than the first preset proportion, translating the content of the first language type according to the syntactic structure of the second language type to obtain a translation result;
and if the proportion is not larger than the first preset proportion, respectively translating each character string in the content of the first language type to obtain the translation result.
22. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method steps of one of claims 1 to 7.
CN201611053134.5A 2016-11-24 2016-11-24 Character translation method, device and equipment Active CN108108356B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611053134.5A CN108108356B (en) 2016-11-24 2016-11-24 Character translation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611053134.5A CN108108356B (en) 2016-11-24 2016-11-24 Character translation method, device and equipment

Publications (2)

Publication Number Publication Date
CN108108356A CN108108356A (en) 2018-06-01
CN108108356B true CN108108356B (en) 2023-03-24

Family

ID=62205085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611053134.5A Active CN108108356B (en) 2016-11-24 2016-11-24 Character translation method, device and equipment

Country Status (1)

Country Link
CN (1) CN108108356B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897470A (en) * 2018-06-19 2018-11-27 维沃移动通信有限公司 A kind of translation display methods and mobile terminal
CN116974877B (en) * 2023-09-25 2024-01-30 湖南三湘银行股份有限公司 Log collection method under cross-language scene

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196880A (en) * 2006-12-07 2008-06-11 英业达股份有限公司 Instantaneous translation system and method
US8977248B1 (en) * 2007-03-26 2015-03-10 Callwave Communications, Llc Methods and systems for managing telecommunications and for translating voice messages to text messages
CN105573987A (en) * 2014-11-07 2016-05-11 珠海金山办公软件有限公司 Display method and device of word translation result

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101196880A (en) * 2006-12-07 2008-06-11 英业达股份有限公司 Instantaneous translation system and method
US8977248B1 (en) * 2007-03-26 2015-03-10 Callwave Communications, Llc Methods and systems for managing telecommunications and for translating voice messages to text messages
CN105573987A (en) * 2014-11-07 2016-05-11 珠海金山办公软件有限公司 Display method and device of word translation result

Also Published As

Publication number Publication date
CN108108356A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
US10296201B2 (en) Method and apparatus for text selection
EP3176999A1 (en) Method and device for processing information
CN108803891B (en) Information display method and device, electronic equipment and storage medium
CN113987128A (en) Related article searching method and device, electronic equipment and storage medium
CN108108356B (en) Character translation method, device and equipment
CN108573697B (en) Language model updating method, device and equipment
CN110213062B (en) Method and device for processing message
CN111324214B (en) Statement error correction method and device
CN109799916B (en) Candidate item association method and device
CN111813932A (en) Text data processing method, text data classification device and readable storage medium
CN112329480A (en) Area adjustment method and device and electronic equipment
CN112667852B (en) Video-based searching method and device, electronic equipment and storage medium
CN111414766B (en) Translation method and device
CN107526683B (en) Method and device for detecting functional redundancy of application program and storage medium
CN108983992B (en) Candidate item display method and device with punctuation marks
CN112068793A (en) Voice input method and device
US10423706B2 (en) Method and device for selecting information
CN112528129B (en) Language searching method and device for multilingual translation system
CN110084065B (en) Data desensitization method and device
CN109408623B (en) Information processing method and device
CN111752397B (en) Candidate word determining method and device
CN111381685B (en) Sentence association method and sentence association device
CN112242142B (en) Voice recognition input method and related device
CN108874170B (en) Input method and device
CN113534972A (en) Entry prompting method and device and entry prompting device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant