WO2022143523A1 - Vocabulary display method and apparatus, and electronic device - Google Patents

Vocabulary display method and apparatus, and electronic device Download PDF

Info

Publication number
WO2022143523A1
WO2022143523A1 PCT/CN2021/141629 CN2021141629W WO2022143523A1 WO 2022143523 A1 WO2022143523 A1 WO 2022143523A1 CN 2021141629 W CN2021141629 W CN 2021141629W WO 2022143523 A1 WO2022143523 A1 WO 2022143523A1
Authority
WO
WIPO (PCT)
Prior art keywords
vocabulary
candidate
input
language
character string
Prior art date
Application number
PCT/CN2021/141629
Other languages
French (fr)
Chinese (zh)
Inventor
彭亦圆
Original Assignee
维沃移动通信有限公司
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 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2022143523A1 publication Critical patent/WO2022143523A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items

Definitions

  • the present application belongs to the field of communication technologies, and in particular relates to a method, apparatus and electronic device for displaying vocabulary.
  • the user may encounter a situation in which he wants to input language A through the electronic device, but only finds that the current input method of the electronic device is the input method corresponding to language B after a character string has been input.
  • the user usually needs to trigger the electronic device to switch the current input method to the input method corresponding to language A, and then input language A again.
  • the purpose of the embodiments of the present application is to provide a vocabulary display method, device and electronic device, which can solve the problems of cumbersome steps and low efficiency in the language input process.
  • an embodiment of the present application provides a vocabulary display method, the method includes: receiving a target character string input by a user through a first input method, where the first input method corresponds to a first language; In the case of a two-language match, the first candidate vocabulary corresponding to the target character string is displayed based on the second language, which is different from the above-mentioned first language.
  • an embodiment of the present application provides a vocabulary display device, the vocabulary display device includes: a receiving module and a display module; the receiving module is configured to receive a target character string input by a user through a first input method, the first input The method corresponds to the first language; the display module is configured to display the first candidate vocabulary corresponding to the target string based on the second language when the target string received by the receiving module matches the second language, the second language Different from the first language mentioned above.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
  • the vocabulary display device may, in the case that the target character string matches the second language, based on the second The language displays the first candidate vocabulary corresponding to the target string.
  • the second language is different from the above-mentioned first language.
  • the vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
  • FIG. 1 is one of the interface schematic diagrams of the application of a related vocabulary display method provided by an embodiment of the present application
  • FIG. 2 is one of interface schematic diagrams of another related vocabulary display method application provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for displaying vocabulary according to an embodiment of the present application
  • FIG. 4 is one of interface schematic diagrams of the application of a vocabulary display method provided by an embodiment of the present application.
  • FIG. 5 is the second schematic diagram of the interface of the application of a vocabulary display method provided by an embodiment of the present application
  • FIG. 6 is the third interface schematic diagram of the application of a vocabulary display method provided by an embodiment of the present application.
  • FIG. 7 is a fourth schematic diagram of an interface for application of a vocabulary display method provided by an embodiment of the present application.
  • FIG. 8 is a fifth schematic diagram of an interface of an application of a vocabulary display method provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a vocabulary display device according to an embodiment of the present application.
  • FIG. 10 is one of the schematic structural diagrams of an electronic device provided by an embodiment of the application.
  • FIG. 11 is a second schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • first”, “second” and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that embodiments of the application can be practiced in sequences other than those illustrated or described herein.
  • the objects distinguished by “first”, “second”, etc. are usually one type, and the number of objects is not limited.
  • the first object may be one or more than one.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
  • a chat interface between the user and user 1 is displayed on the screen of the mobile phone 21.
  • a keyboard 22 and an input box 23 are displayed in the chat interface 21, and the keyboard 22 corresponds to the English input method.
  • the user enters the character string "hangzhoutianqi" in the input box 23 through the keyboard 22, the user finds that the input method is wrong, and triggers the mobile phone to switch the input method of the keyboard from the English input method to the Chinese input method.
  • an embodiment of the present application provides a vocabulary display method. After receiving the target character string input by the user through the first input method (corresponding to the first language), the vocabulary display device can display the target character string with the first input method. In the case of a two-language match, the first candidate vocabulary corresponding to the target character string is displayed based on the second language. Wherein, the second language is different from the above-mentioned first language.
  • the vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
  • FIG. 3 is a schematic flowchart of a vocabulary display method provided by an embodiment of the present application, including step 301 and step 302:
  • Step 301 The vocabulary display device receives a target character string input by a user through a first input method.
  • the above-mentioned first input method corresponds to the first language.
  • the above-mentioned electronic device may be the above-mentioned vocabulary display device, or may be a device including a vocabulary display device, which is not limited in this embodiment of the present application.
  • the above-mentioned first language may be any language supported by the electronic device.
  • the first language may be English, French, or Latin, etc., which is not limited in this embodiment of the present application.
  • the above-mentioned first input method is an English input method
  • the above-mentioned first input method is a French input method, etc.
  • the embodiment of the present application This is not limited.
  • the above-mentioned target character string may include at least one of the following: characters, letters, and numbers.
  • the user may input the above-mentioned target character string in the input area.
  • the input area can be displayed in any area on the screen of the vocabulary display device.
  • the input area may be displayed in the upper area in the screen of the vocabulary display device, or displayed in the lower area in the screen of the vocabulary display device, or displayed in the left area in the screen of the vocabulary display device, or displayed in the vocabulary display device.
  • the right area of the screen, etc. is not limited in this embodiment of the present application.
  • Step 302 The vocabulary display device displays a first candidate vocabulary corresponding to the target character string based on the second language when the target character string matches the second language.
  • the above-mentioned second language is different from the above-mentioned first language.
  • the above-mentioned second language may include one language or may include multiple languages, which is not limited in this embodiment of the present application.
  • the above-mentioned second language may be any language supported by the electronic device, for example, the second language may be Chinese, etc., which is not limited in the embodiment of the present application.
  • the vocabulary display device may display the first candidate vocabulary corresponding to the target character string in a preset area.
  • the preset area may be an original area (such as a candidate area described below) or a newly added area (such as a target area described below), which is not limited in this embodiment of the present application.
  • the vocabulary display device may also display candidate vocabulary in the first language corresponding to the target character string.
  • the method may further include the following step 303:
  • Step 303 The vocabulary display device displays the second candidate vocabulary corresponding to the target character string based on the first language.
  • the vocabulary display device may display the above-mentioned first candidate vocabulary and the above-mentioned second candidate vocabulary in the same area, or may display the first candidate vocabulary and the second candidate vocabulary in different areas.
  • the word display device may display the first candidate word and the second candidate word in the candidate area, or may display the first candidate word in the candidate area and the second candidate word in the target area.
  • the vocabulary display apparatus may perform step 302 before performing step 303, may also perform step 302 after performing step 303, or may perform step 302 while performing step 303, which is not limited in this embodiment of the present application.
  • the vocabulary display apparatus may determine whether the above-mentioned target character string matches the second language.
  • the vocabulary display device can determine whether the target character string matches the second language in at least two possible ways.
  • the method may further include the following steps A1 and A2:
  • Step A1 The vocabulary display device acquires feature information corresponding to the target character string.
  • the above-mentioned feature information may include at least one of the following: the character string length of the target character string, the average interval length between every two consonant letters in the target character string, the number of consonant letters in the target character string, the target character The ratio of the number of consonants in the string to the total number of characters, the maximum number of consecutive occurrences of consonants in the target string, etc.
  • the warped tongues (such as zh, ch and sh) in Hanyu Pinyin can be used as a consonant.
  • Step A2 The vocabulary display device uses a classification prediction model to identify the above feature information to obtain a first identification result.
  • the above-mentioned first identification result is used to indicate whether the above-mentioned target character string matches the second language.
  • the above identification result is not only used to indicate whether the target character string matches the second language, but also can be specifically used to indicate the second language when the target character string matches the second language.
  • the mobile phone can use the classification prediction model to identify the string “hangzhou”. ”, it can be determined that the character string “hangzhou” is Chinese Pinyin, that is, the character string “hangzhou” matches Chinese (ie, the second language mentioned above).
  • the mobile phone can use the classification prediction model to identify the string "hypothesis”, and it can be determined that the string "hypothesis” is an English letter, that is, the The string "hangzhou” does not match other languages.
  • the method may further include the following steps B1 and B2:
  • Step B1 The vocabulary display device uses a language model to identify the target character string to obtain a second identification result.
  • the above-mentioned second identification result is used to indicate whether the above-mentioned target character string matches the second language.
  • the above-mentioned second recognition result is used to indicate that the target character string corresponds to the text fluency of the first language and the second language, and the vocabulary display device can determine whether the target string matches the second language according to the text fluency, and the specific match second language.
  • the vocabulary display device may determine that the target character string matches the first language; In the case that the character fluency of the character string corresponding to the first language is lower than that of the target character string corresponding to the second language, the vocabulary display device may determine that the target character string matches the second language.
  • the mobile phone can use the language model string "hangztianq” to identify , determine that the Chinese candidate word of the string "hangztianq” is "Hangzhou weather", and the English candidate word is the original string. Then, the mobile phone can determine that the Chinese fluency corresponding to the string "hangztianq” is greater than the English fluency. Therefore, the mobile phone can determine that the string "hangztianq” is Chinese Pinyin, that is, the string "hangztianq” is the same as Chinese (that is, the second language mentioned above). )match.
  • the vocabulary display device may, in the case that the target character string matches the second language, based on The second language displays the first candidate vocabulary corresponding to the target character string.
  • the second language is different from the above-mentioned first language.
  • the vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
  • the user may trigger the vocabulary display device to display the above-mentioned second candidate vocabulary according to requirements.
  • the method may further include the following steps 302a1 and 302a3:
  • Step 302a1 The vocabulary display device displays the target identifier.
  • the above-mentioned target identifier is used to indicate that the above-mentioned target character string also corresponds to the second candidate vocabulary.
  • the above-mentioned second candidate vocabulary may be determined based on the first language.
  • the above-mentioned target identifier may include at least one of the following: words, pictures, and symbols.
  • the above-mentioned target identifier may be an underscore.
  • the above-mentioned target identifier may be displayed above the first candidate word, may also be displayed below the first candidate word, may also be displayed to the left of the first candidate word, or may be displayed on the The right side of the first candidate word, etc., is not limited in this embodiment of the present application.
  • the vocabulary display apparatus may also perform step 302a1 while performing the foregoing step 302, which is not limited in this embodiment of the present application.
  • Step 302a2 The vocabulary display device receives the first input of the target identifier by the user.
  • the above-mentioned first input may be: a user's click input on the above-mentioned target identifier, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements. This is not limited.
  • the specific gesture in the embodiment of the present application may be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, and a double-click gesture; in the embodiment of the present application
  • the click input can be single-click input, double-click input, or click input for any number of times, etc., and can also be long-press input or short-press input.
  • Step 302a3 In response to the above-mentioned first input, the vocabulary display device displays the above-mentioned second candidate vocabulary.
  • the mobile phone can determine that the character string "hangzhoutianqi” is Chinese Pinyin. At this time, the mobile phone can display the Chinese candidate word "Hangzhou weather” corresponding to the string "hangzhoutianqi”, and display an underline (that is, the above-mentioned target identifier) under the Chinese candidate word "Hangzhou weather”, indicating to the user that the string " hangzhoutianqi” also corresponds to the Chinese candidate vocabulary. Then, the user can long press the underlined Chinese candidate word "Hangzhou weather", and at this time, the mobile phone can display the English candidate word "hangzhoutianqi”.
  • the vocabulary display method provided by the embodiment of the present application can be applied to the scenario of flexibly displaying the second candidate vocabulary.
  • the vocabulary display device can display the target identifier to prompt the user that the target string also corresponds to the second candidate vocabulary.
  • the user wants to view the second candidate vocabulary
  • the user can input the target identifier to trigger the vocabulary display device to display the second candidate vocabulary, so that the user can flexibly trigger the vocabulary display device to display the second candidate vocabulary according to requirements.
  • the vocabulary display device may display the candidate vocabulary of the second language corresponding to the target character string and the candidate vocabulary of the first language corresponding to the target character string in the same area.
  • the vocabulary display device may display the above-mentioned first candidate vocabulary and the above-mentioned second candidate vocabulary in the candidate area.
  • the above-mentioned candidate area may be any area on the screen of the vocabulary display device.
  • the candidate region may be displayed in an upper region in the screen of the vocabulary display device, or displayed in a lower region in the screen of the vocabulary display device, or displayed in a left region in the screen of the vocabulary display device, or displayed in the vocabulary display device
  • the right area of the screen, etc., is not limited in this embodiment of the present application.
  • the vocabulary display device may display the above-mentioned first candidate words in the first display position of the candidate area, and display the above-mentioned second candidate words in the second display position of the candidate area.
  • the vocabulary display device may display the first candidate vocabulary in the first display position of the candidate area, and display the second candidate vocabulary in the second display position of the candidate area.
  • the second candidate vocabulary may be displayed in the first display position of the candidate area, and the first candidate vocabulary may be displayed in the second display position of the candidate area, which is not limited in this embodiment of the present application.
  • a chat interface 41 between the user and user 1 is displayed on the screen of the mobile phone, and a keyboard 42 and an input box are displayed in the chat interface 41 43 and a candidate box 44, wherein the keyboard 42 corresponds to the English input method.
  • the mobile phone can determine that the character string "hangzhoutianqi” is Chinese pinyin.
  • the mobile phone can display the Chinese word “Hangzhou weather” in the first display position of the candidate box 44 and the English word “hangzhoutianqi” in the second display position of the candidate box 44 .
  • the vocabulary display device may determine the display position according to the text fluency of the target character string corresponding to the first language and the text fluency of the target character string corresponding to the second language. For example, if the target character string corresponds to the second language The text fluency is greater than the text fluency of the target character string corresponding to the first language, then the vocabulary display device can display the first candidate vocabulary in the first display position of the candidate area, and display the first candidate vocabulary in the second display position of the candidate area.
  • Two candidate words if the word fluency of the target character string corresponding to the second language is smaller than the word fluency of the target character string corresponding to the first language, the word display device can display the second candidate word in the first display position of the candidate area , the first candidate word is displayed in the second display position of the candidate area, which is not limited in this embodiment of the present application.
  • the vocabulary display method provided by the embodiment of the present application can be applied to a scenario where candidate words of different languages are displayed in the same area, and the vocabulary display device is in the case that the target input method corresponds to the first language, but it is determined that the target character string corresponds to the second language , the candidate vocabulary of the second language and the candidate vocabulary of the first language can be displayed in the same area, which is convenient for the user to select, thereby simplifying the steps of vocabulary selection.
  • the vocabulary display device may display candidate vocabulary in the second language corresponding to the target character string and candidate vocabulary in the first language corresponding to the target character string in different regions. Specifically, it can be displayed in at least two possible implementation manners.
  • step 302 may specifically include the following step 302b:
  • Step 302b In the case that the target character string matches the second language, the vocabulary display device displays the first candidate vocabulary corresponding to the target character string in the candidate area based on the second language.
  • displaying the first candidate vocabulary corresponding to the target character string in the candidate area based on the second language in the above-mentioned step 302b may specifically include the following steps: displaying the first candidate vocabulary in the candidate area based on the above-mentioned second language The first candidate vocabulary corresponding to the target string, and the above target identifier is displayed.
  • the above-mentioned candidate area may be any area on the screen of the vocabulary display device.
  • the candidate region may be displayed in an upper region in the screen of the vocabulary display device, or displayed in a lower region in the screen of the vocabulary display device, or displayed in a left region in the screen of the vocabulary display device, or displayed in the vocabulary display device
  • the right area of the screen, etc., is not limited in this embodiment of the present application.
  • the method may further include the following step C1:
  • Step C1 The vocabulary display device receives a third input from the user on the above-mentioned first candidate vocabulary.
  • the above-mentioned third input may be: the user's click input on the above-mentioned first candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements.
  • the embodiment does not limit this.
  • the above-mentioned step 303 may specifically include the following step C2:
  • Step C2 In response to the above-mentioned third input, the vocabulary display device displays a target area, and displays the above-mentioned second candidate vocabulary in the target area.
  • the display position of the target area is related to the display position of the candidate area.
  • the above-mentioned target area may be displayed in any area around the above-mentioned candidate area.
  • the target area may be displayed above the candidate area, may also be displayed below the candidate area, may also be displayed to the left of the candidate area, or may be displayed to the right of the candidate area, etc., which is not limited in this embodiment of the present application .
  • the mobile phone when the user inputs the character string “hangzhoutianqi” in the input box 43 through the keyboard 42 , the mobile phone can determine that the character string “hangzhoutianqi” is Chinese Pinyin. At this time, as shown in FIG. 6, the mobile phone can display the Chinese candidate word "Hangzhou weather” corresponding to the character string "hangzhoutianqi” in the candidate box 44, and display an underline under the Chinese candidate word "Hangzhou weather” (that is, the above-mentioned target identifier), that is, indicating to the user that the character string "hangzhoutianqi” also corresponds to an English candidate vocabulary.
  • the mobile phone can pop up a pull-up box 51 (that is, the above-mentioned target area) above the candidate box 44, and the pull-up box 51 displays There is an English candidate word "hangzhoutianqi”.
  • step 303 may specifically include the following step 303a:
  • Step 303a The vocabulary display device displays the second candidate vocabulary in the candidate area based on the first language when the target character string matches the second language.
  • the above-mentioned second candidate vocabulary is displayed in the above-mentioned candidate area based on the above-mentioned first language in the above-mentioned step 303a, which may specifically include the following step 303a1:
  • Step 303a1 The vocabulary display device displays the second candidate vocabulary in the candidate area based on the first language, and displays a preset identifier.
  • the above-mentioned preset identifier is used to indicate that the above-mentioned target character string also corresponds to the above-mentioned first candidate vocabulary.
  • the above-mentioned preset identifiers may include at least one of the following: text, pictures, and symbols.
  • the above-mentioned preset identifier may be an underline.
  • the above-mentioned preset identifier may be displayed above the second candidate word, may also be displayed below the second candidate word, may also be displayed to the left of the second candidate word, or may be displayed On the right side of the second candidate word, etc., this is not limited in this embodiment of the present application.
  • the method may further include the following step D1:
  • Step D1 The vocabulary display device receives a fourth input from the user on the second candidate vocabulary.
  • the above-mentioned fourth input may be: the user's click input on the above-mentioned second candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements.
  • the embodiment does not limit this.
  • the above-mentioned step 302 may specifically include the following step D2:
  • Step D2 In response to the above-mentioned fourth input, the vocabulary display device displays a preset area, and displays the above-mentioned first candidate vocabulary in the target area.
  • the display position of the preset area is related to the display position of the candidate area.
  • the above-mentioned preset area may be displayed in any area around the above-mentioned candidate area.
  • the preset area may be displayed above the candidate area, may also be displayed below the candidate area, may also be displayed on the left side of the candidate area, or may be displayed on the right side of the candidate area, etc., which is not made in this embodiment of the present application limited.
  • the mobile phone can determine that the character string "hangzhoutianqi” is Chinese Pinyin. At this time, the mobile phone can display the English candidate word "hangzhoutianqi” corresponding to the string "hangzhoutianqi” in the candidate box, and display an underline (that is, the above-mentioned preset identifier) under the English candidate word "hangzhoutianqi", which indicates to the user that this
  • the string "hangzhoutianqi” also corresponds to a Chinese candidate vocabulary.
  • the mobile phone can pop up a pull-up box (that is, the above-mentioned preset area) above the candidate box, and the pull-up box displays Chinese candidates Vocabulary "Hangzhou Weather".
  • the vocabulary display method provided by the embodiment of the present application can be applied to a scenario in which candidate words are displayed in different regions.
  • the vocabulary display device determines that the target character string corresponds to the second language
  • the vocabulary display device can first display the second language in the candidate region. candidate vocabulary, and then the user can trigger the vocabulary display device to display the candidate vocabulary of the first language in the target area according to the requirements; or, the candidate vocabulary of the first language can be displayed in the candidate area first, and then the user can trigger the vocabulary display according to the requirement
  • the device displays the candidate vocabulary of the second language in the preset area, so that the display mode of the candidate vocabulary is more flexible.
  • the method may further include the following steps 304 and 305:
  • Step 304 The vocabulary display device receives a second input of the first candidate vocabulary from the user.
  • the above-mentioned second input is used to confirm the selection of the first candidate vocabulary.
  • the above-mentioned second input may be: the user's click input on the above-mentioned first candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements.
  • the embodiment does not limit this.
  • the above-mentioned second input is different from the above-mentioned third input.
  • the second input may be the input of the user clicking the first candidate word
  • the third input may be the user's long-pressing the first candidate word.
  • Step 305 In response to the second input, the word display device displays the first candidate word in the input area, and displays the target candidate word associated with the first candidate word in the candidate area.
  • the above-mentioned target candidate word may correspond to a first language or a second language, which is not limited in this embodiment of the present application.
  • the mobile phone can display Chinese in the input box 43 The word “Hangzhou weather”, and predict the candidate words associated with the Chinese word “Hangzhou weather”, and display the Chinese words “forecast”, “cold”, “good”, “good”, “hot” and "a bit” in the candidate box 44 (that is, the above-mentioned target candidate vocabulary).
  • the vocabulary display method provided by the embodiment of the present application can be applied to the scenario of displaying associated candidate vocabulary. After the user selects the candidate vocabulary of the second language, the vocabulary display device can display the candidate vocabulary associated with the candidate vocabulary of the second language, which is convenient for The user makes selections that simplify the steps of the vocabulary entry process.
  • the method may further include the following steps 306 and 307:
  • Step 306 The vocabulary display device receives a fifth input from the user on the second candidate vocabulary.
  • the above-mentioned fifth input may be: the user's click input on the above-mentioned second candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements.
  • the embodiment does not limit this.
  • the aforementioned fifth input is different from the aforementioned fourth input.
  • the fifth input may be an input in which the user clicks the second candidate word
  • the fourth input may be an input in which the user presses the second candidate word for a long time.
  • Step 307 In response to the fifth input, the word display device displays the second candidate word in the input area, and displays the candidate words associated with the second candidate word in the candidate area.
  • the mobile phone can display the English candidate word in the input box 43 "hangzhoutianqi”, and predict the candidate words associated with the English candidate word "hangzhoutianqi”, displaying the English words "is", "was” and "has” in the candidate box 44.
  • the vocabulary display device can display the candidate vocabulary associated with the candidate vocabulary of the first language, which is convenient for the user to select, and can simplify the steps of the vocabulary input process.
  • the execution subject may be a vocabulary display device, or a control module in the vocabulary display device for executing the vocabulary display method.
  • the vocabulary display device provided by the embodiment of the present application is described by taking the vocabulary display method performed by the vocabulary display device as an example.
  • FIG. 9 is a schematic diagram of a possible structure for implementing a vocabulary display device provided by an embodiment of the present application.
  • the vocabulary display device 600 includes: a receiving module 601 and a display module 602, wherein: the receiving module 601 is used for receiving The target character string input by the user through the first input method, the first input method corresponds to the first language; the display module 602 is used for, in the case that the above-mentioned target character string received by the receiving module 601 matches the second language, based on the The second language displays the first candidate vocabulary corresponding to the target character string, and the second language is different from the above-mentioned first language.
  • the display module 602 is further configured to display the second candidate vocabulary corresponding to the target character string based on the first language.
  • the display module 602 is further configured to display a target identifier, and the target identifier is used to indicate that the above-mentioned target character string also corresponds to the above-mentioned second candidate vocabulary; the receiving module 601 is also used to receive the first input of the user to the above-mentioned target identifier. ; The display module 602, also in response to the first input received by the receiving module 601, displays the above-mentioned second candidate vocabulary.
  • the receiving module 601 is further configured to receive a second input from the user to the above-mentioned first candidate vocabulary; the display module 602 is further configured to display the first input in the input area in response to the second input received by the receiving module 601 candidate vocabulary, and the target candidate vocabulary associated with the first candidate vocabulary is displayed in the candidate area.
  • the vocabulary display device after receiving the target character string input by the user through the first input method (corresponding to the first language), the vocabulary display device can, in the case that the target character string matches the second language, based on The second language displays the first candidate vocabulary corresponding to the target character string.
  • the second language is different from the above-mentioned first language.
  • the vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
  • the word display device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • netbook or a personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the vocabulary display device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the vocabulary display device provided in the embodiment of the present application can implement each process implemented by the method embodiments in FIG. 1 to FIG. 8 , and to avoid repetition, details are not described here.
  • an embodiment of the present application further provides an electronic device 700, including a processor 701, a memory 702, a program or instruction stored in the memory 702 and executable on the processor 701,
  • an electronic device 700 including a processor 701, a memory 702, a program or instruction stored in the memory 702 and executable on the processor 701,
  • the program or instruction is executed by the processor 701
  • each process of the above-mentioned embodiment of the vocabulary display method is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 11 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110, etc. part.
  • the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions.
  • a power source such as a battery
  • the structure of the electronic device shown in FIG. 11 does not constitute a limitation on the electronic device.
  • the electronic device may include more or less components than those shown in the figure, or combine some components, or arrange different components, which will not be repeated here. .
  • the user input unit 107 is used for receiving the target character string input by the user through the first input method, the first input method corresponds to the first language; the display unit 106 is used for the above-mentioned target character string received in the user input unit 107 In the case of matching with the second language, the first candidate vocabulary corresponding to the target character string is displayed based on the second language, and the second language is different from the above-mentioned first language.
  • the display unit 106 is further configured to display the second candidate vocabulary corresponding to the target character string based on the first language.
  • the display unit 106 is further configured to display a target identifier, and the target identifier is used to indicate that the above-mentioned target character string also corresponds to the above-mentioned second candidate vocabulary;
  • the user input unit 107 is further configured to receive the user's first input on the above-mentioned target identifier. Input; the display unit 106, in response to the first input received by the user input unit 107, also displays the above-mentioned second candidate vocabulary.
  • the user input unit 107 is further configured to receive a second input from the user on the above-mentioned first candidate vocabulary; the display unit 106 is further configured to display in the input area in response to the second input received by the user input unit 107 The first candidate word is displayed, and the target candidate word associated with the first candidate word is displayed in the candidate area.
  • the electronic device after receiving the target character string input by the user through the first input method (corresponding to the first language), the electronic device can, in the case that the target character string matches the second language, based on the first input method (corresponding to the first language)
  • the second language displays the first candidate vocabulary corresponding to the target string.
  • the second language is different from the above-mentioned first language.
  • the electronic device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-enter the target character string. In this way, the steps of the language input process are simple and efficient.
  • the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042. Such as camera) to obtain still pictures or video image data for processing.
  • the display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 107 includes a touch panel 1071 and other input devices 1072 .
  • the touch panel 1071 is also called a touch screen.
  • the touch panel 1071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not described herein again.
  • Memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems.
  • the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 110 .
  • An embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the vocabulary display method can be implemented, and the same can be achieved. In order to avoid repetition, the technical effect will not be repeated here.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above-mentioned embodiments of the vocabulary display method.
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is configured to run a program or an instruction to implement the above-mentioned embodiments of the vocabulary display method.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

