CN107066438A - A kind of method for editing text and device, electronic equipment - Google Patents

A kind of method for editing text and device, electronic equipment Download PDF

Info

Publication number
CN107066438A
CN107066438A CN201710154776.2A CN201710154776A CN107066438A CN 107066438 A CN107066438 A CN 107066438A CN 201710154776 A CN201710154776 A CN 201710154776A CN 107066438 A CN107066438 A CN 107066438A
Authority
CN
China
Prior art keywords
text
text block
character
edit
block
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.)
Pending
Application number
CN201710154776.2A
Other languages
Chinese (zh)
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 Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201710154776.2A priority Critical patent/CN107066438A/en
Publication of CN107066438A publication Critical patent/CN107066438A/en
Pending legal-status Critical Current

Links

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

Landscapes

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

Abstract

This application provides a kind of method for editing text, belong to field of computer technology, solve the problem of editorial efficiency is low present in prior art.Method for editing text disclosed in the embodiment of the present application, including:The input text in edit box is obtained in real time;Text block in the input text is recognized based on default dictionary, and using each text block recognized as an entirety, according to edit operation of the user in the edit box, corresponding editing and processing is carried out to the input text.The text block that this method is inputted in text by automatic identification, carries out overall editor by text block, effectively reduces the number of operations for deleting character, improve input efficiency.Meanwhile, solve user delete common phrase or proper noun etc. operation when, due to delete it is imperfect, caused by input error the problem of, further improve input text accuracy rate.

Description

A kind of method for editing text and device, electronic equipment
Technical field
The application is related to field of computer technology, more particularly to a kind of method for editing text and device, electronic equipment.
Background technology
Editing machine is almost called as the bottom application of system by all upper level applications, the text editing of editing machine Efficiency directly determines the operational efficiency of application program, and Consumer's Experience.In the prior art, when editing text, by backspace key or It is typically to delete one by one when person's delete key deletes the character in input frame.Even if when entering edlin to proprietary phrase, also can only Character manipulation one by one.For example, after input " Patent Law " these three characters, cursor is in next position of " method ", it is necessary to even Three backspaces of continuous input, could delete " Patent Law " these three characters, text editing is less efficient.
It can be seen that, when editing some proprietary phrases, at least there is editorial efficiency low in text entry method of the prior art Under defect.
The content of the invention
The application provides a kind of method for editing text, solves the problem of editorial efficiency present in prior art is low.
In order to solve the above problems, include in a first aspect, the embodiment of the present application provides a kind of method for editing text:
The input text in edit box is obtained in real time;
Text block in the input text is recognized based on default dictionary;
Using each text block recognized as an entirety, grasped according to editor of the user in the edit box Make, corresponding editing and processing is carried out to the input text.
Second aspect, the embodiment of the present application provides a kind of text editing apparatus, including:
Text acquisition module is inputted, for obtaining the input text in edit box in real time;
Text block identification module, for recognizing the input text that the input text acquisition module is obtained based on default dictionary In text block;
Editing and processing module, for using each text block recognized as an entirety, according to user described Edit operation in edit box, corresponding editing and processing is carried out to the input text.
The third aspect, the embodiment of the present application also discloses a kind of electronic equipment, including memory, processor and is stored in institute The computer program that can be run on memory and on a processor is stated, this is realized during computer program described in the computing device Apply for the method for editing text described in embodiment.
Fourth aspect, the embodiment of the present application provides a kind of computer-readable recording medium, is stored thereon with computer journey Sequence, when the program is executed by processor disclosed in the embodiment of the present application the step of method for editing text.
Method for editing text disclosed in the embodiment of the present application, by obtaining the input text in edit box, then, base in real time Text block in the default dictionary identification input text, and using each text block recognized as an entirety, According to edit operation of the user in the edit box, corresponding editing and processing is carried out to the input text, solved existing The problem of editorial efficiency is low present in technology.The text block inputted by automatic identification in text, text block is carried out whole Body editor, effectively reduces the number of operations for deleting character, improves input efficiency.Meanwhile, solve user and deleting conventional Phrase or proper noun etc. operate when, due to delete it is imperfect, caused by input error the problem of, further improve input The accuracy rate of text.
Brief description of the drawings
, below will be in embodiment or description of the prior art in order to illustrate more clearly of the technical scheme of the embodiment of the present application The required accompanying drawing used is briefly described, it should be apparent that, drawings in the following description are only some realities of the application Example is applied, for those of ordinary skill in the art, without having to pay creative labor, can also be attached according to these Figure obtains other accompanying drawings.
Fig. 1 is the method for editing text flow chart of the embodiment of the present application one;
Fig. 2 is the method for editing text flow chart of the embodiment of the present application two;
Fig. 3 is the method for editing text flow chart of the embodiment of the present application three;
Fig. 4 is one of text editing apparatus structural representation of the embodiment of the present application four;
Fig. 5 is the two of the text editing apparatus structural representation of the embodiment of the present application four.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete Site preparation is described, it is clear that described embodiment is some embodiments of the present application, rather than whole embodiments.Based on this Shen Please in embodiment, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of the application protection.
Method for editing text described in the embodiment of the present application is applicable not only to editing machine, apply also for edit box or Edit the application program of caching.In order to make it easy to understand, in embodiments herein by taking the text edited in editing machine as an example in detail Describe the concrete technical scheme of bright method for editing text in detail.
Embodiment one
A kind of method for editing text disclosed in the present embodiment, as shown in figure, this method includes:Step 100 is to step 120。
Step 100, the input text in edit box is obtained in real time.
When carrying out text editing by editing machine, the input text of user is shown in edit box in real time.In edit box Text correspondence is stored in editor's caching, and the text that user is often inputted in a character, edit box and editor's caching will increase phase Character should be inputted;User often deletes a character, and edit box and the text edited in caching will also reduce corresponding deletion character. User is performed after input or deletion action, and system can send corresponding insertion character or delete the edit instruction of character to volume Device is collected, editing machine combines the edit instruction received and current cursor position, realize the operation of input character and deletion character.
The application determines whether to executive editor behaviour when it is implemented, be sent to the edit instruction of editing machine by intercepting and capturing Make, then, read the character string in editor's caching to obtain the input text in edit box by calling system interface.It is specific real Shi Shi, can be by way of increasing call back function in the message processing function in editing machine, and interception system is sent to editing machine Edit instruction, so as to input text change when in real time obtain edit box in input text.Using text to be entered as: " State Intellectual Property Office have modified Patent Law ", exemplified by, after user's input " state ", editing machine can receive inserting for system transmission Enter the edit instruction of character " state ", editing machine is received after the edit instruction of the insertion character " state " of system transmission, Bian Jihuan Middle insertion " state " word is deposited, meanwhile, the input text of user is shown in edit box in real time, i.e., " state ".After user's input " family ", Editing machine can receive the edit instruction of the insertion character " family " of system transmission, and editing machine receives the insertion character of system transmission After the edit instruction of " family ", " family " word is inserted after " state " word in editor's caching, meanwhile, show user's in edit box in real time Input text, i.e. " country ".
Step 110, the text block in the input text is recognized based on default dictionary.
Wherein, the default dictionary includes at least one entry, and the entry at least includes:Text block.When it is implemented, Client needs to obtain default dictionary first.Default dictionary includes multiple entries, and the entry at least includes:Text block, example Such as, the form of entry can be:(text block).
The input text got is usually common character string, presets the text block in dictionary generally also with character string Form is represented., successively will be every in the default dictionary in the text block during the input text is recognized based on default dictionary Whether the text block of individual entry is matched with the input text got, to recognize in the input text got comprising current Text block.When it is implemented, in the input text that can be got by the identification of contains () method of calling system whether Comprising current text block, when contains () method returns to true, illustrate to include current text block in the input text.
In specific application, in input text, there may be multiple text blocks.Using input text as:" State Intellectual Property Office Have modified Patent Law ", exemplified by, through overmatching, recognizing input text includes two text blocks, is respectively:" intellectual property Office " and " Patent Law ".
After the text block included in recognizing input text, the rangangeof () sides provided by calling system Method may further determine that the position of each text block for identifying in input text, the i.e. first character of text block and most Position of the latter character in input text, the position is generally represented with CSD skew, i.e. text block The positional representation of middle character is the character sum before the character in input text;Present cursor position is expressed as in input text Character sum before cursor.
Step 120, using each text block recognized as an entirety, according to user in the edit box Edit operation, corresponding editing and processing is carried out to the input text.
When recognizing in input text comprising text block, text block can be converted into a picture, picture and text are obtained and mix The input text of row, the text block that will convert into picture is edited as a character;Edit after terminating, then conversion is obtained Picture convert back corresponding text block.
When it is implemented, can also be by way of the position of recording text block, using each text block as one It is overall, edlin is entered to input text.For example, when user performs the edit operations such as deletion, selection, mobile cursor in edit box When, according to the relation between cursor position and the position of the text block of record, it is determined that entering text block as an entirety Row is deleted, position before or after either selecting whole text block or moving the cursor to text block etc..
So far, the edit instruction that an edit operation (such as the edit operation of input character or deletion character) is produced is completed Handling process.If the input text in edit box has changed, step 100 is repeated to step 120, to obtain in real time The input text in edit box is taken, and edlin is entered to the input text.Method for editing text disclosed in the embodiment of the present application, By obtaining the input text in edit box in real time, then, the text block in the input text is recognized based on default dictionary, and Using each text block recognized as an entirety, according to edit operation of the user in the edit box, to described Input text and carry out corresponding editing and processing, solve the problem of editorial efficiency is low present in prior art.By automatic Text block in identified input text, and overall deletion is carried out to text block, the number of operations for deleting character is effectively reduced, is carried High input efficiency.Meanwhile, user is solved when deleting the operation such as common phrase or proper noun, it is imperfect due to deleting, Caused by input error the problem of, further improve input text accuracy rate.
Embodiment two
A kind of method for editing text disclosed in the present embodiment, as shown in Fig. 2 this method includes:Step 200 is to step 240.
Step 200, default dictionary is obtained.
The default dictionary includes at least one entry, and the entry at least includes:Text block.When it is implemented, default Dictionary includes multiple entries, and the entry at least includes:Text block, such as one entry is:(" Patent Law "), the lattice of entry Formula can be:(text block).
Text block in default dictionary is by being obtained after being captured, analyzed to whole network data, being extracted.For example, logical Cross and the proper noun in the data such as webpage, forum or Baidupedia or fixed phrases extract obtaining text block, generate word Entry in storehouse.Text block in default dictionary can also be by obtaining, for example, right after being processed to some proprietary dictionaries 《Business directory》、《Pharmacopeia》、《Code》And the proper noun in geographical dictionary etc. extract obtaining text block, in generation dictionary Entry.
Step 210, the input text in edit box is obtained in real time.
The opportunity for obtaining the input text in edit box can when intercepting default edit instruction, such as intercept insertion word Character instruction is deleted in symbol instruction.Using input text as:Exemplified by " today, the content of study was labour law ", user's input " the present ", Edit box will receive the instruction of an insertion character, by setting call back function in editing machine, can intercept and capture insertion character Instruction, now explanation input text changed, then editing machine handle insertion character information after, in real time obtain volume The input text of inframe is collected, i.e., " the present ".The rest may be inferred, when character is often inserted in editing machine or character is deleted, can all intercept slotting Enter character or delete the edit instruction of character, to obtain the input text in edit box in real time.Obtain defeated in edit box Enter the specific method of text referring to the corresponding steps in embodiment one, here is omitted.
Step 220, the text block in the input text is recognized based on default dictionary.
Recognize the specific method of the text block in the input text referring to a kind of corresponding of embodiment based on default dictionary Step, here is omitted.
In specific application, in input text, multiple text blocks may be included.The side of the application is understood for the ease of reader In case, the present embodiment using input text as:Exemplified by " today, the content of study was labour law ", through overmatching, input text is recognized This includes a text block, i.e. " labour law ".
Step 230, each text block recognized is converted into picture respectively, obtains the input text of picture and text mixing.
Identify in input text after the full text block that includes, the method that further calling system is provided, such as Rangangeof () method, determines position of the text block " labour law " in input text " today, the content of study was labour law " Put.Wherein, the positional representation of character is the character sum before the character in edit box in text block;Present cursor position is represented For the character sum before cursor in edit box.For example, in input text " today, the content of study was labour law ", obtaining " labour law " positional information is (8,10), wherein, " 8 " are the first characters of text block " labour law " in entirely input text Character position, " 10 " be text block " labour law " last character entirely input text in character position.
Then, the method that the character string that calling system is provided is converted to picture, picture is converted into by each input text respectively, Then the corresponding picture that conversion is obtained is inserted into the position in corresponding input text according to the position of text block, is carried by system The interface of the picture and text mixing of confession is rendered and shown to the input text after conversion, obtains the input text of picture and text mixing.Tool When body is implemented, in iOS system, text block " labour law " is generated a pictures image using Core Graphic API, i.e., The text of NSAttributetext types, is then realized using NSTextAttachment by NSAttributedString and schemed Literary mixing, editing machine can show the rich text NSAttributedString of picture and text mixing.In Android system, pass through Text block " labour law " is generated a pictures by BitMap methods, recycles IMageSpan methods to realize picture and text mixing, editing machine The rich text of picture and text mixing can be shown.
Step 240, the edit operation according to user in the edit box, is carried out to the input text of the picture and text mixing Corresponding editing and processing.
The edit operation includes:At least one of in deletion, selection, mobile cursor.By text block be converted into picture it Afterwards, the rich text of picture and text mixing is shown in edit box, now, the corresponding picture of text block takes the position of a character, Editing machine will be handled picture as a character when receiving the edit instructions such as deletion, selection, cursor movement.For The specific editing technique scheme of the rich text of picture and text mixing, referring to prior art, here is omitted.If when it is implemented, The input text of the picture and text mixing includes a picture being converted to by text block " labour law ", and user is by once deleting Operation, can all delete " labour law ".So far, a text editing operations are just completed.Step 210 is repeated to step Rapid 240, it can continue to enter edlin to the input text in input frame.
If the input text of the picture and text mixing includes the picture that multiple are converted to by text block, user can pass through Deletion action deletes a pictures, or user deletes a character by a deletion action, then needs to compile Input text after volume converts back plain text, in order to carry out editing and processing next time.Optionally, methods described also includes:Will All pictures in the input text of the picture and text mixing convert back corresponding text block, the input text after being edited.
User has been performed after an edit operation, as user deletes a character in input such as text, reading volume The text after being edited in frame is collected, is turned including character string text and/or picture, and by all pictures in the text read Change corresponding text block into, insert the picture position, you can obtain pure character text.When it is implemented, using iOS system as Example, NSAttributetext is exactly the text of additive attribute, if variable is picture, has corresponding text inside the attribute of picture, Therefore, the text in the attribute of the picture obtained by reading and converting can obtain the corresponding original character string of the picture, i.e., literary This block.
It is preferred that, each text block recognized is being converted into picture respectively, obtain picture and text mixing input text it Afterwards, in addition to:Highlight the picture being converted into edit box by text block.
Due in the input text of the picture and text mixing shown in edit box, from user visually, what text block was converted to Picture and text block does not have any difference, therefore in order to point out user, certain several character group into character block will be whole as one Body processing, further lifts Consumer's Experience, when it is implemented, can be converted into by highlighting in edit box by text block The mode of picture, is pointed out user.When it is implemented, the method for highlighting picture can be that picture is outlined or changed Become the modes such as picture background color, do not enumerate herein.
Method for editing text disclosed in the embodiment of the present application, by obtaining default dictionary first, then is implementing to obtain volume When collecting the input text of inframe, the text block in the input text is recognized based on default dictionary, by each text recognized Block is converted into picture respectively, obtains the input text of picture and text mixing, and the input text of the picture and text mixing is compiled accordingly Processing is collected, the problem of editorial efficiency is low present in prior art is solved.The text inputted by automatic identification in text Block, and text block is converted into the overall editor of picture progress, the number of operations for deleting character is effectively reduced, input effect is improved Rate.Meanwhile, solve user delete common phrase or proper noun etc. operation when, due to delete it is imperfect, caused by it is defeated The problem of entering mistake, further improves the accuracy rate of input text.
Embodiment three
A kind of method for editing text disclosed in the present embodiment, as shown in figure 3, this method includes:Step 300 is to step 340.
Step 300, default dictionary is obtained.
The specific implementation technical scheme of default dictionary is obtained referring to the correlation step in embodiment two, here is omitted.
Step 310, the input text in edit box is obtained in real time.
When the opportunity for obtaining the input text in edit box can be that the character detected in edit box changes, such as cut Obtain insertion character or delete the edit instruction of character.The specific method for inputting text in edit box is obtained referring to embodiment Corresponding steps in one, here is omitted.
Step 320, the text block in the input text is recognized based on default dictionary.
Recognize the specific method of the text block in the input text referring to a kind of corresponding of embodiment based on default dictionary Step, here is omitted.
In specific application, in input text, multiple text blocks may be included.In the present embodiment, using input text as: Exemplified by " I am in Tsing-Hua University ", through overmatching, recognizing in input text only includes a text block, i.e., " Tsing-Hua University ".
Step 330, record is recognized each text block and the position of each text block.
When recognizing in input text comprising text block, using each text block recognized as an entirety, Firstly, it is necessary to record the position of each text block recognized and each text block.The position of text block can be expressed as text The relevant position of first character and last character in the input text in block.
Identify and input after all text blocks that text includes, the method that further calling system is provided, such as Rangangeof () method, determines position of the text block " Tsing-Hua University " in input text " I am in Tsing-Hua University ", for example The positional information arrived is (2,5), wherein, " 2 " are the first characters of text block " Tsing-Hua University " in entirely input text Character display location, " 5 " are that character of the last character of text block " Tsing-Hua University " in entirely input text shows position Put.
When it is implemented, an array of pointers can be set up to record and manage the position of the text block in input text.
Step 340, according to the position of edit operation of the user in the edit box, present cursor position and text block, Using each text block as an entirety, corresponding editing and processing is carried out to the input text.
The position of the edit operation according to user in the edit box, present cursor position and text block, will be every Individual text block carries out corresponding editing and processing respectively as an entirety to the input text, including:When user compiles described The edit operation of volume inframe to delete during the previous character of cursor, if current cursor some text block recorded last Latter position of individual character, then delete the text block before cursor;Or, when edit operation of the user in the edit box is When deleting latter character of cursor, if current cursor is deleted in the position of the first character of some text block recorded Text block after cursor;Or, when edit operation of the user in the edit box is selection character, if selected character Comprising the character in text block, then selected character includes text block where the character;Or, when user is in the edit box Interior edit operation for move a cursor to previous position when, if current cursor some text block recorded last Latter position of character, then move a cursor to the position of first character in text block;Or, when user is in the editor The edit operation of inframe is when moving a cursor to latter position, if current cursor is at first of some text block recorded The position of character, then move a cursor to latter position of last character in text block.Wherein, character in text block Positional representation is the character sum before the character in edit box;Present cursor position is expressed as in edit box the word before cursor Symbol sum.
When it is implemented, edit operation includes:Cursor is moved, and is deleted the previous character of cursor, is deleted latter word of cursor Symbol, selection, stickup etc..For the processing mode and the mode of the input text in processing edit box in the prior art of paste operation Identical, here is omitted.
Edit operation for deleting the previous character of cursor, still exemplified by inputting text and be " I am in Tsing-Hua University ", such as Fruit present cursor position " is learned " after word the 6th position, then deletes whole text block " Tsing-Hua University ", defeated after deletion Enter text for " I ", be easy to user integrally to delete school's title.
Edit operation for deleting latter character of cursor, still exemplified by inputting text and be " I am in Tsing-Hua University ", such as Fruit present cursor position then deletes whole text block " Tsing-Hua University " before the 2nd position, i.e. " clear " word, defeated after deletion Enter text for " I ", be easy to user integrally to delete school's title.
The edit operation moved for cursor, still exemplified by inputting text and be " I am in Tsing-Hua University ", if current cursor Position is before the 2nd position, i.e. " clear " word, and user clicks on the button of right-cursor, then cursor is moved to the 6th position, i.e., After " " word;If present cursor position is the 6th position, i.e., " learn " after word, user clicks on the button for moving to left cursor, then Cursor is moved to before the 2nd position, i.e. " clear " word.
Edit operation for selecting character, still exemplified by inputting text and be " I am in Tsing-Hua University ", if user's touches The position of position position " China " word in text block " Tsing-Hua University " is touched, user selects character " China " word by sliding, then text Block " Tsing-Hua University " will be chosen.Or, if the position of mouse click location " China " word in text block " Tsing-Hua University ", use Family is by double-clicking selection character " China " word, then text block " Tsing-Hua University " will be chosen.
Optionally, after the position for recording each text block recognized and each text block, in addition to:Highlight The each text block recognized.In order to point out user, certain several character will further lift user's body as a disposed of in its entirety Test, when it is implemented, can be pointed out by highlighting in edit box by text block user.When it is implemented, prominent Show that the method for text block can one by one not arranged herein for background colour is outlined or set to text block or the mode such as underlines Lift.
Method for editing text disclosed in the embodiment of the present application, by obtaining default dictionary first, is then compiled in real-time obtain During the input text of volume inframe, the text block in the input text is recognized based on default dictionary, and records recognize each The position of text block and each text block, it is right then according to the position of the edit operation of user, present cursor position and text block The input text carries out corresponding editing and processing, solves the problem of editorial efficiency is low present in prior art.Pass through Text block in automatic identification input text, by the position of recording text block, carries out overall editor by text block, effectively reduces The number of operations of character is deleted, input efficiency is improved;Simultaneously, it is not necessary to which text block is converted into picture, can be further Reduce system resource occupancy.Meanwhile, user is solved when deleting the operation such as common phrase or proper noun, due to deleting not Completely, caused by the problem of input error, the accuracy rate of input text is further improved.
Example IV
A kind of text editing apparatus disclosed in the present embodiment, as shown in figure 4, described device includes:
Text acquisition module 410 is inputted, for obtaining the input text in edit box in real time;
Text block identification module 420, it is defeated for recognizing that the input text acquisition module 410 is obtained based on default dictionary Enter the text block in text;
Editing and processing module 430, each text block that the text block identification module 420 is recognized is as one It is overall, according to edit operation of the user in the edit box, corresponding editing and processing is carried out to the input text.
Text editing apparatus disclosed in the embodiment of the present application, by obtaining the input text in edit box, then, base in real time Text block in the default dictionary identification input text, and each text block recognized is respectively as an entirety, root According to edit operation of the user in the edit box, corresponding editing and processing is carried out to the input text, existing skill is solved The problem of editorial efficiency is low present in art.The text block inputted by automatic identification in text, text block is carried out overall Editor, effectively reduces the number of operations for deleting character, improves input efficiency.Meanwhile, solve user and delete everyday words Group or proper noun etc. operate when, due to delete it is imperfect, caused by input error the problem of, further improve input text This accuracy rate.
Optionally, as shown in figure 5, described device also includes:
Dictionary acquisition module 400, for obtaining default dictionary.
The method for building up and dictionary content of default dictionary are referring to embodiment of the method part, and here is omitted.
Optionally, as shown in figure 5, the editing and processing module 430 includes:
First converting unit 4301, for each text block recognized to be converted into picture respectively, obtains picture and text mixing Input text;
First edit cell 4302, for the edit operation according to user in the edit box, to the picture and text mixing Input text carry out corresponding editing and processing;
Wherein, the edit operation includes:At least one of in deletion, selection, mobile cursor.
Optionally, as shown in figure 5, the editing and processing module 430 also includes:
Second converting unit 4303, is converted back accordingly for all pictures in the input text by the picture and text mixing Text block, the input text after being edited.
By the way that all text blocks are converted into after picture respectively, corresponding editing and processing is carried out to the input text, made Whole text block can just be deleted by obtaining user's deletion action of execution, solve editorial efficiency present in prior art low The problem of.The text block inputted by automatic identification in text, carries out overall editor by text block, effectively reduces deletion character Number of operations, improve input efficiency.Meanwhile, user is solved when deleting the operation such as common phrase or proper noun, by In delete it is imperfect, caused by input error the problem of, further improve input text accuracy rate.
Optionally, as shown in figure 5, the editing and processing module 430 also includes:
First display unit 4304, for highlighting the picture being converted into edit box by text block.
Optionally, as shown in figure 5, the editing and processing module 430 also includes:
Text block recording unit 4305, the position for recording each text block recognized and each text block;
Second edit cell 4306, for according to edit operation of the user in the edit box, present cursor position and The position of text block, using each text block as an entirety, corresponding editing and processing is carried out to the input text.
Optionally, second edit cell 4306 further comprises at least one of following:
First editor's subelement (not shown), is deletion light for the edit operation as user in the edit box When marking previous character, if current cursor is deleted in latter position of the last character of some text block recorded Except the text block before cursor;
Second editor's subelement (not shown), is deletion light for the edit operation as user in the edit box When marking latter character instruction, if current cursor deletes light in the position of the first character of some text block recorded Text block after mark;
3rd editor's subelement (not shown), is selection word for the edit operation as user in the edit box Fu Shi, if selected character includes the character in text block, selected character includes text block where the character;
4th editor's subelement (not shown), is mobile light for the edit operation as user in the edit box When mark is to previous position, if current cursor is in latter position of the last character of some text block recorded, Move a cursor to the position of first character in text block;
5th editor's subelement (not shown), is mobile light for the edit operation as user in the edit box When mark is to latter position, if current cursor moves cursor in the position of the first character of some text block recorded The latter position of last character into text block.
Wherein, the positional representation of character is the character sum before the character in edit box in text block;Current cursor position Put the character sum being expressed as in edit box before cursor.
Optionally, as shown in figure 5, the editing and processing module 430 also includes:
Second display unit 4307, each text block recognized for highlighting.
By the position for recording all text blocks and each text block;And grasped according to editor of the user in the edit box The position of work, present cursor position and text block, carries out corresponding editing and processing to the input text, realizes monoblock deletion Text block, solves the problem of editorial efficiency is low present in prior art.The text inputted by automatic identification in text Block, and overall deletion is carried out to text block, the number of operations for deleting character is effectively reduced, input efficiency is improved.Meanwhile, solution User determined when deleting the operation such as common phrase or proper noun, it is imperfect due to deleting, caused by input error ask Topic, further improves the accuracy rate of input text.
Accordingly, disclosed herein as well is a kind of electronic equipment, including memory, processor and it is stored in the memory Computer program that is upper and can running on a processor, is realized as the application is real described in the computing device during computer program Apply the method for editing text described in example one to embodiment three.The electronic equipment can help for PC, mobile terminal, individual digital Reason, tablet personal computer etc..
Disclosed herein as well is a kind of computer-readable recording medium, computer program is stored thereon with, the program is located Manage the step of realizing the method for editing text as described in the embodiment of the present application one to embodiment three when device is performed.
Each embodiment in this specification is described by the way of progressive, what each embodiment was stressed be with Between the difference of other embodiment, each embodiment identical similar part mutually referring to.For device embodiment For, because it is substantially similar to embodiment of the method, so description is fairly simple, referring to the portion of embodiment of the method in place of correlation Defend oneself bright.
A kind of method for editing text and device provided above the application is described in detail, tool used herein Body example is set forth to the principle and embodiment of the application, and the explanation of above example is only intended to help and understands this Shen Method and its core concept please;Simultaneously for those of ordinary skill in the art, according to the thought of the application, specific real Apply and will change in mode and application, in summary, this specification content should not be construed as the limit to the application System.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can Realized by the mode of software plus required general hardware platform, naturally it is also possible to realized by hardware.Based on such reason Solution, the part that above-mentioned technical proposal substantially contributes to prior art in other words can be embodied in the form of software product Come, the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including Some instructions are to cause a computer equipment (can be personal computer, server, or network equipment etc.) is performed each Method described in some parts of individual embodiment or embodiment.

Claims (12)

1. a kind of method for editing text, it is characterised in that including:
The input text in edit box is obtained in real time;
Text block in the input text is recognized based on default dictionary;
It is right according to edit operation of the user in the edit box using each text block recognized as an entirety The input text carries out corresponding editing and processing.
2. according to the method described in claim 1, it is characterised in that described using each text block recognized as one It is overall, according to edit operation of the user in the edit box, the step of corresponding editing and processing is carried out to the input text, Including:
The each text block recognized is converted into picture respectively, the input text of picture and text mixing is obtained;
According to edit operation of the user in the edit box, corresponding Editorial Services is carried out to the input text of the picture and text mixing Reason;
Wherein, the edit operation includes:At least one of in deletion, selection, mobile cursor.
3. method according to claim 2, it is characterised in that the editor behaviour according to user in the edit box Make, after the step of carrying out corresponding editing and processing to the input text of the picture and text mixing, in addition to:
All pictures in the input text of the picture and text mixing are converted back into corresponding text block, the input text after being edited This.
4. method according to claim 2, it is characterised in that described that each text block recognized is converted into figure respectively Piece, the step of obtaining the input text of picture and text mixing, afterwards, in addition to:
Highlight the picture being converted into edit box by text block.
5. according to the method described in claim 1, it is characterised in that described using each text block recognized as one It is overall, according to edit operation of the user in the edit box, the step of corresponding editing and processing is carried out to the input text, Including:
Record the position of each text block recognized and each text block;
According to the position of edit operation of the user in the edit box, present cursor position and text block, by each text block Respectively as an entirety, corresponding editing and processing is carried out to the input text.
6. method according to claim 5, it is characterised in that the editor behaviour according to user in the edit box The position of work, present cursor position and text block, using each text block as an entirety, is carried out to the input text The step of corresponding editing and processing, including:
When edit operation of the user in the edit box is deletes the previous character of cursor, if current cursor is being recorded Latter position of the last character of some text block, then delete the text block before cursor;Or,
When edit operation of the user in the edit box is deletes cursor latter character, if current cursor is being recorded The position of the first character of some text block, then delete the text block after cursor;Or,
When edit operation of the user in the edit box is selection character, if selected character includes the word in text block Accord with, then selected character includes text block where the character;Or,
When edit operation of the user in the edit box is to move a cursor to previous position, if current cursor is being recorded Some text block last character latter position, then move a cursor to the position of first character in text block Put;Or,
When edit operation of the user in the edit box is to move a cursor to latter position, if current cursor is being recorded Some text block first character position, then move a cursor to latter position of last character in text block Put;
Wherein, the positional representation of character is the character sum before the character in edit box in text block;Present cursor position table Character sum before cursor is shown as in edit box.
7. method according to claim 5, it is characterised in that each text block and each text that the record is recognized After the step of position of block, in addition to:
Highlight each text block recognized.
8. a kind of text editing apparatus, it is characterised in that including:
Text acquisition module is inputted, for obtaining the input text in edit box in real time;
Text block identification module, for being recognized based on default dictionary in the input text that the input text acquisition module is obtained Text block;
Editing and processing module, for each text block for recognizing the text block identification module as an entirety, According to edit operation of the user in the edit box, corresponding editing and processing is carried out to the input text.
9. device according to claim 8, it is characterised in that the editing and processing module includes:
First converting unit, for each text block recognized to be converted into picture respectively, obtains the input text of picture and text mixing This;
First edit cell, for the edit operation according to user in the edit box, to the input text of the picture and text mixing The corresponding editing and processing of this progress;
Wherein, the edit operation includes:At least one of in deletion, selection, mobile cursor.
10. device according to claim 8, it is characterised in that the editing and processing module includes:
Text block recording unit, the position for recording each text block recognized and each text block;
Second edit cell, for according to edit operation of the user in the edit box, present cursor position and text block Position, using each text block as an entirety, corresponding editing and processing is carried out to the input text.
11. a kind of electronic equipment, including memory, processor and it is stored on the memory and can runs on a processor Computer program, it is characterised in that realize claim 1 to 7 any one described in the computing device during computer program Method for editing text described in claim.
12. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The step of method for editing text described in claim 1 to 7 any one is realized during execution.
CN201710154776.2A 2017-03-15 2017-03-15 A kind of method for editing text and device, electronic equipment Pending CN107066438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710154776.2A CN107066438A (en) 2017-03-15 2017-03-15 A kind of method for editing text and device, electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710154776.2A CN107066438A (en) 2017-03-15 2017-03-15 A kind of method for editing text and device, electronic equipment

