IP Library Granted Patent US 12,412,049
Granted Patent B2
US 12,412,049 · App. 17/533,797 · Granted Sep 9, 2025

Method, apparatus and electronic device for determining word representation vector

Inventors: Wenbo Yuan (Beijing, CN); Yuxing Zheng (Beijing, CN); Song Liu (Beijing, CN)
Assignee: SAMSUNG ELECTRONICS CO., LTD.
G06F40/53G06F40/279G06F40/47G06F40/55
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,412,049
App. No.
17/533,797
Granted
Sep 9, 2025
Kind
B2
Abstract

Embodiments of the present disclosure provide a method, an apparatus and an electronic device for determining a word representation vector, and a computer-readable storage medium, which belong to a field of processing natural languages. The method includes obtaining a set of glyph units of a text; obtaining a context vector of the text based on the set of glyph units; and predicting next word of the text based on the context vector. The method for determining the word representation vector of the present disclosure can effectively obtain a corresponding set of glyph units even for hieroglyphics in which hyperbolic characters are prone to appear or languages evolved from the hieroglyphics, thereby improving an accuracy of determining the word representation vector.

Claims (95)

1. A method for inputting text on an electronic device, the method comprising:

displaying a user interface including a virtual keyboard, a suggestion area, and an input field;

obtaining at least one word from a user input that is received through the virtual keyboard;

inputting the at least one word into a language model that performs:

splitting the at least one word into at least one character;

obtaining glyph units of the at least one word by splitting the at least one character into the glyph units;

obtaining a word representation vector of the at least one word based on a word-level feature vector of the at least one word, a character-level feature vector of the at least one character, and glyph-level features vectors of the glyph units; and

providing a predictive word or a predictive character corresponding to the word representation vector;

outputting the predictive word or the predictive character from the language model;

displaying the predictive word or the predictive character in the suggestion area of the user interface; and

based on the predictive word or the predictive character being selected from the suggestion area, displaying the predictive word or the predictive character in the input field of the user interface,

wherein the obtaining the word representation vector of the at least one word comprises:

obtaining the character-level feature vector by obtaining lookup table glyph-level features vectors and a lookup table character-level feature vector from a lookup table, applying an attention-based feature extraction method to the lookup table glyph-level features vectors to obtain an extracted character-level feature vector, and fusing the lookup table character-level feature vector with the extracted character-level feature vector to obtain the character-level feature vector.

2. The method according to claim 1 , wherein the obtaining the word representation vector of the at least one word comprises:

obtaining the character-level feature vector corresponding to the at least one character in the at least one word based on the glyph-level features vectors; and

obtaining the word representation vector of the at least one word based on the character-level feature vector corresponding to the at least one character of the at least one word.

3. The method according to claim 2 , wherein the obtaining the character-level feature vector comprises:

obtaining a first character feature vector of the at least one character in the at least one word;

obtaining a second character feature vector corresponding to the at least one character in the at least one word based on the glyph-level features vectors; and

obtaining the character-level feature vector corresponding to the at least one character based on the first character feature vector and the second character feature vector.

4. The method according to claim 3 , wherein the obtaining the first character feature vector comprises:

looking up the first character feature vector corresponding to the at least one character in the at least one word; and

setting the first character feature vector to a preset character feature vector when the first character feature vector corresponding to the at least one character is not found in a vocabulary database.

5. The method according to claim 4 , wherein the obtaining the word representation vector of the at least one word comprises:

obtaining a first word feature vector of the at least one word;

obtaining a second word feature vector of the at least one word based on the character-level feature vector corresponding to the at least one character; and

obtaining the word representation vector of the at least one word based on the first word feature vector and the second word feature vector.

6. The method according to claim 5 , wherein the obtaining the first word representation vector of the at least one word comprises:

looking up the first word feature vector corresponding to the at least one word; and

setting the first word feature vector to a preset word feature vector when the first word feature vector corresponding to the at least one character is not found in the vocabulary database.

7. The method according to claim 6 , wherein the obtaining the second character feature vector comprises:

determining weight coefficients of the glyph units corresponding to the at least one character in the at least one word; and

obtaining the second character feature vector based on the weight coefficients of the glyph units and the glyph-level features vectors corresponding to the at least one character in the at least one word.

8. The method according to claim 7 , wherein the determining the weight coefficients of the glyph units corresponding to the at least one character in the at least one word comprises:

determining an inner product of the glyph-level features vectors and the first character feature vector to obtain initial glyph unit weights of the glyph units; and

determining glyph unit weight coefficients of the glyph units of the at least one character based on the initial glyph unit weights.

9. The method according to claim 8 , wherein the obtaining the character-level feature vector corresponding to the at least one character based on the first character feature vector and the second character feature vector comprises:

performing linear mapping calculation on the first character feature vector to obtain a first character weight coefficient of the first character feature vector;

obtaining a second character weight coefficient of the second character feature vector based on the first character weight coefficient; and

obtaining the character-level feature vector of the at least one character based on the first character weight coefficient, the first character feature vector, the second character weight coefficient, and the second character feature vector.

10. The method according to claim 9 , wherein the obtaining the second word feature vector of the at least one word based on the character-level feature vector corresponding to the at least one character comprises:

determining an inner product of the character-level feature vector of the at least one character in the at least one word and the first character feature vector to obtain an initial character weight of the at least one character;

obtaining a character weight coefficient of the at least one character based on the initial character weight; and

obtaining the second word feature vector of the at least one word based on the character weight coefficient of at least one character and the character-level feature vector.

11. The method according to claim 10 , wherein the obtaining the word representation vector of the at least one word based on the first word feature vector and the second word feature vector comprises:

performing linear mapping calculation on the first word feature vector to obtain a first word weight coefficient of the first word feature vector;

obtaining a second word weight coefficient of the second word feature vector based on the first word weight coefficient; and

obtaining the word representation vector of the at least one word based on the first word weight coefficient, the first word feature vector, the second word weight coefficient, and the second word feature vector.

12. The method according to claim 1 , wherein the obtaining the word representation vector comprises:

obtaining a lookup table word-level feature vector of the at least one word, the lookup table character-level feature vector of the at least one character, and the lookup table glyph-level features vectors of the glyph units using the lookup table,

applying the attention-based feature extraction method to the lookup table glyph-level features vectors to obtain the extracted character-level feature vector,

fusing the lookup table character-level feature vector with the extracted character-level feature vector to obtain a fused character-level feature vector,

applying the attention-based feature extraction method to the fused character-level feature vector to obtain an extracted word-level feature vector, and

fusing the extracted word-level feature vector with the lookup table word-level feature vector to obtain the word representation vector.

13. An electronic device, comprising:

a memory configured to store instructions;

a display configured to display a user interface including a virtual keyboard, a suggestion area, and an input field; and

a processor configured to execute the instructions to:

obtain at least one word from a user input that is received through the virtual keyboard;

inputting the at least one word into a language model that performs:

splitting the at least one word into at least one character;

obtaining glyph units of the at least one word by splitting the at least one character into the glyph units;

obtaining a character-level feature vector by obtaining lookup table glyph-level features vectors and a lookup table character-level feature vector from a lookup table, applying an attention-based feature extraction method to the lookup table glyph-level features vectors to obtain an extracted character-level feature vector, and fusing the lookup table character-level feature vector with the extracted character-level feature vector to obtain the character-level feature vector;

obtaining a word representation vector of the at least one word based on a word-level feature vector of the at least one word, the character-level feature vector of the at least one character, and glyph-level features vectors of the glyph units;

providing a predictive word or a predictive character corresponding to the word representation vector; and

outputting the predictive word or a predictive character from the language model;

controlling the user interface to display the predictive word or the predictive character in the suggestion area of the user interface; and

based on the predictive word or the predictive character being selected from the suggestion area, controlling the user interface to display the predictive word or the predictive character in the input field of the user interface.

14. The electronic device of claim 13 , wherein the processor is further configured to:

obtain a first character feature vector of the at least one character in the at least one word;

obtain a second character feature vector corresponding to the at least one character in the at least one word based on the glyph-level features vectors; and

obtain the character-level feature vector corresponding to the at least one character based on the first character feature vector and the second character feature vector.

15. The electronic device of claim 14 , wherein the processor is further configured to:

obtain a first word feature vector and a second word feature vector of the at least one word based on the character-level feature vector corresponding to the at least one character; and

obtain the word representation vector of the at least one word based on the first word feature vector and the second word feature vector.

16. The electronic device of claim 15 , wherein the processor is further configured to:

set the first word feature vector to a preset word feature vector when the first word feature vector corresponding to the at least one character is not found in a vocabulary database;