Abstract

Disclosed in the present application are a vocabulary display method and apparatus, and an electronic device. The method comprises: receiving a target character string inputted by a user by means of a first input method, the first input method corresponding to a first language; and in the situation in which the target character string matches a second language, displaying, on the basis of the second language, first candidate vocabulary corresponding to the target character string, the second language being different from the first language.

Description

词汇显示方法、装置和电子设备Vocabulary display method, device and electronic device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2020年12月31日在中国提交的中国专利申请号No.202011620509.8的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202011620509.8 filed in China on Dec. 31, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于通信技术领域,具体涉及一种词汇显示方法、装置和电子设备。The present application belongs to the field of communication technologies, and in particular relates to a method, apparatus and electronic device for displaying vocabulary.
背景技术Background technique
随着电子设备的发展,电子设备支持越来越多不同语言的输入法。With the development of electronic devices, electronic devices support more and more input methods in different languages.
目前,在用户使用输入法过程中,用户可能会遇到想要通过电子设备输入语言A,但在已经输入一段字符串之后才发现电子设备当前输入法为语言B对应的输入法的情况。针对上述情况,通常需要用户触发电子设备将当前输入法切换为语言A对应的输入法,再重新输入语言A。At present, in the process of using the input method, the user may encounter a situation in which he wants to input language A through the electronic device, but only finds that the current input method of the electronic device is the input method corresponding to language B after a character string has been input. In view of the above situation, the user usually needs to trigger the electronic device to switch the current input method to the input method corresponding to language A, and then input language A again.
然而,在电子设备将当前输入法切换为语言A对应的输入法之后,会清除掉用户已经输入的字符串。此时,便需要用户重新输入之前已经输入过的字符串。这种重复输入的过程会造成用户时间的浪费,使得语言输入过程步骤繁琐,效率低。However, after the electronic device switches the current input method to the input method corresponding to language A, the character string that has been input by the user will be cleared. At this point, the user needs to re-input the string that has been input before. This repetitive input process will cause a waste of user time, making the language input process cumbersome and inefficient.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种词汇显示方法、装置和电子设备,能够解决语言输入过程中所存在的步骤繁琐,效率低的问题。The purpose of the embodiments of the present application is to provide a vocabulary display method, device and electronic device, which can solve the problems of cumbersome steps and low efficiency in the language input process.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种词汇显示方法,该方法包括:接收用户通过第一输入法输入的目标字符串,该第一输入法对应第一语言;在上述目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇,该第二语言不同于上述第一语言。In a first aspect, an embodiment of the present application provides a vocabulary display method, the method includes: receiving a target character string input by a user through a first input method, where the first input method corresponds to a first language; In the case of a two-language match, the first candidate vocabulary corresponding to the target character string is displayed based on the second language, which is different from the above-mentioned first language.
第二方面,本申请实施例提供了一种词汇显示装置,该词汇显示装置包括:接收模块和显示模块;接收模块,用于接收用户通过第一输入法输入的目标字符串,该第一输入法对应第一语言;显示模块,用于在接收模块接收到的目标 字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇,该第二语言不同于上述第一语言。In a second aspect, an embodiment of the present application provides a vocabulary display device, the vocabulary display device includes: a receiving module and a display module; the receiving module is configured to receive a target character string input by a user through a first input method, the first input The method corresponds to the first language; the display module is configured to display the first candidate vocabulary corresponding to the target string based on the second language when the target string received by the receiving module matches the second language, the second language Different from the first language mentioned above.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
在本申请实施例中,词汇显示装置在接收用户通过第一输入法(对应第一语言)输入的目标字符串之后,可以在该目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇。其中,该第二语言不同于上述第一语言。通过上述方式,在用户切错输入法或者忘记切换输入法的情况下,相比于相关技术中用户需要先触发电子设备切换为正确的输入法,再重新输入目标字符串的方案,本申请中的词汇显示装置可以通过用户输入的目标字符串判断用户想要使用的语言,并向用户展示字符串对应的该语言的候选词汇供用户选择,无需用户重新输入目标字符串。如此,使得语言输入过程步骤简便,效率高。In the embodiment of the present application, after receiving the target character string input by the user through the first input method (corresponding to the first language), the vocabulary display device may, in the case that the target character string matches the second language, based on the second The language displays the first candidate vocabulary corresponding to the target string. Wherein, the second language is different from the above-mentioned first language. Through the above method, when the user switches the wrong input method or forgets to switch the input method, compared with the solution in the related art in which the user needs to trigger the electronic device to switch to the correct input method first, and then re-enter the target string, in the present application The vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
附图说明Description of drawings
图1为本申请实施例提供的一种相关的词汇显示方法应用的界面示意图之一;FIG. 1 is one of the interface schematic diagrams of the application of a related vocabulary display method provided by an embodiment of the present application;
图2为本申请实施例提供的另一种相关的词汇显示方法应用的界面示意图之一;FIG. 2 is one of interface schematic diagrams of another related vocabulary display method application provided by an embodiment of the present application;
图3为本申请实施例提供的一种词汇显示方法流程示意图;FIG. 3 is a schematic flowchart of a method for displaying vocabulary according to an embodiment of the present application;
图4为本申请实施例提供的一种词汇显示方法应用的界面示意图之一;FIG. 4 is one of interface schematic diagrams of the application of a vocabulary display method provided by an embodiment of the present application;
图5为本申请实施例提供的一种词汇显示方法应用的界面示意图之二;FIG. 5 is the second schematic diagram of the interface of the application of a vocabulary display method provided by an embodiment of the present application;
图6为本申请实施例提供的一种词汇显示方法应用的界面示意图之三;FIG. 6 is the third interface schematic diagram of the application of a vocabulary display method provided by an embodiment of the present application;
图7为本申请实施例提供的一种词汇显示方法应用的界面示意图之四;FIG. 7 is a fourth schematic diagram of an interface for application of a vocabulary display method provided by an embodiment of the present application;
图8为本申请实施例提供的一种词汇显示方法应用的界面示意图之五;FIG. 8 is a fifth schematic diagram of an interface of an application of a vocabulary display method provided by an embodiment of the present application;
图9为本申请实施例提供的一种词汇显示装置的结构示意图;FIG. 9 is a schematic structural diagram of a vocabulary display device according to an embodiment of the present application;
图10为本申请实施例提供的一种电子设备的结构示意图之一;FIG. 10 is one of the schematic structural diagrams of an electronic device provided by an embodiment of the application;
图11为本申请实施例提供的一种电子设备的结构示意图之二。FIG. 11 is a second schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that embodiments of the application can be practiced in sequences other than those illustrated or described herein. In addition, the objects distinguished by "first", "second", etc. are usually one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
在相关技术中,当用户想要输入汉语,但切错输入法或忘记切换输入法,使得当前输入法为英语输入法,如图1所示,手机屏幕中显示有用户和用户1的聊天界面21,聊天界面21中显示有键盘22和输入框23,该键盘22对应英语输入法。当用户通过键盘22在输入框23中输入字符串“hangzhoutianqi”时,用户发现输入法错误,并触发手机将键盘的输入法从英语输入法切换为汉语输入法。In the related art, when the user wants to input Chinese, but switches to the wrong input method or forgets to switch the input method, so that the current input method is the English input method, as shown in FIG. 1 , a chat interface between the user and user 1 is displayed on the screen of the mobile phone 21. A keyboard 22 and an input box 23 are displayed in the chat interface 21, and the keyboard 22 corresponds to the English input method. When the user enters the character string "hangzhoutianqi" in the input box 23 through the keyboard 22, the user finds that the input method is wrong, and triggers the mobile phone to switch the input method of the keyboard from the English input method to the Chinese input method.
场景1,如图2中的(a)所示,手机将键盘的输入法从英语输入法切换为汉语输入法之后,会清空输入框23中显示的字符串“hangzhoutianqi”,此时,用户需要重新在输入字符串“hangzhoutianqi”。这种重复输入的过程会造成用户时间的浪费,使得语言输入过程步骤繁琐,效率低。 Scenario 1, as shown in (a) in Figure 2, after the mobile phone switches the keyboard input method from the English input method to the Chinese input method, the string "hangzhoutianqi" displayed in the input box 23 will be cleared. At this time, the user needs to Re-enter the string "hangzhoutianqi". This repetitive input process will cause a waste of user time, making the language input process cumbersome and inefficient.
场景2,如图2中的(b)所示,手机将键盘的输入法从英语输入法切换为汉语输入法之后,会在输入框23中显示的字符串“hangzhoutianqi”,此时,用户需要删除输入框23中的字符串,并重新在输入字符串“hangzhoutianqi”。这种重复输入的过程会造成用户时间的浪费,使得语言输入过程步骤繁琐,效率低。Scenario 2, as shown in (b) in Figure 2, after the mobile phone switches the keyboard input method from the English input method to the Chinese input method, the string "hangzhoutianqi" will be displayed in the input box 23. At this time, the user needs to Delete the string in the input box 23, and re-enter the string "hangzhoutianqi". This repetitive input process will cause a waste of user time, making the language input process cumbersome and inefficient.
为解决上述的问题,本申请实施例提供了一种词汇显示方法,词汇显示装 置在接收用户通过第一输入法(对应第一语言)输入的目标字符串之后,可以在该目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇。其中,该第二语言不同于上述第一语言。通过上述方式,在用户切错输入法或者忘记切换输入法的情况下,相比于相关技术中用户需要先触发电子设备切换为正确的输入法,再重新输入目标字符串的方案,本申请中的词汇显示装置可以通过用户输入的目标字符串判断用户想要使用的语言,并向用户展示字符串对应的该语言的候选词汇供用户选择,无需用户重新输入目标字符串。如此,使得语言输入过程步骤简便,效率高。In order to solve the above problems, an embodiment of the present application provides a vocabulary display method. After receiving the target character string input by the user through the first input method (corresponding to the first language), the vocabulary display device can display the target character string with the first input method. In the case of a two-language match, the first candidate vocabulary corresponding to the target character string is displayed based on the second language. Wherein, the second language is different from the above-mentioned first language. Through the above method, when the user switches the wrong input method or forgets to switch the input method, compared with the solution in the related art in which the user needs to trigger the electronic device to switch to the correct input method first, and then re-enter the target string, in the present application The vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的词汇显示方法进行详细地说明。The vocabulary display method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
图3为本申请实施例提供的一种词汇显示方法流程示意图,包括步骤301和步骤302:FIG. 3 is a schematic flowchart of a vocabulary display method provided by an embodiment of the present application, including step 301 and step 302:
步骤301:词汇显示装置接收用户通过第一输入法输入的目标字符串。Step 301: The vocabulary display device receives a target character string input by a user through a first input method.
其中,上述第一输入法对应第一语言。Wherein, the above-mentioned first input method corresponds to the first language.
在本申请实施例中,上述的电子设备可以为上述的词汇显示装置,也可以为包括词汇显示装置的设备,本申请实施例对此不作限定。In this embodiment of the present application, the above-mentioned electronic device may be the above-mentioned vocabulary display device, or may be a device including a vocabulary display device, which is not limited in this embodiment of the present application.
在本申请实施例中,上述的第一语言可以为电子设备支持的任一语言,例如,第一语言可以为英语,或者为法语,或者为拉丁语等,本申请实施例对此不作限定。In the embodiment of the present application, the above-mentioned first language may be any language supported by the electronic device. For example, the first language may be English, French, or Latin, etc., which is not limited in this embodiment of the present application.
可以理解,在第一语言为英语的情况下,上述的第一输入法为英语输入法;在第一语言为法语的情况下,上述的第一输入法为法语输入法等,本申请实施例对此不作限定。It can be understood that when the first language is English, the above-mentioned first input method is an English input method; when the first language is French, the above-mentioned first input method is a French input method, etc. The embodiment of the present application This is not limited.
在本申请实施例中,上述的目标字符串可以包括以下至少一项:文字,字母,数字。In this embodiment of the present application, the above-mentioned target character string may include at least one of the following: characters, letters, and numbers.
在一种示例中,用户可以在输入区域中输入上述的目标字符串。其中,该输入区域可以显示在词汇显示装置的屏幕中的任意区域。例如,输入区域可以显示在词汇显示装置的屏幕中的上方区域,或者显示在词汇显示装置的屏幕中的下方区域,或者显示在词汇显示装置的屏幕中的左方区域,或者显示在词汇显示装置的屏幕中的右方区域等,本申请实施例对此不作限定。In one example, the user may input the above-mentioned target character string in the input area. Wherein, the input area can be displayed in any area on the screen of the vocabulary display device. For example, the input area may be displayed in the upper area in the screen of the vocabulary display device, or displayed in the lower area in the screen of the vocabulary display device, or displayed in the left area in the screen of the vocabulary display device, or displayed in the vocabulary display device. The right area of the screen, etc., is not limited in this embodiment of the present application.
步骤302:词汇显示装置在上述目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇。Step 302 : The vocabulary display device displays a first candidate vocabulary corresponding to the target character string based on the second language when the target character string matches the second language.
其中,上述第二语言不同于上述第一语言。Wherein, the above-mentioned second language is different from the above-mentioned first language.
在本申请实施例中,上述的第二语言可以包括一种语言,也可以包括多种语言,本申请实施例对此不作限定。In this embodiment of the present application, the above-mentioned second language may include one language or may include multiple languages, which is not limited in this embodiment of the present application.
在本申请实施例中,上述的第二语言可以为电子设备支持的任一语言,例如,第二语言可以为汉语等,本申请实施例对此不作限定。In the embodiment of the present application, the above-mentioned second language may be any language supported by the electronic device, for example, the second language may be Chinese, etc., which is not limited in the embodiment of the present application.
在本申请实施例中,词汇显示装置可以在预设区域中显示目标字符串对应的第一候选词汇。其中,该预设区域可以为原有区域(如下述的候选区域),也可以为新增区域(如下述的目标区域),本申请实施例对此不作限定。In this embodiment of the present application, the vocabulary display device may display the first candidate vocabulary corresponding to the target character string in a preset area. The preset area may be an original area (such as a candidate area described below) or a newly added area (such as a target area described below), which is not limited in this embodiment of the present application.
可选地,在本申请实施例中,词汇显示装置除了可以显示上述的第二候选词汇以外,还可以显示目标字符串对应的第一语言的候选词汇。Optionally, in this embodiment of the present application, in addition to displaying the above-mentioned second candidate vocabulary, the vocabulary display device may also display candidate vocabulary in the first language corresponding to the target character string.
示例性的,在上述的步骤301之后,该方法还可以包括如下步骤303:Exemplarily, after the above step 301, the method may further include the following step 303:
步骤303:词汇显示装置基于上述第一语言显示上述目标字符串对应的第二候选词汇。Step 303: The vocabulary display device displays the second candidate vocabulary corresponding to the target character string based on the first language.
示例性的,词汇显示装置可以在同一区域中显示上述的第一候选词汇和上述的第二候选词汇,也可以在不同区域中显示该第一候选词汇和该第二候选词汇,本申请实施例对此不作限定。例如,词汇显示装置可以在候选区域中显示第一候选词汇和第二候选词汇,或者,可以在候选区域中显示第一候选词汇,在目标区域中显示二候选词汇。Exemplarily, the vocabulary display device may display the above-mentioned first candidate vocabulary and the above-mentioned second candidate vocabulary in the same area, or may display the first candidate vocabulary and the second candidate vocabulary in different areas. Embodiments of the present application This is not limited. For example, the word display device may display the first candidate word and the second candidate word in the candidate area, or may display the first candidate word in the candidate area and the second candidate word in the target area.
需要说明的是,词汇显示装置在执行上述的步骤303和步骤302时没有明显的先后顺序。例如,词汇显示装置在执行步骤303之前执行步骤302,也可以在执行步骤303之后执行步骤302,还可以在执行步骤303的同时执行步骤302,本申请实施例对此不作限定。It should be noted that there is no obvious sequence when the vocabulary display device performs the above-mentioned steps 303 and 302 . For example, the vocabulary display apparatus may perform step 302 before performing step 303, may also perform step 302 after performing step 303, or may perform step 302 while performing step 303, which is not limited in this embodiment of the present application.
可选地,在本申请实施例中,词汇显示装置可以确定上述目标字符串是否与第二语言匹配。具体地,词汇显示装置可以通过至少两种可能实现的方式确定目标字符串是否与第二语言匹配。Optionally, in this embodiment of the present application, the vocabulary display apparatus may determine whether the above-mentioned target character string matches the second language. Specifically, the vocabulary display device can determine whether the target character string matches the second language in at least two possible ways.
在第一种可能实现的方式中:In the first possible way:
示例性的,在步骤303之前,该方法还可以包括如下步骤A1和步骤A2:Exemplarily, before step 303, the method may further include the following steps A1 and A2:
步骤A1:词汇显示装置获取上述目标字符串对应的特征信息。Step A1: The vocabulary display device acquires feature information corresponding to the target character string.
示例性的,上述的特征信息可以包括以下至少一项:目标字符串的字符串长度,目标字符串中每两个辅音字母之间的平均间隔长度,目标字符串中辅音字母个数,目标字符串中辅音字母个数与总字符个数的比值,目标字符串的辅 音字母的最大连续出现个数等。Exemplarily, the above-mentioned feature information may include at least one of the following: the character string length of the target character string, the average interval length between every two consonant letters in the target character string, the number of consonant letters in the target character string, the target character The ratio of the number of consonants in the string to the total number of characters, the maximum number of consecutive occurrences of consonants in the target string, etc.
需要说明的是,以汉语为例,为提高判断的准确性,汉语拼音中的翘舌音(如zh、ch和sh)可以作为一个辅音字母。It should be noted that, taking Chinese as an example, in order to improve the accuracy of judgment, the warped tongues (such as zh, ch and sh) in Hanyu Pinyin can be used as a consonant.
步骤A2:词汇显示装置采用分类预测模型对上述特征信息进行识别,得到第一识别结果。Step A2: The vocabulary display device uses a classification prediction model to identify the above feature information to obtain a first identification result.
其中,上述第一识别结果用于指示上述目标字符串是否与第二语言匹配。Wherein, the above-mentioned first identification result is used to indicate whether the above-mentioned target character string matches the second language.
可以理解,上述的识别结果除了用于指示上述目标字符串是否与第二语言匹配,还可以在目标字符串与第二语言匹配的情况下,具体用于指示该第二语言。It can be understood that the above identification result is not only used to indicate whether the target character string matches the second language, but also can be specifically used to indicate the second language when the target character string matches the second language.
例如,以词汇显示装置为手机,且第一语言为英语为例,当用户在英语输入法的输入框中输入字符串“hangzhou”,此时,手机可以采用分类预测模型对该字符串“hangzhou”进行识别,可以确定该字符串“hangzhou”为汉语拼音,即该字符串“hangzhou”与汉语(即上述的第二语言)匹配。当用户在英语输入法的输入框中输入字符串“hypothesis”,此时,手机可以采用分类预测模型对该字符串“hypothesis”进行识别,可以确定该字符串“hypothesis”为英语字母,即该字符串“hangzhou”不与其他语言匹配。For example, taking the vocabulary display device as a mobile phone and the first language being English as an example, when the user enters the string "hangzhou" in the input box of the English input method, the mobile phone can use the classification prediction model to identify the string "hangzhou". ”, it can be determined that the character string “hangzhou” is Chinese Pinyin, that is, the character string “hangzhou” matches Chinese (ie, the second language mentioned above). When the user enters the string "hypothesis" in the input box of the English input method, at this time, the mobile phone can use the classification prediction model to identify the string "hypothesis", and it can be determined that the string "hypothesis" is an English letter, that is, the The string "hangzhou" does not match other languages.
在第二种可能实现的方式中:In the second possible way:
示例性的,在上述的步骤303之前,该方法还可以包括如下步骤B1和步骤B2:Exemplarily, before the above-mentioned step 303, the method may further include the following steps B1 and B2:
步骤B1:词汇显示装置采用语言模型对上述目标字符串进行识别,得到第二识别结果。Step B1: The vocabulary display device uses a language model to identify the target character string to obtain a second identification result.
其中,上述第二识别结果用于指示上述目标字符串是否与第二语言匹配。Wherein, the above-mentioned second identification result is used to indicate whether the above-mentioned target character string matches the second language.
具体的,上述第二识别结果用于指示上述目标字符串对应第一语言和第二语言的文字通顺度,词汇显示装置可以根据文字通顺度判断目标字符串是否与第二语言匹配,以及具体匹配的第二语言。Specifically, the above-mentioned second recognition result is used to indicate that the target character string corresponds to the text fluency of the first language and the second language, and the vocabulary display device can determine whether the target string matches the second language according to the text fluency, and the specific match second language.
示例性的,在目标字符串对应第一语言的文字通顺度大于目标字符串对应第二语言的文字通顺度的情况下,词汇显示装置可以确定目标字符串与第一语言匹配;反之,在目标字符串对应第一语言的文字通顺度小于目标字符串对应第二语言的文字通顺度的情况下,词汇显示装置可以确定目标字符串与第二语言匹配。例如,以词汇显示装置为手机,且第一语言为英语为例,当用户在英语输入法的输入框中输入字符串“hangztianq”,此时,手机可以采用语言模型字 符串“hangztianq”进行识别,确定字符串“hangztianq”的汉语的候选词汇为“杭州天气”,英语的候选词汇为原字符串。然后,手机可以判断出字符串“hangztianq”对应的汉语通顺度大于英语通顺度,因此,手机可以确定字符串“hangztianq”为汉语拼音,即该字符串hangztianq”与汉语(即上述的第二语言)匹配。Exemplarily, in the case that the character fluency of the target character string corresponding to the first language is greater than that of the target character string corresponding to the second language, the vocabulary display device may determine that the target character string matches the first language; In the case that the character fluency of the character string corresponding to the first language is lower than that of the target character string corresponding to the second language, the vocabulary display device may determine that the target character string matches the second language. For example, if the vocabulary display device is a mobile phone and the first language is English, when the user inputs the string "hangztianq" in the input box of the English input method, the mobile phone can use the language model string "hangztianq" to identify , determine that the Chinese candidate word of the string "hangztianq" is "Hangzhou weather", and the English candidate word is the original string. Then, the mobile phone can determine that the Chinese fluency corresponding to the string "hangztianq" is greater than the English fluency. Therefore, the mobile phone can determine that the string "hangztianq" is Chinese Pinyin, that is, the string "hangztianq" is the same as Chinese (that is, the second language mentioned above). )match.
本申请实施例提供的词汇显示方法,词汇显示装置在接收用户通过第一输入法(对应第一语言)输入的目标字符串之后,可以在该目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇。其中,该第二语言不同于上述第一语言。通过上述方式,在用户切错输入法或者忘记切换输入法的情况下,相比于相关技术中用户需要先触发电子设备切换为正确的输入法,再重新输入目标字符串的方案,本申请中的词汇显示装置可以通过用户输入的目标字符串判断用户想要使用的语言,并向用户展示字符串对应的该语言的候选词汇供用户选择,无需用户重新输入目标字符串。如此,使得语言输入过程步骤简便,效率高。In the vocabulary display method provided by the embodiment of the present application, after receiving the target character string input by the user through the first input method (corresponding to the first language), the vocabulary display device may, in the case that the target character string matches the second language, based on The second language displays the first candidate vocabulary corresponding to the target character string. Wherein, the second language is different from the above-mentioned first language. Through the above method, when the user switches the wrong input method or forgets to switch the input method, compared with the solution in the related art in which the user needs to trigger the electronic device to switch to the correct input method first, and then re-enter the target string, in the present application The vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
可选地,在本申请实施例中,用户可以根据需求,触发词汇显示装置显示上述的第二候选词汇。Optionally, in this embodiment of the present application, the user may trigger the vocabulary display device to display the above-mentioned second candidate vocabulary according to requirements.
示例性的,在上述的步骤302之后,该方法还可以包括如下步骤302a1和步骤302a3:Exemplarily, after the above step 302, the method may further include the following steps 302a1 and 302a3:
步骤302a1:词汇显示装置显示目标标识。Step 302a1: The vocabulary display device displays the target identifier.
其中,上述的目标标识用于指示上述目标字符串还对应第二候选词汇。Wherein, the above-mentioned target identifier is used to indicate that the above-mentioned target character string also corresponds to the second candidate vocabulary.
可以理解,上述的第二候选词汇可以是基于第一语言确定的。It can be understood that the above-mentioned second candidate vocabulary may be determined based on the first language.
示例性的,上述的目标标识可以包括以下至少一项:文字,图片,符号。例如,上述的目标标识可以为下划线。Exemplarily, the above-mentioned target identifier may include at least one of the following: words, pictures, and symbols. For example, the above-mentioned target identifier may be an underscore.
在一种示例中,上述的目标标识可以显示在上述第一候选词汇的上方,也可以显示在该第一候选词汇的下方,还可以显示在该第一候选词汇的左方,还可以显示在该第一候选词汇的右方等,本申请实施例对此不作限定。In an example, the above-mentioned target identifier may be displayed above the first candidate word, may also be displayed below the first candidate word, may also be displayed to the left of the first candidate word, or may be displayed on the The right side of the first candidate word, etc., is not limited in this embodiment of the present application.
需要说明的是,词汇显示装置除了可以在执行上述步骤302之后执行步骤302a1以外,也可以在执行上述步骤302的同时执行步骤302a1,本申请实施例对此不作限定。It should be noted that, in addition to performing step 302a1 after performing the foregoing step 302, the vocabulary display apparatus may also perform step 302a1 while performing the foregoing step 302, which is not limited in this embodiment of the present application.
步骤302a2:词汇显示装置接收用户对上述目标标识的第一输入。Step 302a2: The vocabulary display device receives the first input of the target identifier by the user.
示例性的,上述的第一输入可以为:用户对上述目标标识的点击输入,或者为用户输入的语音指令,或者为用户输入的特定手势,具体的可以根据实际 使用需求确定,本申请实施例对此不作限定。Exemplarily, the above-mentioned first input may be: a user's click input on the above-mentioned target identifier, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements. This is not limited.
本申请实施例中的特定手势可以为单击手势、滑动手势、拖动手势、压力识别手势、长按手势、面积变化手势、双按手势、双击手势中的任意一种;本申请实施例中的点击输入可以为单击输入、双击输入或任意次数的点击输入等,还可以为长按输入或短按输入。The specific gesture in the embodiment of the present application may be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, and a double-click gesture; in the embodiment of the present application The click input can be single-click input, double-click input, or click input for any number of times, etc., and can also be long-press input or short-press input.
步骤302a3:响应于上述第一输入,词汇显示装置显示上述第二候选词汇。Step 302a3: In response to the above-mentioned first input, the vocabulary display device displays the above-mentioned second candidate vocabulary.
举例说明,当用户通过英语输入法输入字符串“hangzhoutianqi”时,手机可以确定该字符串“hangzhoutianqi”是汉语拼音。此时,手机可以显示与字符串“hangzhoutianqi”对应的汉语候选词汇“杭州天气”,并在该汉语候选词汇“杭州天气”下显示下划线(即上述的目标标识),即指示用户该字符串“hangzhoutianqi”还对应汉语候选词汇。然后,用户可以长按该带有下划线的汉语候选词汇“杭州天气”,此时,手机可以显示英语候选词汇“hangzhoutianqi”。For example, when the user inputs the character string "hangzhoutianqi" through the English input method, the mobile phone can determine that the character string "hangzhoutianqi" is Chinese Pinyin. At this time, the mobile phone can display the Chinese candidate word "Hangzhou weather" corresponding to the string "hangzhoutianqi", and display an underline (that is, the above-mentioned target identifier) under the Chinese candidate word "Hangzhou weather", indicating to the user that the string " hangzhoutianqi" also corresponds to the Chinese candidate vocabulary. Then, the user can long press the underlined Chinese candidate word "Hangzhou weather", and at this time, the mobile phone can display the English candidate word "hangzhoutianqi".
本申请实施例提供的词汇显示方法可以应用于灵活显示第二候选词汇的场景中,首先,词汇显示装置可以显示目标标识,以提示用户目标字符串还对应第二候选词汇,当用户想要查看该第二候选词汇时,用户可以对目标标识进行输入,触发词汇显示装置显示第二候选词汇,使得用户可以根据需求,灵活地触发词汇显示装置显示第二候选词汇。The vocabulary display method provided by the embodiment of the present application can be applied to the scenario of flexibly displaying the second candidate vocabulary. First, the vocabulary display device can display the target identifier to prompt the user that the target string also corresponds to the second candidate vocabulary. When the user wants to view the second candidate vocabulary When the second candidate vocabulary is used, the user can input the target identifier to trigger the vocabulary display device to display the second candidate vocabulary, so that the user can flexibly trigger the vocabulary display device to display the second candidate vocabulary according to requirements.
可选地,在本申请实施例中,词汇显示装置可以在同一区域中显示目标字符串对应的第二语言的候选词汇和该目标字符串对应的第一语言的候选词汇。Optionally, in this embodiment of the present application, the vocabulary display device may display the candidate vocabulary of the second language corresponding to the target character string and the candidate vocabulary of the first language corresponding to the target character string in the same area.
示例性的,词汇显示装置可以在候选区域中显示的上述的第一候选词汇和上述的第二候选词汇。Exemplarily, the vocabulary display device may display the above-mentioned first candidate vocabulary and the above-mentioned second candidate vocabulary in the candidate area.
示例性的,上述的候选区域可以为词汇显示装置的屏幕中的任意区域。例如,候选区域可以显示在词汇显示装置的屏幕中的上方区域,或者显示在词汇显示装置的屏幕中的下方区域,或者显示在词汇显示装置的屏幕中的左方区域,或者显示在词汇显示装置的屏幕中的右方区域等,本申请实施例对此不作限定。Exemplarily, the above-mentioned candidate area may be any area on the screen of the vocabulary display device. For example, the candidate region may be displayed in an upper region in the screen of the vocabulary display device, or displayed in a lower region in the screen of the vocabulary display device, or displayed in a left region in the screen of the vocabulary display device, or displayed in the vocabulary display device The right area of the screen, etc., is not limited in this embodiment of the present application.
进一步地,词汇显示装置可以在候选区域的第一显示位置中显示上述的第一候选词,并在候选区域的第二显示位置中,显示上述的第二候选词汇。Further, the vocabulary display device may display the above-mentioned first candidate words in the first display position of the candidate area, and display the above-mentioned second candidate words in the second display position of the candidate area.
示例性的,词汇显示装置在目标字符串与第二语言匹配的情况下,可以在候选区域的第一个显示位置中显示第一候选词汇,在候选区域的第二个显示位置中显示第二候选词汇;或者,可以在候选区域的第一个显示位置中显示第二候选词汇,在候选区域的第二个显示位置中显示第一候选词汇,本申请实施例 对此不作限定。Exemplarily, when the target character string matches the second language, the vocabulary display device may display the first candidate vocabulary in the first display position of the candidate area, and display the second candidate vocabulary in the second display position of the candidate area. Alternatively, the second candidate vocabulary may be displayed in the first display position of the candidate area, and the first candidate vocabulary may be displayed in the second display position of the candidate area, which is not limited in this embodiment of the present application.
举例说明,如图4所示,以词汇显示装置为手机,且第一语言为英语为例,手机屏幕中显示有用户和用户1的聊天界面41,聊天界面41中显示有键盘42、输入框43和候选框44,其中,该键盘42对应英语输入法。当用户通过键盘42在输入框43中输入字符串“hangzhoutianqi”时,手机可以确定该字符串“hangzhoutianqi”是汉语拼音。此时,如图5所示,手机可以在候选框44的第一个显示位置显示汉语词汇“杭州天气”,在候选框44的第二个显示位置显示英语词汇“hangzhoutianqi”。For example, as shown in FIG. 4 , taking the vocabulary display device as a mobile phone and the first language being English as an example, a chat interface 41 between the user and user 1 is displayed on the screen of the mobile phone, and a keyboard 42 and an input box are displayed in the chat interface 41 43 and a candidate box 44, wherein the keyboard 42 corresponds to the English input method. When the user inputs the character string "hangzhoutianqi" in the input box 43 through the keyboard 42, the mobile phone can determine that the character string "hangzhoutianqi" is Chinese pinyin. At this time, as shown in FIG. 5 , the mobile phone can display the Chinese word “Hangzhou weather” in the first display position of the candidate box 44 and the English word “hangzhoutianqi” in the second display position of the candidate box 44 .
在一种示例中,词汇显示装置可以根据目标字符串对应第一语言的文字通顺度和该目标字符串对应第二语言的文字通顺度确定显示位置,例如,若目标字符串对应第二语言的文字通顺度大于该目标字符串对应第一语言的文字通顺度,则词汇显示装置可以在候选区域的第一个显示位置中显示第一候选词汇,在候选区域的第二个显示位置中显示第二候选词汇;若目标字符串对应第二语言的文字通顺度小于该目标字符串对应第一语言的文字通顺度,则词汇显示装置可以在候选区域的第一个显示位置中显示第二候选词汇,在候选区域的第二个显示位置中显示第一候选词汇,本申请实施例对此不作限定。In an example, the vocabulary display device may determine the display position according to the text fluency of the target character string corresponding to the first language and the text fluency of the target character string corresponding to the second language. For example, if the target character string corresponds to the second language The text fluency is greater than the text fluency of the target character string corresponding to the first language, then the vocabulary display device can display the first candidate vocabulary in the first display position of the candidate area, and display the first candidate vocabulary in the second display position of the candidate area. Two candidate words; if the word fluency of the target character string corresponding to the second language is smaller than the word fluency of the target character string corresponding to the first language, the word display device can display the second candidate word in the first display position of the candidate area , the first candidate word is displayed in the second display position of the candidate area, which is not limited in this embodiment of the present application.
本申请实施例提供的词汇显示方法可以应用于在同一区域中显示不同语言的候选词的场景中,词汇显示装置在目标输入法对应第一语言,但确定目标字符串对应第二语言的情况下,可以在同一区域显示第二语言的候选词汇和第一语言的候选词汇,方便用户选择,从而可以简化词汇选择的步骤。The vocabulary display method provided by the embodiment of the present application can be applied to a scenario where candidate words of different languages are displayed in the same area, and the vocabulary display device is in the case that the target input method corresponds to the first language, but it is determined that the target character string corresponds to the second language , the candidate vocabulary of the second language and the candidate vocabulary of the first language can be displayed in the same area, which is convenient for the user to select, thereby simplifying the steps of vocabulary selection.
可选地,在本申请实施例中,词汇显示装置可以在不同区域中显示目标字符串对应的第二语言的候选词汇和该目标字符串对应的第一语言的候选词汇。具体可以通过至少两种可能实现的方式来显示。Optionally, in this embodiment of the present application, the vocabulary display device may display candidate vocabulary in the second language corresponding to the target character string and candidate vocabulary in the first language corresponding to the target character string in different regions. Specifically, it can be displayed in at least two possible implementation manners.
在第一种可能的实现方式中(先显示第一候选词汇后显示第二候选词汇):In the first possible implementation (display the first candidate word first and then display the second candidate word):
示例性的,上述的步骤302具体可以包括如下步骤302b:Exemplarily, the above-mentioned step 302 may specifically include the following step 302b:
步骤302b:词汇显示装置在上述目标字符串与第二语言匹配的情况下,基于上述第二语言在上述候选区域中显示该目标字符串对应的第一候选词汇。Step 302b: In the case that the target character string matches the second language, the vocabulary display device displays the first candidate vocabulary corresponding to the target character string in the candidate area based on the second language.
在一种示例中,上述的步骤302b中的基于上述第二语言在候选区域中显示该目标字符串对应的第一候选词汇,具体可以包括如下步骤:基于上述第二语言在候选区域中显示该目标字符串对应的第一候选词汇,并显示上述的目标标识。In an example, displaying the first candidate vocabulary corresponding to the target character string in the candidate area based on the second language in the above-mentioned step 302b may specifically include the following steps: displaying the first candidate vocabulary in the candidate area based on the above-mentioned second language The first candidate vocabulary corresponding to the target string, and the above target identifier is displayed.
示例性的,上述的候选区域可以为词汇显示装置的屏幕中的任意区域。例如,候选区域可以显示在词汇显示装置的屏幕中的上方区域,或者显示在词汇显示装置的屏幕中的下方区域,或者显示在词汇显示装置的屏幕中的左方区域,或者显示在词汇显示装置的屏幕中的右方区域等,本申请实施例对此不作限定。Exemplarily, the above-mentioned candidate area may be any area on the screen of the vocabulary display device. For example, the candidate region may be displayed in an upper region in the screen of the vocabulary display device, or displayed in a lower region in the screen of the vocabulary display device, or displayed in a left region in the screen of the vocabulary display device, or displayed in the vocabulary display device The right area of the screen, etc., is not limited in this embodiment of the present application.
基于上述的步骤302b,在上述的步骤303之前,该方法还可以包括如下步骤C1:Based on the above-mentioned step 302b, before the above-mentioned step 303, the method may further include the following step C1:
步骤C1:词汇显示装置接收用户对上述第一候选词汇的第三输入。Step C1: The vocabulary display device receives a third input from the user on the above-mentioned first candidate vocabulary.
示例性的,上述的第三输入可以为:用户对上述第一候选词汇的点击输入,或者为用户输入的语音指令,或者为用户输入的特定手势,具体的可以根据实际使用需求确定,本申请实施例对此不作限定。Exemplarily, the above-mentioned third input may be: the user's click input on the above-mentioned first candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements. The embodiment does not limit this.
基于上述的步骤C1,上述的步骤303具体可以包括如下步骤C2:Based on the above-mentioned step C1, the above-mentioned step 303 may specifically include the following step C2:
步骤C2:响应于上述第三输入,词汇显示装置显示目标区域,并在该目标区域中显示上述第二候选词汇。Step C2: In response to the above-mentioned third input, the vocabulary display device displays a target area, and displays the above-mentioned second candidate vocabulary in the target area.
其中,上述目标区域的显示位置与上述候选区域的显示位置相关。Wherein, the display position of the target area is related to the display position of the candidate area.
示例性的,上述的目标区域可以显示在上述的候选区域周围的任意区域。例如,目标区域可以显示在候选区域的上方,也可以显示在候选区域的下方,还可以显示在候选区域的左方,还可以显示在候选区域的右方等,本申请实施例对此不作限定。Exemplarily, the above-mentioned target area may be displayed in any area around the above-mentioned candidate area. For example, the target area may be displayed above the candidate area, may also be displayed below the candidate area, may also be displayed to the left of the candidate area, or may be displayed to the right of the candidate area, etc., which is not limited in this embodiment of the present application .
举例说明,结合图4,当用户通过键盘42在输入框43中输入字符串“hangzhoutianqi”时,手机可以确定该字符串“hangzhoutianqi”是汉语拼音。此时,如图6所示,手机可以在候选框44中显示与字符串“hangzhoutianqi”对应的汉语候选词汇“杭州天气”,并在该汉语候选词汇“杭州天气”下显示下划线(即上述的目标标识),即指示用户该字符串“hangzhoutianqi”还对应英语候选词汇。然后,用户可以长按该带有下划线的汉语候选词汇“杭州天气”,此时,手机可以在候选框44上方弹出一个上拉框51(即上述的目标区域),该上拉框51中显示有英语候选词汇“hangzhoutianqi”。For example, referring to FIG. 4 , when the user inputs the character string “hangzhoutianqi” in the input box 43 through the keyboard 42 , the mobile phone can determine that the character string “hangzhoutianqi” is Chinese Pinyin. At this time, as shown in FIG. 6, the mobile phone can display the Chinese candidate word "Hangzhou weather" corresponding to the character string "hangzhoutianqi" in the candidate box 44, and display an underline under the Chinese candidate word "Hangzhou weather" (that is, the above-mentioned target identifier), that is, indicating to the user that the character string "hangzhoutianqi" also corresponds to an English candidate vocabulary. Then, the user can long press the underlined Chinese candidate word "Hangzhou weather", at this time, the mobile phone can pop up a pull-up box 51 (that is, the above-mentioned target area) above the candidate box 44, and the pull-up box 51 displays There is an English candidate word "hangzhoutianqi".
在第二种可能的实现方式中(先显示第二候选词汇后显示第一候选词汇):In the second possible implementation (display the second candidate word first and then display the first candidate word):
示例性的,上述的步骤303具体可以包括如下步骤303a:Exemplarily, the above-mentioned step 303 may specifically include the following step 303a:
步骤303a:词汇显示装置在上述目标字符串与第二语言匹配的情况下,基于上述第一语言在上述的候选区域中显示上述第二候选词汇。Step 303a: The vocabulary display device displays the second candidate vocabulary in the candidate area based on the first language when the target character string matches the second language.
在一种示例中,上述的步骤303a中的基于上述第一语言在上述的候选区域 中显示上述第二候选词汇,具体可以包括如下步骤303a1:In an example, the above-mentioned second candidate vocabulary is displayed in the above-mentioned candidate area based on the above-mentioned first language in the above-mentioned step 303a, which may specifically include the following step 303a1:
步骤303a1:词汇显示装置基于上述第一语言在上述的候选区域中显示上述第二候选词汇,并显示预设标识。Step 303a1: The vocabulary display device displays the second candidate vocabulary in the candidate area based on the first language, and displays a preset identifier.
其中,上述预设标识用于指示上述目标字符串还对应上述第一候选词汇。Wherein, the above-mentioned preset identifier is used to indicate that the above-mentioned target character string also corresponds to the above-mentioned first candidate vocabulary.
示例性的,上述的预设标识可以包括以下至少一项:文字,图片,符号。例如,上述的预设标识可以为下划线。Exemplarily, the above-mentioned preset identifiers may include at least one of the following: text, pictures, and symbols. For example, the above-mentioned preset identifier may be an underline.
在一种示例中,上述的预设标识可以显示在上述第二候选词汇的上方,也可以显示在该第二候选词汇的下方,还可以显示在该第二候选词汇的左方,还可以显示在该第二候选词汇的右方等,本申请实施例对此不作限定。In an example, the above-mentioned preset identifier may be displayed above the second candidate word, may also be displayed below the second candidate word, may also be displayed to the left of the second candidate word, or may be displayed On the right side of the second candidate word, etc., this is not limited in this embodiment of the present application.
基于上述的步骤303a,在上述的步骤302之前,该方法还可以包括如下步骤D1:Based on the above-mentioned step 303a, before the above-mentioned step 302, the method may further include the following step D1:
步骤D1:词汇显示装置接收用户对上述第二候选词汇的第四输入。Step D1: The vocabulary display device receives a fourth input from the user on the second candidate vocabulary.
示例性的,上述的第四输入可以为:用户对上述第二候选词汇的点击输入,或者为用户输入的语音指令,或者为用户输入的特定手势,具体的可以根据实际使用需求确定,本申请实施例对此不作限定。Exemplarily, the above-mentioned fourth input may be: the user's click input on the above-mentioned second candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements. The embodiment does not limit this.
基于上述的步骤D1,上述的步骤302具体可以包括如下步骤D2:Based on the above-mentioned step D1, the above-mentioned step 302 may specifically include the following step D2:
步骤D2:响应于上述第四输入,词汇显示装置显示预设区域,并在该目标区域中显示上述第一候选词汇。Step D2: In response to the above-mentioned fourth input, the vocabulary display device displays a preset area, and displays the above-mentioned first candidate vocabulary in the target area.
其中,上述预设区域的显示位置与上述候选区域的显示位置相关。Wherein, the display position of the preset area is related to the display position of the candidate area.
示例性的,上述的预设区域可以显示在上述的候选区域周围的任意区域。例如,预设区域可以显示在候选区域的上方,也可以显示在候选区域的下方,还可以显示在候选区域的左方,还可以显示在候选区域的右方等,本申请实施例对此不作限定。Exemplarily, the above-mentioned preset area may be displayed in any area around the above-mentioned candidate area. For example, the preset area may be displayed above the candidate area, may also be displayed below the candidate area, may also be displayed on the left side of the candidate area, or may be displayed on the right side of the candidate area, etc., which is not made in this embodiment of the present application limited.
举例说明,当用户通过英语输入法输入字符串“hangzhoutianqi”时,手机可以确定该字符串“hangzhoutianqi”是汉语拼音。此时,手机可以在候选框中显示与字符串“hangzhoutianqi”对应的英语候选词汇“hangzhoutianqi”,并在该英语候选词汇“hangzhoutianqi”下显示下划线(即上述的预设标识),即指示用户该字符串“hangzhoutianqi”还对应汉语候选词汇。然后,用户可以长按该带有下划线的英语候选词汇“hangzhoutianqi”,此时,手机可以在候选框上方弹出一个上拉框(即上述的预设区域),该上拉框中显示有汉语候选词汇“杭州天气”。For example, when the user inputs the character string "hangzhoutianqi" through the English input method, the mobile phone can determine that the character string "hangzhoutianqi" is Chinese Pinyin. At this time, the mobile phone can display the English candidate word "hangzhoutianqi" corresponding to the string "hangzhoutianqi" in the candidate box, and display an underline (that is, the above-mentioned preset identifier) under the English candidate word "hangzhoutianqi", which indicates to the user that this The string "hangzhoutianqi" also corresponds to a Chinese candidate vocabulary. Then, the user can long press the underlined English candidate word "hangzhoutianqi", at this time, the mobile phone can pop up a pull-up box (that is, the above-mentioned preset area) above the candidate box, and the pull-up box displays Chinese candidates Vocabulary "Hangzhou Weather".
本申请实施例提供的词汇显示方法可以应用于在不同区域中显示候选词的 场景中,词汇显示装置在确定目标字符串对应第二语言的情况下,可以先在候选区域中显示第二语言的候选词汇,然后,用户可以根据需求触发词汇显示装置在目标区域中显示第一语言的候选词汇;或者,可以先在候选区域中显示第一语言的候选词汇,然后,用户可以根据需求触发词汇显示装置在预设区域中显示第二语言的候选词汇,如此,使得候选词汇的显示方式更灵活。The vocabulary display method provided by the embodiment of the present application can be applied to a scenario in which candidate words are displayed in different regions. When the vocabulary display device determines that the target character string corresponds to the second language, the vocabulary display device can first display the second language in the candidate region. candidate vocabulary, and then the user can trigger the vocabulary display device to display the candidate vocabulary of the first language in the target area according to the requirements; or, the candidate vocabulary of the first language can be displayed in the candidate area first, and then the user can trigger the vocabulary display according to the requirement The device displays the candidate vocabulary of the second language in the preset area, so that the display mode of the candidate vocabulary is more flexible.
可选地,在本申请实施例中,在上述的步骤302之后,该方法还可以包括如下步骤304和步骤305:Optionally, in this embodiment of the present application, after the above step 302, the method may further include the following steps 304 and 305:
步骤304:词汇显示装置接收用户对上述第一候选词汇的第二输入。Step 304: The vocabulary display device receives a second input of the first candidate vocabulary from the user.
其中,上述的第二输入用于确认选择第一候选词汇。Wherein, the above-mentioned second input is used to confirm the selection of the first candidate vocabulary.
示例性的,上述的第二输入可以为:用户对上述第一候选词汇的点击输入,或者为用户输入的语音指令,或者为用户输入的特定手势,具体的可以根据实际使用需求确定,本申请实施例对此不作限定。Exemplarily, the above-mentioned second input may be: the user's click input on the above-mentioned first candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements. The embodiment does not limit this.
示例性的,上述的第二输入与上述的第三输入不同。例如,该第二输入可以为用户单击第一候选词汇的输入,该第三输入可以为用户长按第一候选词汇的输入。Exemplarily, the above-mentioned second input is different from the above-mentioned third input. For example, the second input may be the input of the user clicking the first candidate word, and the third input may be the user's long-pressing the first candidate word.
步骤305:响应于上述第二输入,词汇显示装置在上述输入区域中显示上述第一候选词汇,并在候选区域中显示与该第一候选词汇关联的目标候选词汇。Step 305: In response to the second input, the word display device displays the first candidate word in the input area, and displays the target candidate word associated with the first candidate word in the candidate area.
示例性的,上述的目标候选词可以对应第一语言,也可以对应第二语言,本申请实施例对此不作限定。Exemplarily, the above-mentioned target candidate word may correspond to a first language or a second language, which is not limited in this embodiment of the present application.
举例说明,结合图5或图6,在用户单击汉语候选词汇“杭州天气”之后,即用户确认选择汉语候选词汇“杭州天气”,如图7所示,手机可以在输入框43中显示汉语词汇“杭州天气”,并预测与汉语词汇“杭州天气”关联的候选词汇,在候选框44中显示汉语词汇“预报”、“冷”、“不错”、“好”“炎热”和“有点”(即上述的目标候选词汇)。For example, in conjunction with FIG. 5 or FIG. 6 , after the user clicks the Chinese candidate word "Hangzhou weather", that is, the user confirms the selection of the Chinese candidate word "Hangzhou weather", as shown in FIG. 7 , the mobile phone can display Chinese in the input box 43 The word "Hangzhou weather", and predict the candidate words associated with the Chinese word "Hangzhou weather", and display the Chinese words "forecast", "cold", "good", "good", "hot" and "a bit" in the candidate box 44 (that is, the above-mentioned target candidate vocabulary).
本申请实施例提供的词汇显示方法可以应用于显示关联的候选词汇的场景中,词汇显示装置在用户选择第二语言的候选词汇之后,可以显示与第二语言的候选词汇关联的候选词汇,方便用户进行选择,可以简化词汇输入过程的步骤。The vocabulary display method provided by the embodiment of the present application can be applied to the scenario of displaying associated candidate vocabulary. After the user selects the candidate vocabulary of the second language, the vocabulary display device can display the candidate vocabulary associated with the candidate vocabulary of the second language, which is convenient for The user makes selections that simplify the steps of the vocabulary entry process.
在一种示例中,在上述的步骤303之后,该方法还可以包括如下步骤306和步骤307:In an example, after the above-mentioned step 303, the method may further include the following steps 306 and 307:
步骤306:词汇显示装置接收用户对上述第二候选词汇的第五输入。Step 306: The vocabulary display device receives a fifth input from the user on the second candidate vocabulary.
示例性的,上述的第五输入可以为:用户对上述第二候选词汇的点击输入,或者为用户输入的语音指令,或者为用户输入的特定手势,具体的可以根据实际使用需求确定,本申请实施例对此不作限定。Exemplarily, the above-mentioned fifth input may be: the user's click input on the above-mentioned second candidate vocabulary, or a voice command input by the user, or a specific gesture input by the user, which can be specifically determined according to actual use requirements. The embodiment does not limit this.
示例性的,上述的第五输入与上述的第四输入不同。例如,该第五输入可以为用户单击第二候选词汇的输入,该第四输入可以为用户长按第二候选词汇的输入。Exemplarily, the aforementioned fifth input is different from the aforementioned fourth input. For example, the fifth input may be an input in which the user clicks the second candidate word, and the fourth input may be an input in which the user presses the second candidate word for a long time.
步骤307:响应于上述第五输入,词汇显示装置在上述输入区域中显示上述第二候选词汇,并在上述候选区域中显示与该第二候选词汇关联的候选词汇。Step 307: In response to the fifth input, the word display device displays the second candidate word in the input area, and displays the candidate words associated with the second candidate word in the candidate area.
举例说明,结合图5或图6,在用户单击英语候选词汇“hangzhoutianqi”之后,即用户确认选择英语候选词汇“hangzhoutianqi”,如图8所示,手机可以在输入框43中显示英语候选词汇“hangzhoutianqi”,并预测与英语候选词汇“hangzhoutianqi”关联的候选词汇,在候选框44中显示英语词汇“is”、“was”和“has”。For example, referring to FIG. 5 or FIG. 6 , after the user clicks the English candidate word “hangzhoutianqi”, that is, the user confirms the selection of the English candidate word “hangzhoutianqi”, as shown in FIG. 8 , the mobile phone can display the English candidate word in the input box 43 "hangzhoutianqi", and predict the candidate words associated with the English candidate word "hangzhoutianqi", displaying the English words "is", "was" and "has" in the candidate box 44.
这样,词汇显示装置在用户选择第一语言的候选词汇之后,可以显示与第一语言的候选词汇关联的候选词汇,方便用户进行选择,可以简化词汇输入过程的步骤。In this way, after the user selects the candidate vocabulary of the first language, the vocabulary display device can display the candidate vocabulary associated with the candidate vocabulary of the first language, which is convenient for the user to select, and can simplify the steps of the vocabulary input process.
需要说明的是,本申请实施例提供的词汇显示方法,执行主体可以为词汇显示装置,或者该词汇显示装置中的用于执行词汇显示方法的控制模块。本申请实施例中以词汇显示装置执行词汇显示方法为例,说明本申请实施例提供的词汇显示装置。It should be noted that, in the vocabulary display method provided by the embodiments of the present application, the execution subject may be a vocabulary display device, or a control module in the vocabulary display device for executing the vocabulary display method. In the embodiment of the present application, the vocabulary display device provided by the embodiment of the present application is described by taking the vocabulary display method performed by the vocabulary display device as an example.
图9为实现本申请实施例提供的一种词汇显示装置的可能的结构示意图,如图9所示,词汇显示装置600包括:接收模块601和显示模块602,其中:接收模块601,用于接收用户通过第一输入法输入的目标字符串,该第一输入法对应第一语言;显示模块602,用于在接收模块601接收到的上述目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇,该第二语言不同于上述第一语言。FIG. 9 is a schematic diagram of a possible structure for implementing a vocabulary display device provided by an embodiment of the present application. As shown in FIG. 9 , the vocabulary display device 600 includes: a receiving module 601 and a display module 602, wherein: the receiving module 601 is used for receiving The target character string input by the user through the first input method, the first input method corresponds to the first language; the display module 602 is used for, in the case that the above-mentioned target character string received by the receiving module 601 matches the second language, based on the The second language displays the first candidate vocabulary corresponding to the target character string, and the second language is different from the above-mentioned first language.
可选地,显示模块602,还用于基于上述第一语言显示上述目标字符串对应的第二候选词汇。Optionally, the display module 602 is further configured to display the second candidate vocabulary corresponding to the target character string based on the first language.
可选地,显示模块602,还用于显示目标标识,该目标标识用于指示上述目标字符串还对应上述第二候选词汇;接收模块601,还用于接收用户对上述目标标识的第一输入;显示模块602,还响应于接收模块601接收到的第一输入,显 示上述第二候选词汇。Optionally, the display module 602 is further configured to display a target identifier, and the target identifier is used to indicate that the above-mentioned target character string also corresponds to the above-mentioned second candidate vocabulary; the receiving module 601 is also used to receive the first input of the user to the above-mentioned target identifier. ; The display module 602, also in response to the first input received by the receiving module 601, displays the above-mentioned second candidate vocabulary.
可选地,接收模块601,还用于接收用户对上述第一候选词汇的第二输入;显示模块602,还用于响应于接收模块601接收到的第二输入,在输入区域中显示第一候选词汇,并在候选区域中显示与该第一候选词汇关联的目标候选词汇。Optionally, the receiving module 601 is further configured to receive a second input from the user to the above-mentioned first candidate vocabulary; the display module 602 is further configured to display the first input in the input area in response to the second input received by the receiving module 601 candidate vocabulary, and the target candidate vocabulary associated with the first candidate vocabulary is displayed in the candidate area.
本申请实施例提供的词汇显示装置,词汇显示装置在接收用户通过第一输入法(对应第一语言)输入的目标字符串之后,可以在该目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇。其中,该第二语言不同于上述第一语言。通过上述方式,在用户切错输入法或者忘记切换输入法的情况下,相比于相关技术中用户需要先触发电子设备切换为正确的输入法,再重新输入目标字符串的方案,本申请中的词汇显示装置可以通过用户输入的目标字符串判断用户想要使用的语言,并向用户展示字符串对应的该语言的候选词汇供用户选择,无需用户重新输入目标字符串。如此,使得语言输入过程步骤简便,效率高。In the vocabulary display device provided by the embodiment of the present application, after receiving the target character string input by the user through the first input method (corresponding to the first language), the vocabulary display device can, in the case that the target character string matches the second language, based on The second language displays the first candidate vocabulary corresponding to the target character string. Wherein, the second language is different from the above-mentioned first language. Through the above method, when the user switches the wrong input method or forgets to switch the input method, compared with the solution in the related art in which the user needs to trigger the electronic device to switch to the correct input method first, and then re-enter the target string, in the present application The vocabulary display device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-input the target character string. In this way, the steps of the language input process are simple and efficient.
本申请实施例中的词汇显示装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The word display device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的词汇显示装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The vocabulary display device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的词汇显示装置能够实现图1至图8的方法实施例实现的各个过程,为避免重复,这里不再赘述。The vocabulary display device provided in the embodiment of the present application can implement each process implemented by the method embodiments in FIG. 1 to FIG. 8 , and to avoid repetition, details are not described here.
可选的,如图10所示,本申请实施例还提供一种电子设备700,包括处理器701,存储器702,存储在存储器702上并可在所述处理器701上运行的程序或指令,该程序或指令被处理器701执行时实现上述词汇显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 10 , an embodiment of the present application further provides an electronic device 700, including a processor 701, a memory 702, a program or instruction stored in the memory 702 and executable on the processor 701, When the program or instruction is executed by the processor 701, each process of the above-mentioned embodiment of the vocabulary display method is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备 和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图11为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 11 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备100包括但不限于:射频单元101、网络模块102、音频输出单元103、输入单元104、传感器105、显示单元106、用户输入单元107、接口单元108、存储器109、以及处理器110等部件。The electronic device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110, etc. part.
本领域技术人员可以理解,电子设备100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图11中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 100 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions. The structure of the electronic device shown in FIG. 11 does not constitute a limitation on the electronic device. The electronic device may include more or less components than those shown in the figure, or combine some components, or arrange different components, which will not be repeated here. .
其中,用户输入单元107,用于接收用户通过第一输入法输入的目标字符串,该第一输入法对应第一语言;显示单元106,用于在用户输入单元107接收到的上述目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇,该第二语言不同于上述第一语言。Among them, the user input unit 107 is used for receiving the target character string input by the user through the first input method, the first input method corresponds to the first language; the display unit 106 is used for the above-mentioned target character string received in the user input unit 107 In the case of matching with the second language, the first candidate vocabulary corresponding to the target character string is displayed based on the second language, and the second language is different from the above-mentioned first language.
可选地,显示单元106,还用于基于上述第一语言显示上述目标字符串对应的第二候选词汇。Optionally, the display unit 106 is further configured to display the second candidate vocabulary corresponding to the target character string based on the first language.
可选地,显示单元106,还用于显示目标标识,该目标标识用于指示上述目标字符串还对应上述第二候选词汇;用户输入单元107,还用于接收用户对上述目标标识的第一输入;显示单元106,还响应于用户输入单元107接收到的第一输入,显示上述第二候选词汇。Optionally, the display unit 106 is further configured to display a target identifier, and the target identifier is used to indicate that the above-mentioned target character string also corresponds to the above-mentioned second candidate vocabulary; the user input unit 107 is further configured to receive the user's first input on the above-mentioned target identifier. Input; the display unit 106, in response to the first input received by the user input unit 107, also displays the above-mentioned second candidate vocabulary.
可选地,用户输入单元107,还用于接收用户对上述第一候选词汇的第二输入;显示单元106,还用于响应于用户输入单元107接收到的第二输入,在输入区域中显示第一候选词汇,并在候选区域中显示与该第一候选词汇关联的目标候选词汇。Optionally, the user input unit 107 is further configured to receive a second input from the user on the above-mentioned first candidate vocabulary; the display unit 106 is further configured to display in the input area in response to the second input received by the user input unit 107 The first candidate word is displayed, and the target candidate word associated with the first candidate word is displayed in the candidate area.
本申请实施例提供的电子设备,电子设备在接收用户通过第一输入法(对应第一语言)输入的目标字符串之后,可以在该目标字符串与第二语言匹配的情况下,基于该第二语言显示该目标字符串对应的第一候选词汇。其中,该第二语言不同于上述第一语言。通过上述方式,在用户切错输入法或者忘记切换输入法的情况下,相比于相关技术中用户需要先触发电子设备切换为正确的输入法,再重新输入目标字符串的方案,本申请中的电子设备可以通过用户输入的目标字符串判断用户想要使用的语言,并向用户展示字符串对应的该语言的 候选词汇供用户选择,无需用户重新输入目标字符串。如此,使得语言输入过程步骤简便,效率高。In the electronic device provided in the embodiment of the present application, after receiving the target character string input by the user through the first input method (corresponding to the first language), the electronic device can, in the case that the target character string matches the second language, based on the first input method (corresponding to the first language) The second language displays the first candidate vocabulary corresponding to the target string. Wherein, the second language is different from the above-mentioned first language. Through the above method, when the user switches the wrong input method or forgets to switch the input method, compared with the solution in the related art in which the user needs to trigger the electronic device to switch to the correct input method first, and then re-enter the target string, in the present application The electronic device can determine the language that the user wants to use through the target character string input by the user, and display the candidate vocabulary of the language corresponding to the character string to the user for the user to choose, without the need for the user to re-enter the target character string. In this way, the steps of the language input process are simple and efficient.
应理解的是,本申请实施例中,输入单元104可以包括图形处理器(Graphics Processing Unit,GPU)1041和麦克风1042,图形处理器1041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元106可包括显示面板1061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板1061。用户输入单元107包括触控面板1071以及其他输入设备1072。触控面板1071,也称为触摸屏。触控面板1071可包括触摸检测装置和触摸控制器两个部分。其他输入设备1072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器109可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。It should be understood that, in this embodiment of the present application, the input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042. Such as camera) to obtain still pictures or video image data for processing. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and other input devices 1072 . The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts, a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not described herein again. Memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 110 .
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述词汇显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the vocabulary display method can be implemented, and the same can be achieved. In order to avoid repetition, the technical effect will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述词汇显示方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above-mentioned embodiments of the vocabulary display method. Each process can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由 语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (13)

  1. 一种词汇显示方法,所述方法包括:A vocabulary display method, the method includes:
    接收用户通过第一输入法输入的目标字符串,所述第一输入法对应第一语言;receiving a target character string input by a user through a first input method, where the first input method corresponds to a first language;
    在所述目标字符串与第二语言匹配的情况下,基于所述第二语言显示所述目标字符串对应的第一候选词汇,所述第二语言不同于所述第一语言。In the case that the target character string matches a second language, a first candidate vocabulary corresponding to the target character string is displayed based on the second language, the second language being different from the first language.
  2. 根据权利要求1所述的方法,其中,所述接收用户通过第一输入法输入的目标字符串之后,所述方法还包括:The method according to claim 1, wherein after receiving the target character string input by the user through the first input method, the method further comprises:
    基于所述第一语言显示所述目标字符串对应的第二候选词汇。A second candidate vocabulary corresponding to the target character string is displayed based on the first language.
  3. 根据权利要求1所述的方法,其中,所述基于所述第二语言显示所述目标字符串对应的第一候选词汇之后,所述方法还包括:The method according to claim 1, wherein after displaying the first candidate vocabulary corresponding to the target character string based on the second language, the method further comprises:
    显示目标标识,所述目标标识用于指示所述目标字符串还对应第二候选词汇;Displaying a target identifier, the target identifier is used to indicate that the target character string also corresponds to a second candidate vocabulary;
    接收用户对所述目标标识的第一输入;receiving a first input of the target identifier from the user;
    响应于所述第一输入,显示所述第二候选词汇。The second candidate vocabulary is displayed in response to the first input.
  4. 根据权利要求1至3任一项所述的方法,其中,所述基于所述第二语言显示所述目标字符串对应的第一候选词汇之后,所述方法还包括:The method according to any one of claims 1 to 3, wherein after displaying the first candidate vocabulary corresponding to the target character string based on the second language, the method further comprises:
    接收用户对所述第一候选词汇的第二输入;receiving a second input from the user for the first candidate vocabulary;
    响应于所述第二输入,在输入区域中显示所述第一候选词汇,并在候选区域中显示与所述第一候选词汇关联的目标候选词汇。In response to the second input, the first candidate word is displayed in the input area, and the target candidate word associated with the first candidate word is displayed in the candidate area.
  5. 一种词汇显示装置,所述词汇显示装置包括:接收模块和显示模块;A vocabulary display device comprising: a receiving module and a display module;
    所述接收模块,用于接收用户通过第一输入法输入的目标字符串,所述第一输入法对应第一语言;The receiving module is configured to receive a target character string input by a user through a first input method, and the first input method corresponds to a first language;
    所述显示模块,用于在所述接收模块接收到的所述目标字符串与第二语言匹配的情况下,基于所述第二语言显示所述目标字符串对应的第一候选词汇,所述第二语言不同于所述第一语言。The display module is configured to display the first candidate vocabulary corresponding to the target character string based on the second language when the target character string received by the receiving module matches the second language, the The second language is different from the first language.
  6. 根据权利要求5所述的词汇显示装置,其中,The vocabulary display device according to claim 5, wherein,
    所述显示模块,还用于基于所述第一语言显示所述目标字符串对应的第二 候选词汇。The display module is further configured to display the second candidate vocabulary corresponding to the target character string based on the first language.
  7. 根据权利要求5所述的词汇显示装置,其中,The vocabulary display device according to claim 5, wherein,
    所述显示模块,还用于显示目标标识,所述目标标识用于指示所述目标字符串还对应第二候选词汇;The display module is further configured to display a target identifier, where the target identifier is used to indicate that the target character string also corresponds to the second candidate vocabulary;
    所述接收模块,还用于接收用户对所述目标标识的第一输入;The receiving module is further configured to receive the first input of the target identifier by the user;
    所述显示模块,还响应于所述接收模块接收到的所述第一输入,显示所述第二候选词汇。The display module further displays the second candidate vocabulary in response to the first input received by the receiving module.
  8. 根据权利要求5至7任一项所述的词汇显示装置,其中,The vocabulary display device according to any one of claims 5 to 7, wherein,
    所述接收模块,还用于接收用户对所述第一候选词汇的第二输入;The receiving module is further configured to receive a second input of the first candidate vocabulary by the user;
    所述显示模块,还用于响应于所述接收模块接收到的所述第二输入,在输入区域中显示所述第一候选词汇,并在候选区域中显示与所述第一候选词汇关联的目标候选词汇。The display module is further configured to display the first candidate word in the input area in response to the second input received by the receiving module, and display the first candidate word associated with the first candidate word in the candidate area. target candidate vocabulary.
  9. 一种电子设备,其中,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至4中任一项所述的词汇显示方法的步骤。An electronic device, comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being executed by the processor to achieve as claimed in claim 1 Steps of the vocabulary display method described in any one of to 4.
  10. 一种可读存储介质,其中,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至4中任一项所述的词汇显示方法的步骤。A readable storage medium, wherein a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the vocabulary display method according to any one of claims 1 to 4 are implemented .
  11. 一种词汇显示装置,其特征在于,所述装置用于执行如权利要求1至4中任一项所述的词汇显示方法。A vocabulary display device, characterized in that, the device is used to execute the vocabulary display method according to any one of claims 1 to 4.
  12. 一种计算机程序产品,其特征在于,所述程序产品被至少一个处理器执行以实现如权利要求1至4中任一项所述的词汇显示方法。A computer program product, characterized in that the program product is executed by at least one processor to implement the vocabulary display method according to any one of claims 1 to 4.
  13. 一种芯片,其特征在于,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至4中任一项所述的词汇显示方法。A chip, characterized in that the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement any one of claims 1 to 4 The described vocabulary display method.