Publications (1)

Publication Number Publication Date
CN107066438A true CN107066438A (en) 2017-08-18

Family

ID=59617841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710154776.2A Pending CN107066438A (en) 2017-03-15 2017-03-15 A kind of method for editing text and device, electronic equipment

Country Status (1)

Country Link
CN (1) CN107066438A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109276886A (en) * 2018-08-16 2019-01-29 深圳木狼科技有限公司 A kind of document creation method, system and terminal device
CN109753644A (en) * 2018-12-26 2019-05-14 百度在线网络技术(北京)有限公司 A kind of RichText Edition method, apparatus, mobile terminal and storage medium
CN111581921A (en) * 2019-02-18 2020-08-25 珠海金山办公软件有限公司 Text editing method and device, computer storage medium and terminal
CN113779345A (en) * 2021-09-06 2021-12-10 北京量子之歌科技有限公司 Teaching material generation method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216305B1 (en) * 2001-02-15 2007-05-08 Denny Jaeger Storage/display/action object for onscreen use
CN101925894A (en) * 2008-01-24 2010-12-22 索尼爱立信移动通讯有限公司 Method, computer program product and device for text editing
CN102339277A (en) * 2011-09-16 2012-02-01 广州市动景计算机科技有限公司 Method and system for converting text content into picture content
CN106021218A (en) * 2016-05-26 2016-10-12 北京金山安全软件有限公司 Word processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216305B1 (en) * 2001-02-15 2007-05-08 Denny Jaeger Storage/display/action object for onscreen use
CN101925894A (en) * 2008-01-24 2010-12-22 索尼爱立信移动通讯有限公司 Method, computer program product and device for text editing
CN102339277A (en) * 2011-09-16 2012-02-01 广州市动景计算机科技有限公司 Method and system for converting text content into picture content
CN106021218A (en) * 2016-05-26 2016-10-12 北京金山安全软件有限公司 Word processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韩红梅: "《英汉翻译实用教程》", 30 June 2012 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109276886A (en) * 2018-08-16 2019-01-29 深圳木狼科技有限公司 A kind of document creation method, system and terminal device
CN109753644A (en) * 2018-12-26 2019-05-14 百度在线网络技术(北京)有限公司 A kind of RichText Edition method, apparatus, mobile terminal and storage medium
CN109753644B (en) * 2018-12-26 2023-11-28 百度在线网络技术(北京)有限公司 Rich text editing method and device, mobile terminal and storage medium
CN111581921A (en) * 2019-02-18 2020-08-25 珠海金山办公软件有限公司 Text editing method and device, computer storage medium and terminal
CN111581921B (en) * 2019-02-18 2024-01-26 珠海金山办公软件有限公司 Text editing method and device, computer storage medium and terminal
CN113779345A (en) * 2021-09-06 2021-12-10 北京量子之歌科技有限公司 Teaching material generation method and device, computer equipment and storage medium
CN113779345B (en) * 2021-09-06 2024-04-16 北京量子之歌科技有限公司 Teaching material generation method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105718448B (en) The method and apparatus that a kind of pair of input character carries out automatic translation
US20170220858A1 (en) Optical recognition of tables
US9161238B2 (en) Mobile device monitoring and testing
CN107066438A (en) A kind of method for editing text and device, electronic equipment
JP5439456B2 (en) Electronic comic editing apparatus, method and program
CN105511784A (en) Information input method, device and mobile terminal based on pressure detection
KR101394874B1 (en) Device and method implementing for particular function based on writing
CN103500257B (en) DWG-format drawing identification method and system
CN110490182A (en) A kind of point reads production method, system, storage medium and the electronic equipment of data
CN106527945A (en) text information extraction method and device
CN107203498A (en) A kind of method, system and its user terminal and server for creating e-book
EP3029567B1 (en) Method and device for updating input method system, computer storage medium, and device
CN101763218A (en) Input method for handheld equipment
CN109739416A (en) A kind of Text Extraction and device
CN108924622A (en) A kind of method for processing video frequency and its equipment, storage medium, electronic equipment
CN104158945A (en) Conversation information obtaining method, device and system
US20200264905A1 (en) View playback to enhance collaboration and comments
CN105975446A (en) Method and system for displaying word document content by modules in mobile phone terminal
CN104298721A (en) Split screen layout editing method for any number of objects in on-line courseware making based on Web
CN106020645A (en) Application starting method and apparatus
CN107832311A (en) A kind of interpretation method, device, terminal and readable storage device
CN106815181B (en) Method and device for converting Indesign typesetted ind files into Office files
JP7309811B2 (en) Data annotation method, apparatus, electronics and storage medium
CN115115740A (en) Thinking guide graph recognition method, device, equipment, medium and program product
CN1371043A (en) Numeral operation system

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