determine weight coefficients of the glyph units corresponding to the at least one character in the at least one word; and

obtain the second character feature vector based on the weight coefficients of the glyph units and the glyph-level features vectors corresponding to the at least one character in the at least one word.

17. The electronic device of claim 16 , wherein the processor is further configured to:

determine an inner product of the glyph-level features vectors and the first character feature vector to obtain an initial glyph unit weights of the glyph units; and

determine glyph unit weight coefficients of the glyph units of the at least one character based on the initial glyph unit weights.

18. A non-transitory computer-readable storage medium storing a program that is executable by one or more processor to perform a method for inputting text on an electronic device, the method comprising:

displaying a user interface including a virtual keyboard, a suggestion area, and an input field;

obtaining at least one word from a user input that is received through the virtual keyboard;

inputting the at least one word into a language model that performs:

splitting the at least one word into at least one character;

obtaining glyph units of the at least one word by splitting the at least one character into the glyph units;

obtaining a word representation vector of the at least one word based on a word-level feature vector of the at least one word, a character-level feature vector of the at least one character, and glyph-level features vectors of the glyph units; and

providing a predictive word or a predictive character corresponding to the word representation vector,

outputting the predictive word or a predictive character from the language model;

displaying the predictive word or the predictive character in the suggestion area of the user interface; and

based on the predictive word or the predictive character being selected from the suggestion area, displaying the predictive word or the predictive character in the input field of the user interface,

wherein the obtaining the word representation vector of the at least one word comprises:

obtaining the character-level feature vector by obtaining lookup table glyph-level features vectors and a lookup table character-level feature vector from a lookup table, applying an attention-based feature extraction method to the lookup table glyph-level features vectors to obtain an extracted character-level feature vector, and fusing the lookup table character-level feature vector with the extracted character-level feature vector to obtain the character-level feature vector.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 23, 2021
From: YUAN, WENBO; ZHENG, YUXING; LIU, SONG
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 058234/0840 →
Priority Claims (2)
CN 201911244813.4 · Dec 6, 2019 · national
CN 202010609924.7 · Jun 29, 2020 · national
Continuity (2)
Continuation PCTKR2020017766 · Dec 7, 2020
Related Publication 20220083745A1 · Mar 17, 2022
References Cited (23)
US 9329202B2 · Sadeghian Marnani · 2016 [cited by examiner]
US 9384389B1 · Sankaranarayanan et al. · 2016 [cited by applicant]
US 20060069992A1 · Hodder · 2006 [cited by examiner]
US 20100106481A1 · Lo · 2010 [cited by applicant]
US 20110274354A1 · Nijemcevic · 2011 [cited by applicant]
US 20140093161A1 · Oda · 2014 [cited by applicant]
US 20140126812A1 · Chulinin et al. · 2014 [cited by applicant]
US 20140176564A1 · Tang et al. · 2014 [cited by applicant]
US 20150178265A1 · Anderson · 2015 [cited by examiner]
US 20180293228A1 · Tarakji · 2018 [cited by examiner]
US 20190138606A1 · Tu et al. · 2019 [cited by applicant]
US 20200004819A1 · Indenbom · 2020 [cited by examiner]
CN 103714332A · 2014 [cited by applicant]
CN 107608973A · 2018 [cited by applicant]
CN 109902307A · 2019 [cited by applicant]
CN 109992788A · 2019 [cited by applicant]
CN 110263122A · 2019 [cited by applicant]
CN 110334357A · 2019 [cited by applicant]
KR 1020140056260A · 2014 [cited by applicant]
Kim, Yoon et al., “Character-Aware Neural Language Models”, Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence (AAAI—16), Mar. 5, 2016, (https://www.aaai.org/ocs/index.php/AAAI/AAA116/paper/view/124… [cited by applicant]
International Search Report (PCT/ISA/210) issued Mar. 9, 2021 by the International Searching Authority in counterpart International Patent Application No. PCT/KR2020/017766. [cited by applicant]
Written Opinion (PCT/ISA/237) issued Mar. 9, 2021 by the International Searching Authority in counterpart International Patent Application No. PCT/KR2020/017766. [cited by applicant]
Communication dated Jun. 27, 2025 issued by the China National Intellectual Property Administration in Chinese Patent Application No. 202010609924.7. [cited by applicant]