PCT/CN2021/141629 2020-12-31 2021-12-27 Vocabulary display method and apparatus, and electronic device WO2022143523A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011620509.8A CN112764551A (en) 2020-12-31 2020-12-31 Vocabulary display method and device and electronic equipment
CN202011620509.8 2020-12-31

Publications (1)

Publication Number Publication Date
WO2022143523A1 true WO2022143523A1 (en) 2022-07-07

Family

ID=75698274

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/141629 WO2022143523A1 (en) 2020-12-31 2021-12-27 Vocabulary display method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN112764551A (en)
WO (1) WO2022143523A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764551A (en) * 2020-12-31 2021-05-07 维沃移动通信有限公司 Vocabulary display method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546228A (en) * 2009-05-07 2009-09-30 腾讯科技(深圳)有限公司 Input method and device for realizing English reminding
CN104951099A (en) * 2015-06-16 2015-09-30 北京奇虎科技有限公司 Method and device for showing candidate items based on input method
CN106598266A (en) * 2008-05-19 2017-04-26 上海触乐信息科技有限公司 Multi-language mixed input method and system
CN108897438A (en) * 2018-06-29 2018-11-27 北京金山安全软件有限公司 Multi-language mixed input method and device for hindi
CN111880668A (en) * 2020-06-15 2020-11-03 维沃移动通信有限公司 Input display method and device and electronic equipment
CN112764551A (en) * 2020-12-31 2021-05-07 维沃移动通信有限公司 Vocabulary display method and device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598266A (en) * 2008-05-19 2017-04-26 上海触乐信息科技有限公司 Multi-language mixed input method and system
CN101546228A (en) * 2009-05-07 2009-09-30 腾讯科技(深圳)有限公司 Input method and device for realizing English reminding
CN104951099A (en) * 2015-06-16 2015-09-30 北京奇虎科技有限公司 Method and device for showing candidate items based on input method
CN108897438A (en) * 2018-06-29 2018-11-27 北京金山安全软件有限公司 Multi-language mixed input method and device for hindi
CN111880668A (en) * 2020-06-15 2020-11-03 维沃移动通信有限公司 Input display method and device and electronic equipment
CN112764551A (en) * 2020-12-31 2021-05-07 维沃移动通信有限公司 Vocabulary display method and device and electronic equipment

