CN107423273B - Text editing method and device - Google Patents

Text editing method and device Download PDF

Info

Publication number
CN107423273B
CN107423273B CN201710321544.1A CN201710321544A CN107423273B CN 107423273 B CN107423273 B CN 107423273B CN 201710321544 A CN201710321544 A CN 201710321544A CN 107423273 B CN107423273 B CN 107423273B
Authority
CN
China
Prior art keywords
word
editing
module
special
operable
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
CN201710321544.1A
Other languages
Chinese (zh)
Other versions
CN107423273A (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201710321544.1A priority Critical patent/CN107423273B/en
Publication of CN107423273A publication Critical patent/CN107423273A/en
Application granted granted Critical
Publication of CN107423273B publication Critical patent/CN107423273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • 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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • 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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • 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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Document Processing Apparatus (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a text editing method, which comprises the following steps: displaying the target text; generating and displaying a plurality of first actionable objects in response to the edit enabling notification of the target text, the first actionable objects including at least one character of the target text; and responding to the editing instruction of the first operable object, and executing the editing operation corresponding to the editing instruction on the first operable object. Therefore, when the user edits the content of the target text, the user can directly select the first operable object to edit the content of the target text, the target text can be edited without complex text selection operation, and the editing operation is simple and convenient.

Description

Text editing method and device
Technical Field
The invention relates to the technical field of computers, in particular to a text editing method and device.
Background
With the popularization of mobile phones, people receive a large amount of text information on portable devices such as mobile phones or tablet computers every day. For example, messages pushed by instant messaging software or other software, web page contents, text news and the like. When people want to edit the interested character content in the text information, the cursor needs to be positioned at the interested character content first, and then the subsequent operation is carried out on the selected character, so that the operation process is complex and the operation is inconvenient.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for text editing, which can solve the problems of complex and inconvenient editing operation process for content in text information in the prior art.
The text editing method provided by the embodiment of the invention is applied to a mobile terminal and comprises the following steps:
displaying the target text;
generating and displaying a plurality of first actionable objects in response to the edit enabling notification of the target text, the first actionable objects including at least one character of the target text;
and responding to the editing instruction of the first operable object, and executing the editing operation corresponding to the editing instruction on the first operable object.
Optionally, the generating and displaying a plurality of first actionable objects further includes:
generating and displaying an editing cursor;
monitoring the moving operation of the editing cursor, wherein the moving operation carries the target position of the editing cursor;
determining whether the target position falls within the first manipulatable object;
if so, adjusting the display position of the first operable object so as to enable the target position to fall outside the first operable object.
Optionally, the method further includes:
monitoring input content of a user;
inserting a plurality of second manipulable objects at a display position of the editing cursor, the second manipulable objects including at least one character of the input content.
Optionally, the displaying the target text specifically includes:
performing word segmentation on the target text to obtain a word segmentation result;
and generating and displaying a plurality of view controls, wherein each view control comprises a word segmentation of the word segmentation result.
Optionally, the generating and displaying a plurality of first operable objects specifically includes:
searching a combined word in the word segmentation result, wherein the combined word comprises at least two single words, or at least one single word and at least one special word, and the special word comprises numbers, symbols and letters;
when the searched combined word only comprises single characters, splitting the combined word into a plurality of single characters;
when the searched combined word comprises single characters and special characters, if the special characters in the combined word continuously appear, splitting the combined word into the single characters and the continuously appearing special characters; if the special characters in the combined word comprise the special characters which appear independently and the special characters which appear continuously, the combined word is divided into single characters, the special characters which appear independently and the special characters which appear continuously; if the special characters in the combined word appear independently, the combined word is divided into single characters and the special characters appearing independently;
and displaying the plurality of first operable objects, wherein each first operable object comprises a non-combined word in the word segmentation result or a split result of a combined word in the word segmentation result, and the non-combined word is a single word or at least one special word.
Optionally, the generating and displaying a plurality of view controls further includes:
splitting at least one of the view controls into a plurality of third actionable objects in response to an edit enable notification for the view control, the third actionable objects including at least one character in the view control;
and responding to the editing instruction of the third operable object, and executing the editing operation corresponding to the editing instruction on the third operable object.
Optionally, the at least one character is any one of a single character, a single-appearing special character and a continuous-appearing special character, and the special character includes numbers, symbols and letters.
The text editing device provided by the embodiment of the invention is applied to a mobile terminal and comprises: the device comprises a display module, a control module and an editing module;
the display module is used for displaying a target text; further for displaying a plurality of first actionable objects, the first actionable objects including at least one character of the target text;
the control module is used for responding to the editing enabling notification of the target text, generating a plurality of first operable objects and controlling the display module to display the plurality of first operable objects;
and the editing module is used for responding to an editing instruction of the first operable object and executing an editing operation corresponding to the editing instruction on the first operable object.
Optionally, the method further includes: a monitoring module, a judging module,
The control module is also used for generating and controlling the display module to display an editing cursor;
the monitoring module is used for monitoring the moving operation of the editing cursor, and the moving operation carries the target position of the editing cursor;
the judging module is used for judging whether the target position falls into the first operable object;
the control module is further configured to adjust the display position of the first operable object to make the target position fall outside the first operable object when the determination result of the determination module is yes.
Optionally, the monitoring module is further configured to monitor input content of a user;
the control module is further configured to insert a plurality of second operable objects at the display position of the editing cursor, where the second operable objects include at least one character of the input content.
Optionally, the display module specifically includes: the word segmentation sub-module and the control generation sub-module;
the word segmentation sub-module is used for segmenting the target text to obtain a word segmentation result;
and the control generation sub-module is used for generating and displaying a plurality of view controls, and each view control comprises a word segmentation of the word segmentation result.
Optionally, the control module specifically includes: searching a sub-module, a splitting sub-module and a display sub-module;
the searching submodule is used for searching a combined word in the word segmentation result, the combined word comprises at least two single words, or at least one single word and at least one special word, and the special word comprises numbers, symbols and letters;
the splitting sub-module is used for splitting the combined word into a plurality of single words when the searched combined word only comprises single words; the method is also used for splitting the combined word into single characters and continuous special characters if the special characters in the combined word continuously appear when the searched combined word comprises the single characters and the special characters; if the special characters in the combined word comprise the special characters which appear independently and the special characters which appear continuously, the combined word is divided into single characters, the special characters which appear independently and the special characters which appear continuously; if the special characters in the combined word appear independently, the combined word is divided into single characters and the special characters appearing independently;
the display sub-module is configured to display the plurality of first operable objects, where each first operable object includes a non-combined word in the word segmentation result or a split result of a combined word in the word segmentation result, and the non-combined word is a single word or at least one special word.
Optionally, the control module is further configured to split at least one view control into a plurality of third actionable objects in response to the notification of the edit enabling of the view control, where the third actionable objects include at least one character in the view control;
and the editing module is also used for responding to an editing instruction of the third operable object and executing an editing operation corresponding to the editing instruction on the third operable object.
Optionally, the at least one character is any one of a single character, a single-appearing special character and a continuous-appearing special character, and the special character includes numbers, symbols and letters.
Compared with the prior art, the invention has at least the following advantages:
in the embodiment of the invention, after the target text is displayed, in response to an editing enabling instruction for the target text, an editing mode is entered, and a plurality of first operable objects are generated and displayed, wherein each first operable object comprises at least one character of the target text. When receiving an editing instruction of a first operable object, executing an editing operation corresponding to the editing instruction on the first operable object. Therefore, in the embodiment of the invention, after the editing mode is entered, the target text is split into the plurality of first operable objects, and when a user edits the content of the target text, the user can directly select the first operable objects to edit the content of the target text, so that the target text can be edited without complex text selection operation, and the editing operation is simple and convenient.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a conventional text editing method;
fig. 2 is a schematic flowchart of a text editing method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a first manipulatable object dodging editing cursor according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating the generation and display of a plurality of first actionable objects according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a plurality of first actionable objects generated and displayed in accordance with an embodiment of the present invention;
fig. 6 is a flowchart illustrating another text editing method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a text editing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The inventor of the present invention finds that the existing text editing methods all implement editing operations such as adding, deleting, copying, cutting, pasting, moving and the like on texts by positioning and moving a cursor. Taking the mobile phone operating system of apple as an example, the user positions the cursor through the function of the text magnifier, as shown in fig. 1. The user needs to accurately position or move the cursor and then edit the text, and the operation is complex. Particularly, when the position of a part of content in a text is adjusted, the text content to be moved needs to be selected and cut by moving a cursor, and then the cut text content is pasted after the cursor is positioned at a target position. Therefore, the existing text editing method not only has a complex operation process, but also needs precise cursor positioning to realize the editing operation of the target text.
To this end, embodiments of the present invention provide a text editing method and apparatus, where text content that a user desires to edit is displayed in the form of a plurality of operable objects, and each operable object includes at least one character of a target text. When a user edits a target text, corresponding editing operation can be directly performed on an operable object, an editing cursor can be directly positioned between the operable objects, the editing operation on the target text can be realized without complicated editing operation, the accurate positioning of the cursor can be realized without complicated operation, and the problems of complicated operation and accurate positioning of the cursor of the existing editing method can be solved.
It should be noted that the text editing method and apparatus provided in the embodiments of the present invention are applied to a mobile terminal, which may be a mobile terminal device (i.e., a touch terminal) with a touch sensing function, such as a touch screen mobile phone, a tablet computer, and other mobile terminals with a touch screen, and the external touch sensed by the mobile terminal device includes but is not limited to single-point or multi-point pressing, single-point or multi-point sliding operation, single-point or multi-point touching, single-point or multi-point pressure touch, touch area sensing, and the like. When the external touch meets the corresponding sensing threshold, the touch terminal can sense the external touch. Of course, the mobile terminal may be another mobile terminal device connected with an operation device (such as a mouse, a keyboard, etc.) and having a display function, and the content displayed on the device can be operated by the operation device.
It should be further noted that the text editing method and apparatus provided in the embodiments of the present invention can be implemented in the case that the mobile terminal runs any application program. The application programs include but are not limited to short messages, web browsing, real-time communication and other programs with text display functions.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
The method comprises the following steps:
referring to fig. 2, this figure is a schematic flowchart of a text editing method according to an embodiment of the present invention.
The text editing method provided by the embodiment comprises the following steps S201-S203.
S201: and displaying the target text.
It will be appreciated that the target text is the text content that the mobile terminal user desires to edit.
S202: in response to the edit enabling notification of the target text, a plurality of first actionable objects are generated and displayed, the first actionable objects including at least one character of the target text.
It is to be understood that the edit initiation notification of the target text is an operation notification triggered when the user desires to perform an editing operation on the target text. And when the editing enabling notification is received, entering an editing mode so that a user can conveniently and rapidly edit the target text. In the editing mode, the target text is split into a plurality of first actionable objects for display, each first actionable object including at least one character of the target text. The user can directly execute editing operations such as copying, cutting, deleting, moving and the like on the first operable object to realize the editing of the target text without complex editing operations.
To facilitate user editing, as an example, the at least one character of the target text is any one of a single character, a special character that appears separately, and a special character that appears in succession, the special character including a number, a symbol, and a letter.
It should be noted that the single character, i.e., the target text, may be a content (e.g., chinese, japanese, korean, etc.) that can represent a meaning by a single character, and each single character in the content is displayed by a first operable object. The number, letter, symbol and the like included in the target text need to be continuously presented to express the content (such as telephone, numerical value, English word, email address and the like) with complete meaning, and the content is integrally displayed by a first operable object; the symbols in the target text may be respectively displayed by one first actionable object.
For example, when the target text is "company phone: 12345678 ", the 6 first actionable objects each including the following are generated and displayed: "male", "driver", "electric", "telephone", ": "," 12345678 ". It should be noted that when the target text includes continuous letters (such as english words) or continuous numbers (such as telephone numbers) or continuous numbers and letters (such as X1) or continuous numbers, symbols and letters (such as email addresses), the editing operation of the user can be facilitated by displaying a first actionable object.
S203: and responding to the editing instruction of the first operable object, and executing the editing operation corresponding to the editing instruction on the first operable object.
It is to be understood that the editing instructions for the first actionable object include, but are not limited to, copy, delete, cut, move, and the like.
In actual operation, when editing a first operable object, a user selects one or more first operable objects to be edited, and then triggers an editing instruction corresponding to a copy, delete or cut operation on the selected first operable objects, so that corresponding operations on the first operable objects can be completed. When the moving operation is performed, the user may directly drag the selected first manipulatable object to a desired position to complete the movement of the first manipulatable object. Obviously, no overlay display may appear between each of the first actionable objects, and the display positions of the remaining first actionable objects are adjusted to avoid the moving first actionable object when moving to move the selected first actionable object to a desired position.
It should be further noted that, when the editing operation such as adding or pasting the target text and the like that needs the editing cursor to position the editing position of the target text, the editing cursor may be directly positioned outside the first operable object or between two first operable objects, and the cursor may be accurately positioned without a complicated process.
In order to ensure that the editing cursor is accurately positioned outside the first operable object or between two first operable objects, in some possible implementations of the present embodiment, the following steps are further included after step S202: generating and displaying an editing cursor; monitoring the moving operation of an editing cursor, wherein the moving operation carries the target position of the editing cursor; judging whether the target position falls within the first operable object; if yes, adjusting the display position of the first operable object to enable the target position to fall outside the first operable object.
It should be noted that the position where the editing cursor is generated may be the beginning or the end of the target text, or may be any position in the middle of the target text.
In actual operation, the first operable object may avoid the movement of the editing cursor, that is, adjust the first operable object near the display position of the editing cursor, and increase the distance between the two first operable objects to make the editing cursor fall between the two first operable objects or outside the first operable objects, as shown in fig. 3 in particular.
In some possible implementation manners of this embodiment, operations of adding text content, such as pasting and inputting, may also be performed on the target text conveniently, and the specific steps are as follows: monitoring input content of a user; inserting a plurality of second operable objects at a display position of an editing cursor, the second operable objects including at least one character of the input content.
The input content of the user can be text content input through a keyboard, and can also be content pasted after text copying or cutting.
Similarly, at least one character of the input content is any one of a single character, a special character which appears independently and a special character which appears continuously, and the special character comprises a number, a symbol and a letter.
It can be understood that after the input content of the user is split into the second operable object to be displayed, the user can continue to perform convenient editing operation on the newly input content in the target text through the editing operation on the second operable object.
In the embodiment of the invention, after the target text is displayed, in response to an editing enabling instruction for the target text, an editing mode is entered, and a plurality of first operable objects are generated and displayed, wherein each first operable object comprises at least one character of the target text. When receiving an editing instruction of a first operable object, executing an editing operation corresponding to the editing instruction on the first operable object. Therefore, in the embodiment of the invention, after the editing mode is entered, the target text is split into the plurality of first operable objects, and when a user edits the content of the target text, the user can directly select the first operable objects to edit the content of the target text, so that the target text can be edited without complex text selection operation, and the editing operation is simple and convenient.
For example, in the embodiment of the present invention, a specific method for generating and displaying a plurality of first actionable objects is specifically shown in fig. 4. It is to be understood that the following is illustrative only and is not intended to limit the invention in any way.
In one example, step S201 specifically includes:
s2011: and performing word segmentation on the target text to obtain a word segmentation result.
S2012: and generating and displaying a plurality of view controls, wherein each view control comprises a word segmentation of the word segmentation result.
Word segmentation refers to the segmentation of a word sequence into a single word, word or named entity, etc. The word segmentation process is a process of recombining continuous character sequences into a single character, word or named entity sequence according to a certain specification. And named entities refer to person names, organization names, place names, and all other entities identified by name. The broader entities also include numbers, dates, currencies, addresses, and the like. For example, "company telephone: the result of the segmentation of 12345678 "may be" company "," telephone ",": "," 12345678 ". The word segmentation result of the target text is displayed in a view control mode, so that a user can select interested contents from the word segmentation result conveniently to perform the next operation.
Then, a plurality of first operable objects are generated and displayed in step S202, specifically including steps S2021-S2023.
S2021: and searching a combined word in the word segmentation result, wherein the combined word comprises at least two single words, or at least one single word and at least one special word, and the special word comprises numbers, symbols and letters.
For example, the combination word may be a chinese phrase, such as "company" or "telephone", or a combination of chinese and number, such as "2017", "shenzhou No. 8", or a combination of chinese and letter, and so on, which are not listed here.
S2022: and splitting each combined word in the word segmentation result to obtain a splitting result of the combined word.
Specifically, when the found combined word only includes a single character, the combined word is split into a plurality of single characters. For example, "company" is split into "public" and "department".
When the searched combined word comprises the single word and the special word, if the special words in the combined word continuously appear, the combined word is divided into the single word and the continuously appearing special words. For example, "2017" is split into "2017" and "year".
If the special characters in the combined word comprise the special characters which appear independently and the special characters which appear continuously, the combined word is divided into single characters, the special characters which appear independently and the special characters which appear continuously. For example, "floor 1, unit 101 room" of No. 1 is divided into "1", "no", "floor", "1", "unit", "101", and "room".
If the special characters in the combined word appear independently, the combined word is divided into single characters and the independent special characters. For example, "A" is split into "A" and "A".
Generally, when a user edits a target text, the user mainly edits a single character in the target text, and therefore, in order to implement a convenient editing operation on the target text, a combined word in a word segmentation result needs to be disassembled, so that the user can edit the single character in the target text. For example, "company" is split into "public" and "department". For the non-combined words in the word segmentation result, such as special characters which appear continuously, the content of the non-combined words cannot be edited by a general user independently, and the non-combined words can be displayed in a first operable object in an integral mode for the user to edit.
S2023: and displaying a plurality of first operable objects, wherein each first operable object comprises a non-combined word in the word segmentation result or a splitting result of the combined word in the word segmentation result, and the non-combined word is a single word or at least one special word.
During actual operation, Chinese in the word segmentation result of the target text can be split into single words, numbers and letters in the word segmentation result are not split, and each first operable object displays one split word segmentation result. Fig. 5 illustrates a plurality of first actionable objects generated corresponding to a target text.
The embodiment of the present invention further provides another text editing method, which can perform convenient editing operation on partial participles in a participle result after performing participle on a target text, and the method specifically includes, as shown in fig. 6, the following steps S601 to S604.
It should be noted that, steps S601 to S602 in this embodiment are the same as steps S2011 to S2012 in the above method embodiment, and are not repeated here.
S603: in response to an edit enable notification for at least one view control, the view control is split into a plurality of third actionable objects, the third actionable objects including at least one character in the view control.
Similar to the edit enabling notification for the target text, the edit of the at least one view control initiates a notification, i.e., an operation notification triggered when the user desires to perform an editing operation on the at least one view control. And when the editing enabling notification is received, entering an editing mode so that a user can conveniently and rapidly edit the content displayed by the at least one view control. In the edit mode, the at least one view control is broken up for display into a plurality of third actionable objects, each third actionable object including at least one character of the at least one view control. The user can directly execute editing operations such as copying, cutting, deleting, moving and the like on the third operable object to realize the editing of the at least one view control without complex editing operations.
It can be understood that the method for generating the third operable object is similar to the method for generating the first operable object, and specifically, reference may be made to the description corresponding to fig. 4, which is not described herein again.
Similarly, at least one character in the view control is any one of a single character, a special character which appears independently and a special character which appears continuously, wherein the special character comprises a number, a symbol and a letter.
S604: and responding to the editing instruction of the third operable object, and executing the editing operation corresponding to the editing instruction on the third operable object.
It can be understood that the editing of the third actionable object is the same as the editing of the first actionable object, and specific description may refer to the foregoing method embodiment, which is not described herein again.
It should be further noted that, when the content of at least one view control is subjected to an editing operation such as adding or pasting, which requires the editing cursor to position the editing position, the editing cursor may be directly positioned outside the third operable object or between two third operable objects. The method for performing editing operations such as adding and pasting the content of the view control and the like requiring the editing cursor to position the editing position is similar to the method for performing editing operations such as adding and pasting the content of the target text and the like requiring the editing cursor to position the editing position, and is not described herein again.
In order to ensure that the editing cursor is accurately positioned outside the first operable object or between two first operable objects, in some possible implementations of the present embodiment, the following step is further included after step S604: generating and displaying an editing cursor; monitoring the moving operation of an editing cursor, wherein the moving operation carries the target position of the editing cursor; determining whether the target position falls within a third actionable object or view control; if so, adjusting the display position of the third operable object or the view control so that the target position falls outside the third operable object or the view control.
In this embodiment, after the word segmentation result of the target text is displayed, in response to the edit enabling notification of the partial word segmentation in the word segmentation result, an edit mode may be entered, and a plurality of third actionable objects may be generated and displayed, where each third actionable object includes at least one character of the partial word segmentation. When an editing instruction for a third actionable object is received, the corresponding editing operation is performed on the third actionable object by performing the editing. Therefore, in the embodiment, the user directly selects the third operable correspondence for editing, and can quickly and conveniently edit part of the content in the target text.
The embodiment of the device is as follows:
referring to fig. 7, this figure is a schematic structural diagram of a text editing apparatus according to an embodiment of the present invention.
The text editing apparatus provided in this embodiment includes: a display module 100, a control module 200 and an editing module 300;
a display module 100 for displaying a target text; and is further configured to display a plurality of first actionable objects including at least one character of the target text.
As one example, the at least one character of the target text is any one of a single character, a special word that appears individually, and a special word that appears in succession, the special word including a number, a symbol, and a letter.
The control module 200 is configured to generate a plurality of first actionable objects and control the display module to display the plurality of first actionable objects in response to the edit enable notification of the target text.
The editing module 300 is configured to, in response to an editing instruction for a first actionable object, perform an editing operation corresponding to the editing instruction on the first actionable object.
In a possible implementation manner of this embodiment, the apparatus further includes: the monitoring module and the judging module;
the control module 200 is further configured to generate and control the display module to display an editing cursor; and the display position of the first operable object is adjusted to enable the target position to fall outside the first operable object when the judgment result of the judgment module is yes.
And the monitoring module is used for monitoring the moving operation of the editing cursor, and the moving operation carries the target position of the editing cursor.
And the judging module is used for judging whether the target position falls into the first operable object.
In a possible implementation manner of this embodiment, the monitoring module is further configured to monitor input content of a user; the control module 200 is further configured to insert a plurality of second manipulable objects at the display position of the editing cursor, where the second manipulable objects include at least one character of the input content.
As one example, the at least one character of the input contents is any one of a single character, a special word that occurs individually, and a special word that occurs in succession, the special word including a number, a symbol, and a letter.
In the embodiment of the invention, after the target text is displayed, in response to an editing enabling instruction for the target text, an editing mode is entered, and a plurality of first operable objects are generated and displayed, wherein each first operable object comprises at least one character of the target text. When receiving an editing instruction of a first operable object, executing an editing operation corresponding to the editing instruction on the first operable object. Therefore, in the embodiment of the invention, after the editing mode is entered, the target text is split into the plurality of first operable objects, and when a user edits the content of the target text, the user can directly select the first operable objects to edit the content of the target text, so that the target text can be edited without complex text selection operation, and the editing operation is simple and convenient.
The following illustrates a specific method for generating and displaying a plurality of first actionable objects according to an embodiment of the present invention.
In a possible implementation manner of this embodiment, the display module 100 specifically includes: the word segmentation sub-module and the control generation sub-module;
and the word segmentation sub-module is used for segmenting the target text to obtain a word segmentation result.
And the control generation sub-module is used for generating and displaying a plurality of view controls, and each view control comprises a word segmentation of the word segmentation result.
In a possible implementation manner of this embodiment, the control module 200 specifically includes: searching a sub-module, a splitting sub-module and a display sub-module;
and the searching sub-module is used for searching a combined word in the word segmentation result, wherein the combined word comprises at least two single words, or at least one single word and at least one special word, and the special word comprises numbers, symbols and letters.
The splitting sub-module is used for splitting the combined word into a plurality of single words when the searched combined word only comprises single words; the method is also used for splitting the combined word into single characters and continuous special characters if the special characters in the combined word continuously appear when the searched combined word comprises the single characters and the special characters; if the special characters in the combined word comprise the special characters which appear independently and the special characters which appear continuously, the combined word is divided into single characters, the special characters which appear independently and the special characters which appear continuously; if the special characters in the combined word appear independently, the combined word is divided into single characters and the independent special characters.
And the display sub-module is used for displaying a plurality of first operable objects, each first operable object comprises a non-combined word in the word segmentation result or a splitting result of the combined word in the word segmentation result, and the non-combined word is a single word or at least one special word.
The embodiment of the present invention further provides another text editing apparatus, which can perform convenient editing operation on part of the participles in the participle result after performing the participle on the target text, and specifically:
the control module 200 is further configured to split the at least one view control into a plurality of third actionable objects in response to the edit enable notification for the view control, the third actionable objects including at least one character in the view control.
As one example, the at least one character in the view control is any one of a single character, a separately occurring special word, and a consecutively occurring special word, the special word including a number, a symbol, and a letter.
The editing module 300 is further configured to, in response to an editing instruction for a third actionable object, perform an editing operation corresponding to the editing instruction on the third actionable object.
In this embodiment, after the word segmentation result of the target text is displayed, in response to the edit enabling notification of the partial word segmentation in the word segmentation result, an edit mode may be entered, and a plurality of third actionable objects may be generated and displayed, where each third actionable object includes at least one character of the partial word segmentation. When an editing instruction for a third actionable object is received, the corresponding editing operation is performed on the third actionable object by performing the editing. Therefore, in the embodiment, the user directly selects the third operable correspondence for editing, and can quickly and conveniently edit part of the content in the target text.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant part can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner. Although the present invention has been described with reference to the preferred embodiments, it is not intended to be limited thereto. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

Claims (10)

1. A text editing method is applied to a mobile terminal and comprises the following steps:
displaying a target text, segmenting words of the target text to obtain a segmentation result, and generating and displaying a plurality of view controls, wherein each view control comprises a segmentation word of the segmentation result;
generating and displaying a plurality of first actionable objects in response to the edit enabling notification of the target text, the first actionable objects including at least one character of the target text;
responding to the editing instruction of the first operable object, and executing the editing operation corresponding to the editing instruction on the first operable object;
the generating and displaying a plurality of first operable objects specifically includes:
searching a combined word in the word segmentation result, wherein the combined word comprises at least two single words, or at least one single word and at least one special word, and the special word comprises numbers, symbols and letters;
when the searched combined word only comprises single characters, splitting the combined word into a plurality of single characters;
when the searched combined word comprises single characters and special characters, if the special characters in the combined word continuously appear, splitting the combined word into the single characters and the continuously appearing special characters; if the special characters in the combined word comprise the special characters which appear independently and the special characters which appear continuously, the combined word is divided into single characters, the special characters which appear independently and the special characters which appear continuously; if the special characters in the combined word appear independently, the combined word is divided into single characters and the special characters appearing independently;
and displaying the plurality of first operable objects, wherein each first operable object comprises a non-combined word in the word segmentation result or a split result of a combined word in the word segmentation result, and the non-combined word is a single word or at least one special word.
2. The text editing method of claim 1, wherein the generating and displaying a plurality of first actionable objects further comprises:
generating and displaying an editing cursor;
monitoring the moving operation of the editing cursor, wherein the moving operation carries the target position of the editing cursor;
determining whether the target position falls within the first manipulatable object;
if so, adjusting the display position of the first operable object so as to enable the target position to fall outside the first operable object.
3. The text editing method according to claim 2, further comprising:
monitoring input content of a user;
inserting a plurality of second manipulable objects at a display position of the editing cursor, the second manipulable objects including at least one character of the input content.
4. The text editing method of claim 1, wherein the generating and displaying the plurality of view controls further comprises:
splitting at least one of the view controls into a plurality of third actionable objects in response to an edit enable notification for the view control, the third actionable objects including at least one character in the view control;
and responding to the editing instruction of the third operable object, and executing the editing operation corresponding to the editing instruction on the third operable object.
5. The text editing method according to any one of claims 1, 3 and 4, wherein the at least one character is any one of a single character, a special word appearing individually and the special word appearing in succession, and the special word includes a number, a symbol and a letter.
6. A text editing apparatus, applied to a mobile terminal, includes: the device comprises a display module, a control module and an editing module;
the display module is used for displaying a target text; further for displaying a plurality of first actionable objects, the first actionable objects including at least one character of the target text;
the control module is used for responding to the editing enabling notification of the target text, generating a plurality of first operable objects and controlling the display module to display the plurality of first operable objects;
the editing module is used for responding to an editing instruction of the first operable object and executing an editing operation corresponding to the editing instruction on the first operable object;
the method specifically comprises the following steps: the word segmentation sub-module and the control generation sub-module;
the word segmentation sub-module is used for segmenting the target text to obtain a word segmentation result;
the control generation sub-module is used for generating and displaying a plurality of view controls, and each view control comprises a word segmentation of the word segmentation result;
the control module specifically comprises: searching a sub-module, a splitting sub-module and a display sub-module;
the searching submodule is used for searching a combined word in the word segmentation result, the combined word comprises at least two single words, or at least one single word and at least one special word, and the special word comprises numbers, symbols and letters;
the splitting sub-module is used for splitting the combined word into a plurality of single words when the searched combined word only comprises single words; the method is also used for splitting the combined word into single characters and continuous special characters if the special characters in the combined word continuously appear when the searched combined word comprises the single characters and the special characters; if the special characters in the combined word comprise the special characters which appear independently and the special characters which appear continuously, the combined word is divided into single characters, the special characters which appear independently and the special characters which appear continuously; if the special characters in the combined word appear independently, the combined word is divided into single characters and the special characters appearing independently;
the display sub-module is configured to display the plurality of first operable objects, where each first operable object includes a non-combined word in the word segmentation result or a split result of a combined word in the word segmentation result, and the non-combined word is a single word or at least one special word.
7. The text editing apparatus according to claim 6, further comprising: a monitoring module, a judging module,
The control module is also used for generating and controlling the display module to display an editing cursor;
the monitoring module is used for monitoring the moving operation of the editing cursor, and the moving operation carries the target position of the editing cursor;
the judging module is used for judging whether the target position falls into the first operable object;
the control module is further configured to adjust the display position of the first operable object to make the target position fall outside the first operable object when the determination result of the determination module is yes.
8. The text editing apparatus according to claim 7,
the monitoring module is also used for monitoring the input content of the user;
the control module is further configured to insert a plurality of second operable objects at the display position of the editing cursor, where the second operable objects include at least one character of the input content.
9. The text editing apparatus according to claim 6,
the control module is further used for responding to the edit enabling notification of at least one view control, and splitting the view control into a plurality of third operable objects, wherein the third operable objects comprise at least one character in the view control;
and the editing module is also used for responding to an editing instruction of the third operable object and executing an editing operation corresponding to the editing instruction on the third operable object.
10. The text editing apparatus according to any one of claims 6, 8 and 9, wherein the at least one character is any one of a single character, a special word appearing individually and the special word appearing in succession, the special word including a numeral, a symbol and a letter.
CN201710321544.1A 2017-05-09 2017-05-09 Text editing method and device Active CN107423273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710321544.1A CN107423273B (en) 2017-05-09 2017-05-09 Text editing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710321544.1A CN107423273B (en) 2017-05-09 2017-05-09 Text editing method and device

Publications (2)

Publication Number Publication Date
CN107423273A CN107423273A (en) 2017-12-01
CN107423273B true CN107423273B (en) 2020-05-05

Family

ID=60425510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710321544.1A Active CN107423273B (en) 2017-05-09 2017-05-09 Text editing method and device

Country Status (1)

Country Link
CN (1) CN107423273B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018762A (en) * 2019-03-15 2019-07-16 维沃移动通信有限公司 A kind of text clone method and mobile terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609208A (en) * 2012-02-13 2012-07-25 广州市动景计算机科技有限公司 Method and system for word capture on screen of touch screen equipment, and touch screen equipment
CN103472998A (en) * 2013-09-27 2013-12-25 小米科技有限责任公司 Method, device and terminal equipment for character selection
CN105095170A (en) * 2015-07-31 2015-11-25 小米科技有限责任公司 Text deleting method and device
CN106126052A (en) * 2016-06-23 2016-11-16 北京小米移动软件有限公司 Text selection method and device
CN106325688A (en) * 2016-08-17 2017-01-11 北京锤子数码科技有限公司 Text processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609208A (en) * 2012-02-13 2012-07-25 广州市动景计算机科技有限公司 Method and system for word capture on screen of touch screen equipment, and touch screen equipment
CN103472998A (en) * 2013-09-27 2013-12-25 小米科技有限责任公司 Method, device and terminal equipment for character selection
CN105095170A (en) * 2015-07-31 2015-11-25 小米科技有限责任公司 Text deleting method and device
CN106126052A (en) * 2016-06-23 2016-11-16 北京小米移动软件有限公司 Text selection method and device
CN106325688A (en) * 2016-08-17 2017-01-11 北京锤子数码科技有限公司 Text processing method and device

Also Published As

Publication number Publication date
CN107423273A (en) 2017-12-01

Similar Documents

Publication Publication Date Title
CN106484266B (en) Text processing method and device
CN107861932B (en) Text editing method, device and system and terminal equipment
CN106325688B (en) Text processing method and device
US7479948B2 (en) Terminal and method for entering command in the terminal
US8756527B2 (en) Method, apparatus and computer program product for providing a word input mechanism
CN108664201B (en) Text editing method and device and electronic equipment
CN108762654B (en) Text editing method, text editing device, text editing terminal and computer readable storage medium
US20100066764A1 (en) Selective character magnification on touch screen devices
US8452341B2 (en) Input processing method of mobile terminal and device for performing the same
US20090189862A1 (en) Method, computer program product and device for text editing
TW201447731A (en) Ink to text representation conversion
US20110080409A1 (en) Formula input method using a computing medium
KR20140014510A (en) Editing method of text generatied by a speech recognition and terminal thereof
CN104363349A (en) Short message processing method and portable terminal using same
CN106970758B (en) Electronic document operation processing method and device and electronic equipment
CN106970899B (en) Text processing method and device
US9557818B2 (en) Contextually-specific automatic separators
CN107423273B (en) Text editing method and device
CN105094562A (en) Information processing method and terminal
CN107168627B (en) Text editing method and device for touch screen
US20160292140A1 (en) Associative input method and terminal
CN106293368B (en) Data processing method and electronic equipment
CN113807058A (en) Text display method and text display device
CN105718427B (en) Information processing method and electronic equipment
KR20150098096A (en) A Method and Device For Inputting An Auto-Complete Text To Interoperable Applications

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20190121

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: BEIJING ZIJIE TIAODONG NETWORK TECHNOLOGY CO., LTD.

Address before: 100176 Beijing Daxing District Beijing economic and Technological Development Zone, Chuang Chuang fourteen Street 99, 33 D building 3 floors 309, 310 rooms.

Applicant before: Beijing hammer numeral science and technology company limited

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant