CN107632717B - Phrase annotation method and electronic equipment - Google Patents

Phrase annotation method and electronic equipment Download PDF

Info

Publication number
CN107632717B
CN107632717B CN201610566062.8A CN201610566062A CN107632717B CN 107632717 B CN107632717 B CN 107632717B CN 201610566062 A CN201610566062 A CN 201610566062A CN 107632717 B CN107632717 B CN 107632717B
Authority
CN
China
Prior art keywords
phrase
user
annotation information
annotation
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610566062.8A
Other languages
Chinese (zh)
Other versions
CN107632717A (en
Inventor
李利平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201610566062.8A priority Critical patent/CN107632717B/en
Publication of CN107632717A publication Critical patent/CN107632717A/en
Application granted granted Critical
Publication of CN107632717B publication Critical patent/CN107632717B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method for annotating phrases, which comprises the following steps: acquiring a first input operation of a user; outputting a first phrase based on a first input operation; acquiring annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second phrase is different from the first phrase; and outputting annotation information near the first phrase. The invention solves the technical problem of complex operation when the user carries out personalized annotation on the phrases in the prior art. Meanwhile, the invention also discloses the electronic equipment.

Description

Phrase annotation method and electronic equipment
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method for annotating phrases and an electronic device.
Background
With the development of electronic technology, more and more intelligent devices (such as computers, smart phones, tablet computers and the like) enter the lives of people, and bring convenience to people. Generally, an input method program is usually installed in the smart device, and a user can use the input method program to quickly and conveniently input characters.
Currently, many users like to annotate phrases individually to implicitly express other or multiple meanings, for example, annotating "happy to hear" as "sang xin big kuang" to implicitly express "funeral mania". However, in the actual input process of the user, the operation is cumbersome and very inconvenient.
Disclosure of Invention
The embodiment of the invention provides a phrase annotation method and electronic equipment, and solves the technical problem of complex operation when a user carries out personalized annotation on phrases in the prior art.
In one aspect, the present invention provides a method for annotating phrases, comprising:
acquiring a first input operation of a user;
outputting a first phrase based on the first input operation;
obtaining annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second word is different from the first phrase;
outputting the annotation information in the vicinity of the first phrase.
Optionally, the second phrase and the first phrase belong to the same language or different languages.
Optionally, before the obtaining of the annotation information corresponding to the first phrase, the method further includes:
detecting whether a first trigger operation of a user exists;
and if the first trigger operation exists, executing the acquisition of the annotation information corresponding to the first phrase.
Optionally, the obtaining of the annotation information corresponding to the first phrase includes:
acquiring the annotation information from a local annotation database; or
Acquiring the annotation information from a server; or
And acquiring the annotation information based on a second input operation of the user.
Optionally, the obtaining the annotation information based on a second input operation of the user includes:
acquiring a second input operation of the user;
determining information input by a user based on the second input operation;
judging whether the information input by the user and the first phrase meet a preset relationship;
and if so, determining the information input by the user as the annotation information.
Optionally, the obtaining the annotation information based on a second input operation of the user includes:
acquiring a second input operation of the user;
determining information input by a user based on the second input operation;
detecting whether a second trigger operation of the user exists;
and if the second trigger operation exists, determining the annotation information from the information input by the user.
Optionally, the second input operation includes:
an input operation by a keyboard; and/or
An input operation by voice.
Optionally, the outputting the annotation information near the first word group includes:
outputting the annotation information in parentheses after the first phrase.
In another aspect, the present invention provides an electronic device, comprising:
a first acquisition unit configured to acquire a first input operation by a user;
a first output unit, configured to output a first phrase based on the first input operation;
a second obtaining unit, configured to obtain annotation information corresponding to the first phrase, where the annotation information is a second phrase or phonetic notation information of the second phrase, and the second word is different from the first phrase;
and the second output unit is used for outputting the annotation information near the first phrase.
In yet another aspect, the present invention provides an electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured for execution by the one or more processors to include instructions for:
acquiring a first input operation of a user; outputting a first phrase based on the first input operation; acquiring annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second word is different from the first phrase; outputting the annotation information in the vicinity of the first phrase.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
in the embodiment of the invention, a method for annotating phrases is disclosed, which comprises the following steps: acquiring a first input operation of a user; outputting a first phrase based on a first input operation; acquiring annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second phrase is different from the first phrase; and outputting annotation information near the first phrase. The invention solves the technical problem of complex operation when the user carries out personalized annotation on the phrases in the prior art, and realizes the technical effect that the user can conveniently and rapidly carry out personalized annotation on the phrases.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flowchart of a method for annotating phrases according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electronic device 200 according to an embodiment of the invention;
fig. 3 is a schematic structural diagram of an electronic device 800 according to an embodiment of the invention;
fig. 4 is a schematic structural diagram of a server in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a phrase annotation method and electronic equipment, and solves the technical problem of complex operation when a user carries out personalized annotation on phrases in the prior art.
In order to solve the technical problems, the embodiment of the invention has the following general idea:
a method of phrase annotation, comprising: acquiring a first input operation of a user; outputting a first phrase based on a first input operation; acquiring annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second phrase is different from the first phrase; and outputting annotation information near the first phrase.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Example one
The present embodiment provides a method for annotation of phrases, as shown in fig. 1, including:
step S101: a first input operation of a user is acquired.
In a specific implementation process, the method for annotating phrases is applied to electronic equipment, and the electronic equipment may be: smart phones, or computers (e.g., desktop computers, notebook computers, tablet computers, all-in-one computers, in-vehicle computers, etc.), or smart televisions, etc.
Further, the main body of the method for annotating the phrase may be an input method application installed in the electronic device.
In a specific implementation process, the electronic device is a desktop computer, a notebook computer or an all-in-one computer, and since the electronic device is usually connected with a mouse and a keyboard, a user can perform a first input operation through the mouse, the keyboard or an external device. Meanwhile, the electronic device can acquire the first input operation of the user through a mouse or a keyboard or an external device.
In a specific implementation process, when the electronic device is a smart phone, a tablet computer, or a vehicle-mounted computer, since such electronic device usually has a touch screen (for example, a capacitive touch screen), a user may perform a first input operation through the touch screen. Meanwhile, the electronic device can acquire a first input operation of the user through the touch screen.
In a specific implementation process, when the electronic device is an intelligent television, since the electronic device is usually provided with a remote controller, a user can perform a first input operation through the remote controller. Meanwhile, the electronic device can acquire a first input operation of the user through the remote controller.
In a specific implementation process, the electronic device may further include a sound collecting device (e.g., a microphone) for collecting a voice of the user, where the user may perform the first input operation in a voice manner (i.e., the first input operation is a voice input operation). Meanwhile, the electronic equipment can acquire the first input operation of the user through the sound acquisition device.
In a specific implementation process, a first input operation executed by a user on the electronic device is used for inputting a first phrase to the electronic device, wherein the first phrase can be Chinese or foreign language, and when the phrase is Chinese, the first phrase can be composed of one Chinese character or a plurality of Chinese characters.
Step S102: and outputting the first phrase based on the first input operation.
In a specific implementation process, when a user uses an input method application program to perform a first input operation on an input area (i.e., an input box) on a screen of an electronic device, a first phrase that the user wants to input may be determined based on the first input operation, and the first phrase may be output into the input area.
For example, when the user inputs the phrase "happy to hear" through the first input operation, the phrase "happy to hear" is displayed in the input area; when the user inputs the phrase 'rational of the word' through the first input operation, the phrase 'rational of the word' is displayed in the input area; when the user inputs the phrase "being clean and clean" through the first input operation, the phrase "being clean and clean" is displayed in the input area.
Step S103: and acquiring annotation information corresponding to the first phrase.
As an optional implementation manner, the annotation information may be: the second phrase or the phonetic information of the second phrase, wherein the second phrase is different from the first phrase, the second phrase may be a synonym or a near-synonym or an antisense of the first phrase, and the second phrase and the first phrase may belong to the same language or different languages.
In a specific implementation process, the number of the second phrase may be the same as or different from the number of the first phrase. When the second phrase and the first phrase are in the same language, taking a Chinese phrase as an example, the number of the Chinese characters of the second phrase and the number of the Chinese characters of the first phrase can be the same or different; taking english phrases as an example, the number of words in the second phrase may be the same as or different from the number of words in the first phrase. When the second phrase and the first phrase are different languages, the first phrase is taken as a chinese phrase, the second phrase is taken as an english phrase as an example, and the number of the chinese characters of the first phrase and the number of the words of the second phrase may be the same or different.
In a specific implementation process, based on the first phrase, the phonetic notation information corresponding to the first phrase may be obtained, where the phonetic notation information is actually not the phonetic notation information of the first phrase, but is the phonetic notation information of a second phrase different from the first phrase. The phonetic notation information is used for annotating the first phrase so that the first phrase has the meaning of the second phrase, thereby expressing multiple meanings of the user (or actually expressing the meaning of the second phrase). Among them, for example: the first phrase may be a Chinese phrase and the phonetic notation information may be a Chinese pinyin.
For example, when the user inputs the phrase "happy," the user also wants to express the meaning of "funeral mania" implicitly through the phrase, so the user can use the phonetic notation information of "funeral mania" (namely, "hong xin bing kuang" or "s hong x ī n b huang ku a ng") to personalize the "funeral mania", thereby expressing the meaning of "funeral mania" implicitly through the phrase "funeral" and politeness.
For example, when the user inputs the phrase "rational of words", the user actually wants to express the meaning of "big surprise monster", but the user does not want to directly input "big surprise monster", but wants to express his/her actual idea in an implied manner, so the user can use the phonetic information of "big surprise monster" (i.e. "da jong xiao guai" or "d j ī ng x ǐ ao gu i") to perform personalized annotation on the phrase "rational of words", thereby expressing the meaning of "big surprise monster" in an implied manner through the phrase "rational of words".
For example, when the user inputs the phrase "clean and cheap", the user actually wants to express the meaning of "foul corruption", but the user does not want to directly input "foul corruption", but wants to express the actual idea of the user in an implied manner, so the phrase "clean and cheap" can be individually annotated by using the phonetic notation information of "foul corruption" (namely, "tan wu fu bai" or "t ā n w ug ǔ b ai"), and the meaning of "foul corruption" is expressed in an implied manner by the phrase "clean and cheap".
In addition, the first phrase may be directly annotated with the second phrase, so that the user's multiple meanings (or the meanings of the second phrase) may be expressed more directly. For example, annotating "happy and happy with" funeral mania ", annotating" rational with "big surprise and little strange", annotating "fair and clean" with "spoily and dirty", etc. are used directly.
In the above example, the second phrase and the first phrase both belong to the same language (e.g., Chinese), but in practice, the second phrase and the first phrase may belong to different languages, respectively. For example: the English phrase "off one's roller" is used for annotating "happy and happy", the "fair" is used for annotating "Make a music", the "fair and cheap" is used for annotating "corrupting", and the like.
In addition, the second phrase may be a synonym, or an antisense, or the like, of the first phrase.
As an optional implementation manner, before step S103, the method further includes: detecting whether a first trigger operation of a user exists; if the first trigger operation exists, step S103 is executed.
In the specific implementation process, the first triggering operation may be, for example, that the user triggers a preset key on the keyboard, or that the user inputs a preset password (e.g., "comment") in a voice manner, or that the user presses the first word group for a long time, and so on. When the electronic device detects the first trigger operation, step S103 is executed, and the personalized annotation function may be enabled to perform personalized annotation on the first phrase.
As an alternative implementation, in step S103, there may be the following three implementations:
first, annotation information is acquired based on a second input operation by the user. Namely: the user can manually input the annotation information through the second input operation, so that personalized annotation is performed on the first phrase.
In a specific implementation process, the electronic device may determine information input by the user based on the second input operation, and determine whether the information input by the user and the first phrase satisfy a preset relationship; and if so, determining the information input by the user as the annotation information corresponding to the first phrase. The preset relationship may be a synonym relationship, an antisense relationship, or the like. For example: when a user wants to perform personalized annotation on ' good and clean ' by ' corruption and pollution ', the user firstly inputs a phrase ' happy and happy ', continues to input ' good and clean ', and electronic equipment detects that ' good and clean ' and ' corruption and ' pollution ' meet the relation of an antisense word, and then determines ' corruption and pollution ' as annotation information corresponding to ' good and clean '.
In addition, the electronic device may further obtain a second input operation of the user, determine information input by the user based on the second input operation, detect whether a second trigger operation of the user exists, and determine annotation information corresponding to the first phrase from the information input by the user if the second trigger operation exists. For example: when a user wants to perform personalized annotation on a word "reasonable to say" by using a "big surprise and little monster", the user inputs the word "reasonable to say" first, then the user continues to input the "big surprise and little monster", after the input is finished, the user executes a second trigger operation (for example, pressing the "big surprise and little monster" for a long time, or continuously clicking the "big surprise and little monster" for three times, or inputting the "annotation" in a voice mode, and the like), and if the electronic equipment detects the second trigger operation, the "big surprise and little monster" is taken as annotation information of the "reasonable to say".
In addition, the electronic device may further obtain a second input operation of the user, and determine whether the content input by the user is a preset character string based on the second input operation, for example, the preset character string may be composed of pinyin letters, and if so, obtain the preset character string, and use the preset character string as the annotation information corresponding to the first phrase. For example: when a user wants to perform personalized annotation on the phrase "cheerful" by using the phonetic notation information of "funeral mania", the user firstly inputs the phrase "cheerful", then executes the first trigger operation, starts the function of the first phrase, continues to input the character string "sang xin bing kuang" or "s ng x ī n b ng ku ling", and when the electronic equipment detects that the content input by the user is a preset character string consisting of pinyin letters, extracts the character string "sang xin bing kuang" or "s ng x ī n b ng ku ng" and takes the preset character string as annotation information corresponding to the phrase "cheerful".
Second, annotation information is obtained from a server.
In a specific implementation process, a comment database may be stored on the server, where a large number of phrases and comment information corresponding to each phrase are stored. For example: the phrase "happy and happy" corresponds to the phrase "funeral and mad" or its phonetic information (i.e. "sang xin binding kuang" or "s ng x ī n b ng ku ng"), the phrase "rational" corresponds to the phrase "surprise little strange" or its phonetic information (i.e. "da jong xiao guai" or "d j ī ng x ǐ ao guai"), and the phrase "qingzhengjie" corresponds to the phrase "greedy" or its phonetic information (i.e. "tan wu fubai" or "t ā n w f ǔ b i"). When the first phrase is detected to be 'happy', acquiring corresponding annotation information 'bereaved heart disease madness' or 'sang xin bing kuang' or's ang x ī n b wen ku' ng from the server; when the first phrase is detected to be "rational in words", the corresponding annotation information "surprise monster" or "da jing ao guai" or "d a j ī ng x ǐ ao gu i" is acquired from the server; when the first phrase is detected to be "pure and clean", the corresponding annotation information "corruption" or "tan wu fu bai" or "t ā n w g f ǔ b aii" is acquired from the server.
In a specific implementation process, the server can collect personalized annotation information popular with users into the annotation database by counting personalized annotation operations of a large number of users.
For example, when it is counted that more than a certain proportion of users like to personally annotate the phrase "cheerful" with "funeral psychoses" or "sang xin bing kuang" or "s ang x ī n b xu ng" the "cheerful" is associated with "funeral psychoses" or "sang xin bing kuang" or "s ang x ī n b xu king" and collected into an annotation database. When the user needs to perform personalized annotation on the phrase "happy and happy", the electronic equipment acquires corresponding annotation information "funeral and sick" or "sang xin big kuang" or "s ang x ī n b hanging ku ng" from the server.
Here, the electronic device can automatically obtain the annotation information corresponding to the first phrase at the server without a second input operation by the user, which simplifies the operation of the user and achieves the technical effect that the user can conveniently and quickly perform personalized annotation on the phrase.
Third, annotation information is retrieved from a local annotation database.
In a specific implementation process, a comment database may be preset locally on the electronic device, where a large number of phrases and comment information corresponding to each phrase are stored. For example: the phrase "joyful see" corresponds to the phrase "funeral cardinal disease" or its phonetic information (i.e., "hong xin binding kuang" or "s ng x ī n b ng ku ng"), the phrase "rational" corresponds to the phrase "surprise little monster" or its phonetic information (i.e., "da jong xiao guai" or "d j ī ng x ǐ ao guai"), and the phrase "Qingzhen Lijie" corresponds to the phrase "greedy" or its phonetic information (i.e., "tan wu fubai" or "t ā n w corruption ǔ b i"); when the first phrase is detected to be ' happy and happy ', corresponding annotation information ' funeral mania ' or ' sang xin big kuang ' or's ng x ī n b mu ng ku ' ng ' is obtained in a local annotation database; when the first phrase is detected to be "rational in words", corresponding annotation information "surprise or" da jin xiao guai "or" d j ī ng x ǐ ao gu i "is obtained in the local annotation database; when the first phrase is detected to be "sound quality and good quality", the corresponding annotation information "greedy corruption" or "tan wu fu bai" or "t ā n w g ǔ b ai" is acquired in the local annotation database.
In a specific implementation process, the server can collect personalized annotation information popular with a user into the annotation database by counting personalized annotation operations of a large number of users, and provide the annotation database for the electronic equipment.
For example, when it is counted that more than a certain proportion of users like to personally annotate the phrase "happy news" with "sang xin bing kuang" or "s ang x ī n b uin ku ng", the "happy news" is associated with "sang xin bing kuang" or "s ang x ī n b uin ku ng" and collected in an annotation database and periodically updated to the electronic device.
Here, the electronic device can automatically obtain the annotation information corresponding to the first phrase from the local annotation database without performing a second operation by the user, which simplifies the operation of the user and achieves the technical effect that the user can perform personalized annotation on the phrase conveniently and quickly.
Step S104: and outputting annotation information near the first phrase.
In a specific implementation, the annotation information may be output directly after the first phrase. For example, "the shang-wen-xin binding kuang", or "the shang-wen-s-ang x ī n b mu-ng-ku-ng".
In a specific implementation, the annotation information may also be output after the first phrase in a different color than the first phrase, and so on. For example: when the 'funny mania' is used for carrying out personalized annotation on the 'funny mania', the 'funny mania' is output, wherein the 'funny' can be a black font, and the 'funny' can be a red font.
In particular implementations, the annotation information may be output in parentheses following the first phrase. Taking the first phrase as "happy to see" and the second phrase as "funeral to catch heart" as an example, the first phrase can output "happy to see (sang xin bing kuang)", or "happy to see (s a ng x ī n b mu ng ku a)" or "happy to see (funeral to catch heart)".
In a specific implementation process, when the number of the second phrase is the same as that of the first phrase, each Chinese character of the second phrase can also be sequentially output in brackets behind each Chinese character of the first phrase. Taking the first phrase as the pleasure to hear and see and the second phrase as the funeral mania, the method can output the pleasure to hear and the pleasure to see.
In a specific implementation process, when the number of the second phrase is the same as that of the first phrase, the phonetic notation information corresponding to each Chinese character in the first phrase may also be determined based on the phonetic notation information of the second phrase, and the phonetic notation information corresponding to each Chinese character is output in the parentheses behind each Chinese character in the first phrase.
Taking the first phrase as "liking and hearing see" and the second phrase as "treating heart disease madness", the first phrase can output "liking (sang) and hearing (xin) and hearing (bing) see (kuang)", or output "liking(s) and hearing (x ī n) see (b mu) ng" and eating (ku' ng).
Taking the first phrase as "rational word", the second phrase as "big surprise", for example, the words (da) (jin) with (xiao) word (guai) "or" d (d) with (j ī ng) with (x ǐ ao) word (guai) "can be output.
The electronic equipment can automatically output the phonetic notation information corresponding to each Chinese character in the first phrase in the parentheses behind the Chinese character, the user does not need to continuously switch the cursor position, the user does not need to input the parentheses, the operation of the user is simplified, and the technical effect that the user can conveniently and quickly perform personalized annotation on the phrase is achieved.
The technical scheme in the embodiment of the invention at least has the following technical effects or advantages:
in the embodiment of the invention, a method for annotating phrases is disclosed, which comprises the following steps: acquiring a first input operation of a user; outputting a first phrase based on a first input operation; acquiring annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second phrase is different from the first phrase; and outputting annotation information near the first phrase. The invention solves the technical problem of complex operation when the user carries out personalized annotation on the phrases in the prior art, and realizes the technical effect that the user can conveniently and rapidly carry out personalized annotation on the phrases.
Example two
Based on the same inventive concept, the present embodiment provides an electronic device 200, as shown in fig. 2, including:
a first acquisition unit 201 for acquiring a first input operation by a user;
a first output unit 202, configured to output a first phrase based on a first input operation;
a second obtaining unit 203, configured to obtain annotation information corresponding to the first phrase, where the annotation information is a second phrase or phonetic notation information of the second phrase, and the second word is different from the first phrase;
and a second output unit 204, configured to output annotation information near the first phrase.
As an alternative embodiment, the second phrase and the first phrase belong to the same language or different languages.
As an optional implementation, the electronic device 200 further includes: the detection unit is used for detecting whether a first trigger operation of a user exists before the annotation information corresponding to the first phrase is acquired; and if the first trigger operation exists, acquiring annotation information corresponding to the first phrase.
As an optional implementation manner, the second obtaining unit 203 is specifically configured to: obtaining annotation information from a local annotation database; or obtaining the annotation information from the server; or acquiring the annotation information based on a second input operation of the user.
As an optional implementation manner, the second obtaining unit 203 is specifically configured to: acquiring a second input operation of the user; determining information input by the user based on the second input operation; judging whether the information input by the user and the first phrase meet a preset relationship; and if so, determining the information input by the user as the annotation information.
As an optional implementation manner, the second obtaining unit 203 is specifically configured to: acquiring a second input operation of the user; determining information input by the user based on the second input operation; detecting whether a second trigger operation of the user exists; and if the second trigger operation exists, determining the comment information from the information input by the user.
As an alternative embodiment, the second input operation includes: an input operation by a keyboard; and/or an input operation by voice.
As an optional implementation manner, the second output unit 204 is specifically configured to: annotation information is output in parentheses after the first phrase.
Since the electronic device described in this embodiment is an electronic device used for implementing the method for annotating a phrase in the embodiment of the present invention, a person skilled in the art can understand the specific implementation manner of the electronic device of this embodiment and various variations thereof based on the method for annotating a phrase in the embodiment of the present invention, and therefore, how to implement the method in the embodiment of the present invention by the electronic device is not described in detail herein. Electronic devices used by those skilled in the art to implement the method for annotating phrases in embodiments of the present invention are all within the scope of the present invention.
The technical scheme in the embodiment of the invention at least has the following technical effects or advantages:
in an embodiment of the present invention, an electronic device is disclosed, including: a first acquisition unit configured to acquire a first input operation by a user; the first output unit is used for outputting a first phrase based on a first input operation; the second obtaining unit is used for obtaining annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or the phonetic notation information of the second phrase, and the second word is different from the first phrase; and the second output unit is used for outputting the annotation information near the first phrase. The invention solves the technical problem of complex operation when the user carries out personalized annotation on the phrases in the prior art, and realizes the technical effect that the user can conveniently and rapidly carry out personalized annotation on the phrases.
With regard to the electronic device in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 3 is a block diagram illustrating an electronic device 800 according to an example embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 can also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of phrase annotation, the method comprising: acquiring a first input operation of a user; outputting a first phrase based on the first input operation; obtaining annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second word is different from the first phrase; outputting the annotation information in the vicinity of the first phrase.
Fig. 4 is a schematic structural diagram of a server in an embodiment of the present invention. The server 1900 may vary widely by configuration or performance and may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input/output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (14)

1. A method for annotating phrases, comprising:
acquiring a first input operation of a user;
outputting a first phrase based on the first input operation;
acquiring annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second phrase is different from the first phrase; the annotation information is used for annotating the first phrase, so that the first phrase has the meaning of the second phrase, and the multiple meanings of the user are expressed or the meaning of the second phrase is actually expressed; the second phrase and the first phrase belong to the same language or different languages;
outputting the annotation information in the vicinity of the first phrase;
the outputting the annotation information in the vicinity of the first phrase includes:
outputting the annotation information directly behind the first phrase; or,
outputting the annotation information in a color different from the first phrase after the first phrase; or,
outputting the annotation information in parentheses after the first phrase; or,
if the first phrase and the second phrase are Chinese, and the number of the second phrase is the same as that of the first phrase, sequentially outputting each Chinese character of the second phrase in brackets behind each Chinese character of the first phrase; or,
if the first phrase and the second phrase are Chinese characters and the number of the second phrase is the same as that of the first phrase, determining phonetic notation information corresponding to each Chinese character in the first phrase based on the phonetic notation information of the second phrase, and outputting the phonetic notation information corresponding to each Chinese character in parentheses behind each Chinese character in the first phrase.
2. The method for phrase annotation of claim 1, wherein before obtaining annotation information corresponding to the first phrase, further comprising:
detecting whether a first trigger operation of a user exists;
and if the first trigger operation exists, executing the acquisition of the annotation information corresponding to the first phrase.
3. The method for annotating phrases according to any one of claims 1 to 2, wherein the obtaining of annotation information corresponding to the first phrase comprises:
acquiring the annotation information from a local annotation database; or
Acquiring the annotation information from a server; or
And acquiring the annotation information based on a second input operation of the user.
4. The method for phrase annotation of claim 3, wherein the obtaining of the annotation information based on a second input operation by the user comprises:
acquiring a second input operation of the user;
determining information input by a user based on the second input operation;
judging whether the information input by the user and the first phrase meet a preset relation or not;
and if so, determining the information input by the user as the annotation information.
5. The method for phrase annotation of claim 3, wherein the obtaining of the annotation information based on a second input operation by the user comprises:
acquiring a second input operation of the user;
determining information input by a user based on the second input operation;
detecting whether a second trigger operation of the user exists;
and if the second trigger operation exists, determining the annotation information according to the information input by the user.
6. The method of phrase annotation of claim 3, wherein the second input operation comprises:
an input operation by a keyboard; and/or
An input operation by voice.
7. An electronic device, comprising:
a first acquisition unit configured to acquire a first input operation by a user;
a first output unit, configured to output a first phrase based on the first input operation;
a second obtaining unit, configured to obtain annotation information corresponding to the first phrase, where the annotation information is a second phrase or phonetic notation information of the second phrase, and the second phrase is different from the first phrase; the annotation information is used for annotating the first phrase, so that the first phrase has the meaning of the second phrase, and the multiple meanings of the user are expressed or the meaning of the second phrase is actually expressed; the second phrase and the first phrase belong to the same language or different languages;
a second output unit configured to output the annotation information near the first phrase;
the second output unit is specifically configured to:
outputting the annotation information directly behind the first phrase; or,
outputting the annotation information in a color different from the first phrase after the first phrase; or,
outputting the annotation information in parentheses after the first phrase; or,
if the first phrase and the second phrase are Chinese, and the number of the second phrase is the same as that of the first phrase, sequentially outputting each Chinese character of the second phrase in brackets behind each Chinese character of the first phrase; or,
if the first phrase and the second phrase are Chinese characters and the number of the second phrase is the same as that of the first phrase, determining phonetic notation information corresponding to each Chinese character in the first phrase based on the phonetic notation information of the second phrase, and outputting the phonetic notation information corresponding to each Chinese character in parentheses behind each Chinese character in the first phrase.
8. The electronic device of claim 7, further comprising:
the detection unit is used for detecting whether a first trigger operation of a user exists before the annotation information corresponding to the first phrase is acquired; and if the first trigger operation exists, acquiring annotation information corresponding to the first phrase.
9. The electronic device according to any one of claims 7 to 8, wherein the second obtaining unit is specifically configured to:
obtaining annotation information from a local annotation database; or obtaining the annotation information from the server; or acquiring the annotation information based on a second input operation of the user.
10. The electronic device of claim 9, wherein the second obtaining unit is specifically configured to:
acquiring a second input operation of the user; determining information input by the user based on the second input operation; judging whether the information input by the user and the first phrase meet a preset relationship; and if so, determining the information input by the user as the annotation information.
11. The electronic device of claim 9, wherein the second obtaining unit is specifically configured to:
acquiring a second input operation of the user; determining information input by the user based on the second input operation; detecting whether a second trigger operation of the user exists; and if the second trigger operation exists, determining the annotation information according to the information input by the user.
12. The electronic device of claim 9, wherein the second input operation comprises:
an input operation by a keyboard; and/or an input operation by voice.
13. An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs including instructions for:
acquiring a first input operation of a user; outputting a first phrase based on the first input operation; acquiring annotation information corresponding to the first phrase, wherein the annotation information is a second phrase or phonetic notation information of the second phrase, and the second phrase is different from the first phrase; the annotation information is used for annotating the first phrase, so that the first phrase has the meaning of the second phrase, and the multiple meanings of the user are expressed or the meaning of the second phrase is actually expressed; the second phrase and the first phrase belong to the same language or different languages; outputting the annotation information in the vicinity of the first phrase;
the outputting the annotation information in the vicinity of the first phrase includes:
outputting the annotation information directly behind the first phrase; or,
outputting the annotation information in a color different from the first phrase after the first phrase; or,
outputting the annotation information in parentheses after the first phrase; or,
if the first phrase and the second phrase are Chinese, and the number of the second phrase is the same as that of the first phrase, sequentially outputting each Chinese character of the second phrase in brackets behind each Chinese character of the first phrase; or,
if the first phrase and the second phrase are Chinese characters and the number of the second phrase is the same as that of the first phrase, determining phonetic notation information corresponding to each Chinese character in the first phrase based on the phonetic notation information of the second phrase, and outputting the phonetic notation information corresponding to each Chinese character in parentheses behind each Chinese character in the first phrase.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, is adapted to carry out the method steps of any of claims 1 to 6.
CN201610566062.8A 2016-07-18 2016-07-18 Phrase annotation method and electronic equipment Active CN107632717B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610566062.8A CN107632717B (en) 2016-07-18 2016-07-18 Phrase annotation method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610566062.8A CN107632717B (en) 2016-07-18 2016-07-18 Phrase annotation method and electronic equipment

Publications (2)

Publication Number Publication Date
CN107632717A CN107632717A (en) 2018-01-26
CN107632717B true CN107632717B (en) 2022-06-24

Family

ID=61112927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610566062.8A Active CN107632717B (en) 2016-07-18 2016-07-18 Phrase annotation method and electronic equipment

Country Status (1)

Country Link
CN (1) CN107632717B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063367A (en) * 2013-03-21 2014-09-24 株式会社东芝 Annotation search apparatus, method and program
CN104182469A (en) * 2014-07-25 2014-12-03 北京搜狗科技发展有限公司 Method for annotating document and input system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8700389B2 (en) * 2010-12-23 2014-04-15 Sap Ag Systems and methods for model-based processing of linguistic user inputs using annotations

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104063367A (en) * 2013-03-21 2014-09-24 株式会社东芝 Annotation search apparatus, method and program
CN104182469A (en) * 2014-07-25 2014-12-03 北京搜狗科技发展有限公司 Method for annotating document and input system

Also Published As

Publication number Publication date
CN107632717A (en) 2018-01-26

Similar Documents

Publication Publication Date Title
US10936798B2 (en) Text editing method, device, and electronic apparatus
CN107153541B (en) Browsing interaction processing method and device
JP6321296B2 (en) Text input method, apparatus, program, and recording medium
CN106469054B (en) Notification message control method and device and terminal
WO2017161811A1 (en) Method and device for multimedia adjustment and mobile device
CN106415527B (en) Information communication method and device
CN108803891B (en) Information display method and device, electronic equipment and storage medium
CN104133623A (en) Page zooming method and page zooming device
CN113542886A (en) Video playing method and device for playing video
CN107132927B (en) Input character recognition method and device for recognizing input characters
CN112667124A (en) Information processing method and device and information processing device
CN109145151B (en) Video emotion classification acquisition method and device
CN107632717B (en) Phrase annotation method and electronic equipment
CN108108356B (en) Character translation method, device and equipment
CN109213556B (en) Display method and device
CN109753205B (en) Display method and device
WO2017166635A1 (en) Method, device, and mobile apparatus for creating contact
CN111092971A (en) Display method and device for displaying
CN112015281A (en) Cloud association method and related device
CN110399045A (en) A kind of input method and device
CN112486603A (en) Interface adaptation method and device for adapting interface
CN113312475B (en) Text similarity determination method and device
CN111880696B (en) Encyclopedic-based data processing method and device
CN113221582B (en) Translation processing method and device for translation processing
CN111460836B (en) Data processing method and device for data processing

Legal Events

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