Also Published As

Publication number Publication date
CN112764551A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
US10489508B2 (en) Incremental multi-word recognition
EP2618248B1 (en) Virtual keyboard providing an indication of received input
EP2987055B1 (en) Text suggestion output using past interaction data
WO2022083750A1 (en) Text display method and apparatus and electronic device
EP2987054B1 (en) Consistent text suggestion output
US20120290291A1 (en) Input processing for character matching and predicted word matching
US10496276B2 (en) Quick tasks for on-screen keyboards
WO2022135474A1 (en) Information recommendation method and apparatus, and electronic device
GB2511431A (en) Character string replacement
US10402474B2 (en) Keyboard input corresponding to multiple languages
WO2014193962A1 (en) Multiple graphical keyboards for continuous gesture input
US8589145B2 (en) Handheld electronic device including toggle of a selected data source, and associated method
EP2909702B1 (en) Contextually-specific automatic separators
WO2022247789A1 (en) Candidate word update method and apparatus, and electronic device
US20110022956A1 (en) Chinese Character Input Device and Method Thereof
WO2022105754A1 (en) Character input method and apparatus, and electronic device
WO2022143523A1 (en) Vocabulary display method and apparatus, and electronic device
US9189158B2 (en) Methods, devices and systems for entering textual representations of words into a computing device by processing user physical and verbal interactions with the computing device
WO2022194207A1 (en) Input method and apparatus, electronic device and readable storage medium
WO2022188805A1 (en) Keyword search method and apparatus, and electronic device
WO2022143341A1 (en) Input method candidate word display method and apparatus, and electronic device
WO2016197273A1 (en) Chinese and japanese kana integrated input method and input method system
CN111966267A (en) Application comment method and device and electronic equipment
CN112685126B (en) Document content display method and device
WO2022135294A1 (en) Candidate word display method and apparatus, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21914259

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21914259

Country of ref document: EP

Kind code of ref document: A1