CN105955616B - A kind of method and apparatus for choosing document content - Google Patents
A kind of method and apparatus for choosing document content Download PDFInfo
- Publication number
- CN105955616B CN105955616B CN201610282736.1A CN201610282736A CN105955616B CN 105955616 B CN105955616 B CN 105955616B CN 201610282736 A CN201610282736 A CN 201610282736A CN 105955616 B CN105955616 B CN 105955616B
- Authority
- CN
- China
- Prior art keywords
- document content
- character
- section
- document
- determined
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04842—Selection of displayed objects or displayed text elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Document Processing Apparatus (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure is directed to a kind of method and apparatus for choosing document content, belong to electronic technology field.The described method includes: obtaining the first document content being selected in the destination document currently shown when detecting document content selection operation;In the destination document, the second document content of the default Doctype comprising first document content is determined;Selected state is set by second document content.Using the disclosure, the selection efficiency of document content can be improved.
Description
Technical field
The disclosure is directed to electronic technology fields, especially with respect to a kind of method and apparatus for choosing document content.
Background technique
When people edit document, it is often necessary to certain segment word in document is chosen, for example, a word therein, one
Paragraph, multiple paragraphs or entire chapter document.
Currently, when people want to choose certain partial document content, often through being chosen in the document oneself to be chosen manually
Hold, for example, mobile terminals editor's document such as people's mobile phone, when people want to choose certain partial document content therein, often
It pins screen to be slided, until choosing the document content to be chosen, in addition, being easier to select when terminal screen is smaller
Mistake needs to re-start selection in this case.As it can be seen that the selection efficiency that above-mentioned treatment mechanism will lead to document content is lower.
Summary of the invention
In order to overcome the problems, such as present in the relevant technologies, present disclose provides a kind of dresses of method for choosing document content
It sets.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of method for choosing document content is provided, which comprises
When detecting document content selection operation, obtain in the first document being selected in the destination document currently shown
Hold;
In the destination document, determine to include in the second document of default Doctype of first document content
Hold;
Selected state is set by second document content.
Optionally, the default Doctype includes sentence type or segment type.
Optionally, described in the destination document, determine the default Doctype comprising first document content
Second document content, comprising:
Option is expanded in display;
When receiving the triggering command for expanding option, in the destination document, determine comprising first text
Second document content of the default Doctype of shelves content.
In this way, the using flexible for expanding and selecting function can be improved.
Optionally, the determination includes the second document content of the default Doctype of first document content, comprising:
If first document content is located in same section, and includes imperfect sentence, it is determined that include first text
The sentence of shelves content;
It is described to set selected state for second document content, comprising:
Selected state is set by the sentence comprising first document content.
It is selected as sentence in this way, the word of selection can be expanded, it is thus possible to improve the selection efficiency of document content.
It optionally, if first document content is located in same section, and include imperfect sentence, it is determined that include
The sentence of first document content, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is not end mark or section first symbol or the trailing character is not end mark or section end mark, it is determined that
Nearest sentence end mark or section first symbol, the sentence end mark or section determined are opened before the initial character of first document content
The character to begin after according with, as the initial character of sentence, and when the trailing character of first document content is that sentence end mark or section terminate
Fu Shi, using the trailing character of first document content as the trailing character of the sentence, when the trailing character of first document content
When not being sentence end mark and section end mark, nearest sentence end mark after the trailing character of first document content is determined, as
The trailing character of the sentence;Initial character and trailing character based on the sentence determine the sentence comprising first document content.
Optionally, the determination includes the second document content of the default Doctype of first document content, comprising:
If first document content is located in same section, and does not include imperfect sentence, it is determined that include described first
The section of document content;
It is described to set selected state for second document content, comprising:
Selected state is set by the section comprising first document content.
It is selected as section in this way, the sentence of selection can be expanded, it is thus possible to improve the selection efficiency of document content.
Optionally, if first document content is located in same section, and imperfect sentence is not included, it is determined that packet
Section containing first document content, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is an end mark or section first symbol and the trailing character is an end mark or section end mark, it is determined that described
Nearest section first symbol before the initial character of one document content, the head by the character after the section first symbol determined, as section
Character, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character as described section of trailing character, when the trailing character of first document content is not section end mark, determine described
Nearest section end mark after the trailing character of one document content, by the character before the section end mark determined, as described section
Trailing character;Based on described section of initial character and trailing character, described section comprising first document content is determined.
Optionally, the determination includes the second document content of the default Doctype of first document content, comprising:
If first document content is located in different sections, it is determined that multiple sections comprising first document content;
It is described to set selected state for second document content, comprising:
Selected state is set by multiple sections comprising first document content.
Multiple sections are selected as in this way, the document content of selection can be expanded, it is thus possible to improve the selection effect of document content
Rate.
Optionally, if first document content is located in different sections, it is determined that comprising in first document
Multiple sections held, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
It is different to state the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content, it is determined that first document
Nearest section first symbol before the initial character of content, by the character after the section first symbol determined, as multiple sections of lead-in
Symbol, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character is as the multiple section of trailing character, when the trailing character of first document content is not section end mark, determine described in
Nearest section end mark after the trailing character of first document content, by the character before the section end mark determined, as described
Multiple sections of trailing character;Based on the multiple section of initial character and trailing character, determine described comprising first document content
Multiple sections.
According to the second aspect of an embodiment of the present disclosure, a kind of device for choosing document content is provided, described device includes:
Module is obtained, for obtaining in the destination document currently shown and being chosen when detecting document content selection operation
In the first document content;
Determining module, in the destination document, determining first text got comprising the acquisition module
Second document content of the default Doctype of shelves content;
Setup module, second document content for determining the determining module are set as selected state.
Optionally, the default Doctype includes sentence type or segment type.
Optionally, the determining module, comprising:
Display sub-module expands option for showing;
Determine submodule, for when receiving the triggering command for the expansion option that the display sub-module is shown,
In the destination document, the second document content of the default Doctype comprising first document content is determined.
Optionally, the determining module, is used for:
If first document content is located in same section, and includes imperfect sentence, it is determined that include first text
The sentence of shelves content;
The setup module, is used for:
By the determining module determine described in the sentence comprising first document content be set as selected state.
Optionally, the determining module, is used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is not end mark or section first symbol or the trailing character is not end mark or section end mark, it is determined that
Nearest sentence end mark or section first symbol, the sentence end mark or section determined are opened before the initial character of first document content
The character to begin after according with, as the initial character of sentence, and when the trailing character of first document content is that sentence end mark or section terminate
Fu Shi, using the trailing character of first document content as the trailing character of the sentence, when the trailing character of first document content
When not being sentence end mark and section end mark, nearest sentence end mark after the trailing character of first document content is determined, as
The trailing character of the sentence;Initial character and trailing character based on the sentence determine the sentence comprising first document content.
Optionally, the determining module, is used for:
If first document content is located in same section, and does not include imperfect sentence, it is determined that include described first
The section of document content;
The setup module, is used for:
By the determining module determine described in the section comprising first document content be set as selected state.
Optionally, the determining module, is used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is an end mark or section first symbol and the trailing character is an end mark or section end mark, it is determined that described
Nearest section first symbol before the initial character of one document content, the head by the character after the section first symbol determined, as section
Character, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character as described section of trailing character, when the trailing character of first document content is not section end mark, determine described
Nearest section end mark after the trailing character of one document content, by the character before the section end mark determined, as described section
Trailing character;Based on described section of initial character and trailing character, described section comprising first document content is determined.
Optionally, the determining module, is used for:
If first document content is located in different sections, it is determined that multiple sections comprising first document content;
The setup module, is used for:
By the determining module determine described in comprising multiple sections of first document content be set as selected shape
State.
Optionally, the determining module, is used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
It is different to state the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content, it is determined that first document
Nearest section first symbol before the initial character of content, by the character after the section first symbol determined, as multiple sections of lead-in
Symbol, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character is as the multiple section of trailing character, when the trailing character of first document content is not section end mark, determine described in
Nearest section end mark after the trailing character of first document content, by the character before the section end mark determined, as described
Multiple sections of trailing character;Based on the multiple section of initial character and trailing character, determine described comprising first document content
Multiple sections.
According to the third aspect of an embodiment of the present disclosure, a kind of device for choosing document content is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
When detecting document content selection operation, obtain in the first document being selected in the destination document currently shown
Hold;
In the destination document, determine to include in the second document of default Doctype of first document content
Hold;
Selected state is set by second document content.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In the embodiment of the present disclosure, when detecting document content selection operation, quilt in the destination document currently shown is obtained
The first document content chosen determines the second document of the default Doctype comprising the first document content in destination document
The second document content is set selected state by content.In this way, user can be chosen in sub-fraction by manual operation
Hold, most corresponding content is chosen to trigger, it is thus possible to improve the selection efficiency of document content.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.In the accompanying drawings:
Fig. 1 is a kind of flow chart of method for choosing document content shown according to an exemplary embodiment;
Fig. 2 is a kind of schematic diagram for choosing document content shown according to an exemplary embodiment;
Fig. 3 (a) is a kind of schematic diagram for choosing sentence shown according to an exemplary embodiment;
Fig. 3 (b) is a kind of schematic diagram for choosing sentence shown according to an exemplary embodiment;
Fig. 4 is a kind of schematic diagram for choosing section shown according to an exemplary embodiment;
Fig. 5 (a) is a kind of schematic diagram for choosing multiple sections shown according to an exemplary embodiment;
Fig. 5 (b) is a kind of schematic diagram for choosing multiple sections shown according to an exemplary embodiment;
Fig. 6 is a kind of schematic diagram of device for choosing document content shown according to an exemplary embodiment;
Fig. 7 is a kind of schematic diagram of device for choosing document content shown according to an exemplary embodiment;
Fig. 8 is a kind of structural schematic diagram of terminal shown according to an exemplary embodiment.
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings
It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments
Those skilled in the art illustrate the concept of the disclosure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
An exemplary embodiment of the present disclosure provides a kind of method for choosing document content, this method can be used for terminal
In, wherein terminal can be the mobile terminals such as the terminal, such as mobile phone, tablet computer for expanding with document content and selecting function, PC
(Personal Computer, PC).Processor, display unit can be set in the terminal, processor can be used for
The first document content in currently selected is obtained, and determines the second document content comprising the first document content and is arranged
For the relevant treatment of selected state, display unit is displayed for document content, such as screen.
Below in conjunction with embodiment, process flow shown in FIG. 1 is described in detail, content can be such that
In a step 101, it when detecting document content selection operation, obtains in the destination document currently shown and is selected
The first document content.
In an implementation, when user edits document (being properly termed as destination document) by mobile phone or PC, it usually needs choose it
In certain partial document content, wherein document can be word document, and the document being also possible in webpage, user can be manual
Choose document content therein, terminal will detect that document content selection operation, at this point, will triggering terminal obtain it is current aobvious
By document content (being properly termed as the first document content) that user chooses manually in the destination document shown.
In a step 102, in destination document, the second document of the default Doctype comprising the first document content is determined
Content.
In an implementation, expansion can be preset in terminal to make an accurate selection of then, i.e., it, can according to the first document content in destination document
To automatically determine the second document content comprising the first document content, that is to say, that terminal can be according to the first document content, certainly
Dynamic the second document content for determining the default Doctype comprising the first document content, wherein default Doctype includes sentence class
Type or segment type, for example, the first document content is word or complete sentence, the second document content be can be comprising in the first document
The entire sentence or entire paragraph held.Wherein, the second document content is only the document content that user finally wants selection.
Optionally, terminal can determine the second document according to the first document content when receiving the triggering command for expanding choosing
Content, correspondingly, the treatment process of step 102 can be such that option is expanded in display;When the triggering command for receiving expansion option
When, in destination document, determine the second document content of the default Doctype comprising the first document content.
In an implementation, when the first document content that terminal is selected in obtaining the destination document currently shown, Ke Yixian
Show that expansion option can click the expansion option, terminal will receive expansion when user wants to expand selected document content
The triggering command of option in destination document, can determine the of the default Doctype comprising the first document content in turn
Two document contents, as shown in Figure 2.
Optionally, the paragraph properties of the first document content are different, and the second document content can correspond in destination document not
Same part, following present several feasible situations:
Situation one if the first document content is located in same section, and includes imperfect sentence, it is determined that includes the first document
The sentence of content.
It in an implementation, and include incomplete sentence if the first document content is in same paragraph, then terminal can
Will include the sentence of the first document content as the second document content, that is to say, that no matter the first document content whether included
Whole sentence, as long as the second document content is all the sentence comprising the first document content comprising incomplete sentence, for example, the
One document content only includes an incomplete sentence, and the second document content is the complete words where the first document content,
As shown in Fig. 3 (a), for example the first document content includes a complete sentence and an incomplete sentence, the second document content
It is the complete words where the complete words and imperfect sentence in the first document content, as shown in Fig. 3 (b).
In addition, user can also cooperate shortcut key to choose oneself final the second document content to be chosen, that is, work as detection
It if the first document content is located in same section, and include imperfect sentence when selecting instruction to default expansion, it is determined that include the first text
The section of shelves content, wherein default expand selects instruction to can be the control key etc. in keyboard, is also possible to the sound of the mobile terminals such as mobile phone
Measure key or power button.
Specifically, the specific processing of situation one can be such that if the front distance in the initial character of the first document content is first
The nearest section first symbol of character, it is identical as the nearest section first symbol of the front distance trailing character of the trailing character in the first document content,
Moreover, the previous character of initial character is not end mark or section first symbol or trailing character is not that end mark or section terminate
Symbol, it is determined that nearest sentence end mark or section first symbol, the sentence end mark that will be determined before the initial character of the first document content
Or the character after section first symbol, as the initial character of sentence, and when the trailing character of the first document content is sentence end mark or section knot
When beam accords with, using the trailing character of the first document content as the trailing character of sentence, when the trailing character of the first document content is not that sentence terminates
Symbol and when section end mark determines nearest sentence end mark after the trailing character of the first document content, the trailing character as sentence;It is based on
The initial character and trailing character of sentence determine the sentence comprising the first document content.
In an implementation, an end mark, section first symbol and section end mark can be previously provided in terminal, for example, sentence terminates
Symbol can be fullstop, question mark or exclamation mark, and section first symbol can be carriage return character, preset number space character or hypertext markup
Language section start label (for example,<p>), section end mark can be carriage return character or hypertext markup language section receive label (for example,
</p>) etc..
After obtaining the first document content, terminal may determine that the paragraph properties of the first document content, if in the first document
The nearest section first symbol of the front distance initial character of the initial character of content, the front distance tail word with the trailing character in the first document content
Accord with that nearest section first symbol is identical, moreover, the previous character of initial character is not end mark or section first symbol or trailing character
It is not end mark or section end mark, then can determines the sentence comprising the first document, wherein the initial character of determining sentence can be passed through
And trailing character, to determine the sentence comprising the first document content, i.e., comprising between the two all including initial character and trailing character
Character is the character that this includes.Specifically, the method for determining initial character can be such that the initial character for determining the first document content
Before nearest sentence end mark or section first symbol (i.e. before the initial character of the first document content, possibility sentence end mark distance
The initial character of one document content is recently (for example, a part that the first document content is a certain section of intermediate sentence), it is also possible to Duan Kai
The initial character for beginning to accord with the first document content of distance is nearest (for example, the first document content is a certain section first a part),
When the initial character of sentence end mark the first document content of distance is nearest, nearest sentence before determining the initial character of the first document content
End mark, when the initial character of section first symbol the first document content of distance is nearest, before the initial character for determining the first document content
Nearest section first symbol), the initial character by the character after the sentence end mark determined or section first symbol, as sentence.Determine tail
Whether it can be an end mark or section end mark according to the trailing character of the first document content that the method for character can be such that, determine
The trailing character of sentence can be by the first document content when the trailing character of the first document content is sentence end mark or section end mark
Trailing character of the trailing character as sentence, in such cases, the first document content are the later half sentence of the sentence comprising the first document content;
When the trailing character of the first document content is not an end mark and section end mark, can determine the first document content trailing character it
Nearest sentence end mark afterwards, as the trailing character of sentence, as shown in Fig. 3 (a).
Situation two if the first document content is located in same section, and does not include imperfect sentence, it is determined that includes the first text
The section of shelves content.
In an implementation, if the first document content is located at same section, and imperfect sentence, i.e. the first document content position are not included
It in same section, and is all complete sentence, then terminal can such as be schemed using the section comprising the first document content as the second document content
Shown in 4.
In addition, user can also cooperate shortcut key to choose oneself final the second document content to be chosen, that is, work as detection
When selecting instruction to default expansion, if the first document content is located in same section, and imperfect sentence is not included, it is determined that include first
Whole document contents of document content destination document, wherein it is default to expand choosing instruction and can be control key etc. in keyboard, it can also be with
It is the volume key or power button of the mobile terminals such as mobile phone.
Specifically, the treatment process of situation two can be such that if the front distance in the initial character of the first document content is first
The nearest section first symbol of character, it is identical as the nearest section first symbol of the front distance trailing character of the trailing character in the first document content,
Moreover, the previous character of initial character is an end mark or section first symbol and trailing character is an end mark or section end mark, then really
Nearest section first symbol before the initial character of fixed first document content, by the character after the section first symbol determined, as section
Initial character, and when the trailing character of the first document content be section end mark when, by the word before the trailing character of the first document content
Trailing character as section is accorded with, when the trailing character of the first document content is not section end mark, determines the tail word of the first document content
Nearest section end mark after symbol, the trailing character by the character before the section end mark determined, as section;Lead-in based on section
Symbol and trailing character determine described section comprising the first document content.
In an implementation, after obtaining the first document content, terminal may determine that the paragraph properties of the first document content, if
The nearest section first symbol of the front distance initial character of the initial character of first document content, and before the trailing character of the first document content
The section first symbol nearest apart from trailing character is identical, moreover, the previous character of initial character is that an end mark or section first symbol (exist
Before the initial character of first document content, it may be possible to which sentence end mark is for example, the first document content is a certain section of intermediate sentence, it is also possible to
A section first symbol, for example, the first document content is first of a certain section) and trailing character be an end mark or section end mark (i.e.
In the trailing character of the first document content, it may be possible to sentence end mark, for example, the first document content is a certain section of intermediate sentence or does not select
Last sentence of middle section end mark, it is also possible to section end mark, for example, the first document content, which is a certain section, chooses a section end mark
Last sentence), then can determine the section comprising the first document, wherein can by determine section initial character and trailing character, come
It determines the section comprising the first document content, i.e., is this section packet comprising all characters between the two including initial character and trailing character
The character contained.Specifically, the section that the method for determining initial character is nearest before can be such that the initial character for determining the first document content
First symbol, the initial character by the character after the section first symbol determined, as section.The method for determining trailing character can be such that
Whether can be a section end mark according to the trailing character of the first document content, the trailing character of section be determined, when the tail of the first document content
When character is section end mark, using the character before the trailing character of the first document content as the trailing character of section, when in the first document
When the trailing character of appearance is not section end mark, determines nearest section end mark after the trailing character of the first document content, will determine
Section end mark before character, the trailing character as section.
Situation three, if the first document content is located in different sections, it is determined that multiple sections comprising the first document content.
In an implementation, if the first document content is located in different sections, terminal can will include the more of the first document content
A section is used as the second document content, that is to say, that no matter whether being wrapped positioned at each section of document content in the first document content
Containing complete sentence, terminal all regard multiple sections comprising the first document content as the second document content, for example, the first document content
It include document content in two adjacent segments is all incomplete sentence, the second document content is the two adjacent sections, such as
Shown in Fig. 5 (a), in another example, the document content for being located therein one section in the first document content includes complete sentence, is located at another
One section of document content only includes incomplete sentence, and the second document content is also two adjacent sections, as shown in Fig. 5 (b).
In addition, user can also cooperate shortcut key to choose oneself final the second document content to be chosen, that is, work as detection
When selecting instruction to default expansion, if the first document content is located in different sections, it is determined that include the first document content destination document
Whole document contents, wherein it is default to expand choosing instruction and can be control key etc. in keyboard, be also possible to the mobile terminals such as mobile phone
Volume key or power button.
Specifically, the treatment process of situation three can be such that if the front distance in the initial character of the first document content is first
The nearest section first symbol of character, it is different from the nearest section first symbol of the front distance trailing character of the trailing character in the first document content,
Nearest section first symbol makees the character after the section first symbol determined before then determining the initial character of the first document content
For multiple sections of initial character, and when the trailing character of the first document content is section end mark, by the trailing character of the first document content
Character before when the trailing character of the first document content is not section end mark, determines the first text as multiple sections of trailing character
Nearest section end mark after the trailing character of shelves content, by the character before the section end mark determined, as multiple sections of tail
Character;Based on multiple sections of initial character and trailing character, multiple sections comprising the first document content are determined.
In an implementation, after obtaining the first document content, terminal may determine that the paragraph properties of the first document content, if
The nearest section first symbol of the front distance initial character of the initial character of first document content, and before the trailing character of the first document content
The section first symbol nearest apart from trailing character is different, then can determine multiple sections comprising the first document, wherein can pass through determination
Multiple sections of initial character and trailing character exists to determine multiple sections comprising the first document content comprising initial character and trailing character
Interior all characters between the two are the multiple section of characters for including.Specifically, the method for determining initial character can be such that really
Nearest section first symbol before the initial character of fixed first document content, by the character after the section first symbol determined, as more
A section of initial character.Whether it can be section knot according to the trailing character of the first document content that the method for determining trailing character can be such that
Beam symbol, determines multiple sections of trailing character, can be by the first document content when the trailing character of the first document content is section end mark
Trailing character before character as multiple sections of trailing character, when the trailing character of the first document content is not section end mark, really
Nearest section end mark after the trailing character of fixed first document content, by the character before the section end mark determined, as more
A section of trailing character.
Situation four if the first document content is located on the same floor time, and includes the layer in the clearly demarcated document of hierarchical structure
Secondary full content, it is determined that the document content of the upper level comprising the first document content.
In an implementation, in the clearly demarcated document of hierarchical structure, terminal can the level according to locating for the first document content, phase
The second document content of determination answered, for example, the document content under each title is to be located in the document comprising multistage title
The document content of same level if the first document content is located at in level-one title, and includes in the whole in this grade of title
Hold, then for terminal using the corresponding whole document contents of upper level title as the second document content, i.e. terminal is identical by a upper level
The corresponding whole document contents of parallel hierarchy as the second document content, for example, the first document content is complete under 1.1 titles
Portion's document content, the second document content are whole document contents under 1 title, i.e., comprising in whole documents under 1.2 titles
Hold, wherein the document content under document content and 1.2 titles under 1.1 titles belongs to positioned at different levels, the text of a upper level
Shelves content is all whole document contents under 1 title, that is to say, that the document under document content and 1.2 titles under 1.1 titles
Content belongs to the different levels of parallel hierarchy.
Situation five, in the clearly demarcated document of hierarchical structure, if the first document content is located at different levels arranged side by side, really
Surely the document content of multiple parallel hierarchies comprising the first document content.
In an implementation, in the clearly demarcated document of hierarchical structure, terminal can the level according to locating for the first document content, phase
The second document content of determination answered, for example, if the first document content includes under document content and 1.2 titles under 1.1 titles
Document content, then terminal using whole document contents under the whole document contents and 1.2 titles under 1.1 titles as second text
Shelves content.
In step 103, selected state is set by the second document content.
In an implementation, terminal can set selected state for the second document content after determining the second document content.
Optionally, for above situation one, correspondingly, can be such that will be comprising the first document for the treatment process of step 103
The sentence of content is set as selected state.
Optionally, for above situation two, correspondingly, can be such that will be comprising the first document for the treatment process of step 103
The section of content is set as selected state.
Optionally, for above situation three, correspondingly, can be such that will be comprising the first document for the treatment process of step 103
Multiple sections of content are set as selected state.
In the embodiment of the present disclosure, when detecting document content selection operation, quilt in the destination document currently shown is obtained
The first document content chosen determines the second document of the default Doctype comprising the first document content in destination document
The second document content is set selected state by content.In this way, user can be chosen in sub-fraction by manual operation
Hold, most corresponding content is chosen to trigger, it is thus possible to improve the selection efficiency of document content.
Disclosure another exemplary embodiment provides a kind of device for choosing document content, as shown in fig. 6, the device packet
It includes:
Module 610 is obtained, for obtaining quilt in the destination document currently shown when detecting document content selection operation
The first document content chosen.
In an implementation, user browses document in webpage by mobile phone or PC or word document (is properly termed as target text
Shelves) when, it usually needs certain partial document content therein is chosen, user can choose document content therein manually, obtain mould
Block 610 will detect that document content selection operation, be selected manually at this point, will obtain in the destination document currently shown by user
The document content (being properly termed as the first document content) taken.
Determining module 620, in the destination document, determination to get described comprising the acquisition module 610
Second document content of the default Doctype of the first document content.
In an implementation, expansion can be preset to make an accurate selection of then, i.e., it, can be automatic according to the first document content in destination document
Determine include the first document content the second document content, that is to say, that determining module 620 can according to the first document content,
Automatically determine the second document content of the default Doctype comprising the first document content, wherein default Doctype includes sentence
Type or segment type, for example, the first document content is word or incomplete sentence, the second document content be can be comprising the first text
The entire sentence or entire paragraph of shelves content.Wherein, the second document content is only the document content that user finally wants selection.
Setup module 630, second document content for determining the determining module 620 are set as selected
State.
In an implementation, determining module 620 is after determining the second document content, and setup module 630 can will be in the second document
It is installed with and is set to selected state.
Optionally, as shown in fig. 7, the determining module 620, comprising:
Display sub-module 6201 expands option for showing;
Submodule 6202 is determined, for when the triggering for receiving the expansion option that the display sub-module 6201 is shown
When instruction, in the destination document, the second document content of the default Doctype comprising first document content is determined.
In an implementation, when obtaining the first document content that module 610 is selected in obtaining the destination document currently shown,
Display sub-module 6201 can show expansion option, when user wants to expand selected document content, can click expansion choosing
Option determines that submodule 6202 will receive the triggering command for expanding option, in turn, can determine packet in destination document
Second document content of the default Doctype containing the first document content, as shown in Figure 2.
Optionally, the determining module 620, is used for:
If first document content is located in same section, and includes imperfect sentence, it is determined that include first text
The sentence of shelves content;
The setup module 630, is used for:
By the determining module 620 determine described in the sentence comprising first document content be set as selected shape
State.
It in an implementation, in an implementation, and include incomplete sentence if the first document content is in same paragraph
Son, it is determined that module 620 can be using the sentence comprising the first document content as the second document content, that is to say, that no matter first
Whether document content includes complete sentence, as long as the second document content is all comprising the first document comprising incomplete sentence
The sentence of content, for example, the first document content only includes an incomplete sentence, the second document content is in the first document
Complete words where holding, as shown in Fig. 3 (a), for example the first document content includes that a complete sentence and one are incomplete
Sentence, the second document content are the complete words where complete words and imperfect sentence in the first document content, such as
Shown in Fig. 3 (b).The sentence comprising first document content that setup module 630 can determine determining module 620 is set as
Selected state.
Optionally, the determining module 620, is used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is not end mark or section first symbol or the trailing character is not end mark or section end mark, it is determined that
Nearest sentence end mark or section first symbol, the sentence end mark or section determined are opened before the initial character of first document content
The character to begin after according with, as the initial character of sentence, and when the trailing character of first document content is that sentence end mark or section terminate
Fu Shi, using the trailing character of first document content as the trailing character of the sentence, when the trailing character of first document content
When not being sentence end mark and section end mark, nearest sentence end mark after the trailing character of first document content is determined, as
The trailing character of the sentence;Initial character and trailing character based on the sentence determine the sentence comprising first document content.
Optionally, the determining module 620, is used for:
If first document content is located in same section, and does not include imperfect sentence, it is determined that include described first
The section of document content;
The setup module 630, is used for:
By the determining module 620 determine described in the section comprising first document content be set as selected shape
State.
In an implementation, if the first document content is located at same section, and imperfect sentence, i.e. the first document content position are not included
It in same section, and is all complete sentence, it is determined that module 620 can be using the section comprising the first document content as in the second document
Hold, as shown in Figure 4.The section comprising the first document content that setup module 630 can determine determining module 620 be set as by
Selected state.
Optionally, the determining module 620, is used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is an end mark or section first symbol and the trailing character is an end mark or section end mark, it is determined that described
Nearest section first symbol before the initial character of one document content, the head by the character after the section first symbol determined, as section
Character, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character as described section of trailing character, when the trailing character of first document content is not section end mark, determine described
Nearest section end mark after the trailing character of one document content, by the character before the section end mark determined, as described section
Trailing character;Based on described section of initial character and trailing character, described section comprising first document content is determined.
Optionally, the determining module 620, is used for:
If first document content is located in different sections, it is determined that multiple sections comprising first document content;
The setup module 630, is used for:
By the determining module 620 determine described in comprising multiple sections of first document content be set as selected
State.
In an implementation, if the first document content is located in different sections, determining module 620 can will include in the first document
Multiple sections held are used as the second document contents, that is to say, that no matter the document content for being located at each section in the first document content
It whether include complete sentence, determining module 620 all regard multiple sections comprising the first document content as the second document content, example
Such as, it is all incomplete sentence that the first document content, which includes the document content in two adjacent segments, and the second document content is phase
The two adjacent sections, as shown in Fig. 5 (a), in another example, the document content for being located therein one section in the first document content has included
Whole sentence only includes incomplete sentence positioned at another section of document content, and the second document content is also two adjacent sections,
As shown in Fig. 5 (b).The multiple sections of settings comprising the first document content that setup module 630 can determine determining module 620
To be selected state.
Optionally, the determining module 620, is used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
It is different to state the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content, it is determined that first document
Nearest section first symbol before the initial character of content, by the character after the section first symbol determined, as multiple sections of lead-in
Symbol, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character is as the multiple section of trailing character, when the trailing character of first document content is not section end mark, determine described in
Nearest section end mark after the trailing character of first document content, by the character before the section end mark determined, as described
Multiple sections of trailing character;Based on the multiple section of initial character and trailing character, determine described comprising first document content
Multiple sections.
In the embodiment of the present disclosure, when detecting document content selection operation, quilt in the destination document currently shown is obtained
The first document content chosen determines the second document of the default Doctype comprising the first document content in destination document
The second document content is set selected state by content.In this way, user can be chosen in sub-fraction by manual operation
Hold, most corresponding content is chosen to trigger, it is thus possible to improve the selection efficiency of document content.
It should be understood that it is provided by the above embodiment choose document content device when choosing document content, only with
The division progress of above-mentioned each functional module can according to need and for example, in practical application by above-mentioned function distribution by not
Same functional module is completed, i.e., the internal structure of terminal is divided into different functional modules, to complete whole described above
Or partial function.In addition, the device provided by the above embodiment for choosing document content and the method for choosing document content are implemented
Example belongs to same design, and specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Disclosure another exemplary embodiment shows a kind of structural schematic diagram of terminal.The terminal can be mobile phone, PC
Deng.
Referring to Fig. 8, terminal 800 may include following one or more components: processing component 802, memory 804, power supply
Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and
Communication component 816.
The integrated operation of the usual controlling terminal 800 of processing component 802, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing element 802 may include that one or more processors 820 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just
Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate
Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in terminal 800.These data are shown
Example includes the instruction of any application or method for operating in terminal 800, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Electric power assembly 806 provides electric power for the various assemblies of terminal 800.Electric power assembly 806 may include power management system
System, one or more power supplys and other with for audio output apparatus 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between the terminal 800 and user.One
In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen
Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings
Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action
Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers
Body component 808 includes a front camera and/or rear camera.When terminal 800 is in operation mode, such as screening-mode or
When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and
Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike
Wind (MIC), when audio output apparatus 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, wheat
Gram wind is configured as receiving external audio signal.The received audio signal can be further stored in memory 804 or warp
It is sent by communication component 816.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for terminal 800 is commented
Estimate.For example, sensor module 814 can detecte the state that opens/closes of terminal 800, and the relative positioning of component, for example, it is described
Component is the display and keypad of terminal 800, and sensor module 814 can also detect 800 1 components of terminal 800 or terminal
Position change, the existence or non-existence that user contacts with terminal 800,800 orientation of terminal or acceleration/deceleration and terminal 800
Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact
Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at
As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors
Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between terminal 800 and other equipment.Terminal
800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation
In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel.
In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, terminal 800 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of terminal 800 to complete the above method.For example,
The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk
With optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is held by the processor of terminal
When row, enable the terminal to execute a kind of method for choosing document content, this method comprises:
When detecting document content selection operation, obtain in the first document being selected in the destination document currently shown
Hold;
In the destination document, determine to include in the second document of default Doctype of first document content
Hold;
Selected state is set by second document content.
Optionally, the default Doctype includes sentence type or segment type.
Optionally, described in the destination document, determine the default Doctype comprising first document content
Second document content, comprising:
Option is expanded in display;
When receiving the triggering command for expanding option, in the destination document, determine comprising first text
Second document content of the default Doctype of shelves content.
Optionally, the determination includes the second document content of the default Doctype of first document content, comprising:
If first document content is located in same section, and includes imperfect sentence, it is determined that include first text
The sentence of shelves content;
It is described to set selected state for second document content, comprising:
Selected state is set by the sentence comprising first document content.
It optionally, if first document content is located in same section, and include imperfect sentence, it is determined that include
The sentence of first document content, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is not end mark or section first symbol or the trailing character is not end mark or section end mark, it is determined that
Nearest sentence end mark or section first symbol, the sentence end mark or section determined are opened before the initial character of first document content
The character to begin after according with, as the initial character of sentence, and when the trailing character of first document content is that sentence end mark or section terminate
Fu Shi, using the trailing character of first document content as the trailing character of the sentence, when the trailing character of first document content
When not being sentence end mark and section end mark, nearest sentence end mark after the trailing character of first document content is determined, as
The trailing character of the sentence;Initial character and trailing character based on the sentence determine the sentence comprising first document content.
Optionally, the determination includes the second document content of the default Doctype of first document content, comprising:
If first document content is located in same section, and does not include imperfect sentence, it is determined that include described first
The section of document content;
It is described to set selected state for second document content, comprising:
Selected state is set by the section comprising first document content.
Optionally, if first document content is located in same section, and imperfect sentence is not included, it is determined that packet
Section containing first document content, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
State that the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content is identical, moreover, the initial character
Previous character is an end mark or section first symbol and the trailing character is an end mark or section end mark, it is determined that described
Nearest section first symbol before the initial character of one document content, the head by the character after the section first symbol determined, as section
Character, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character as described section of trailing character, when the trailing character of first document content is not section end mark, determine described
Nearest section end mark after the trailing character of one document content, by the character before the section end mark determined, as described section
Trailing character;Based on described section of initial character and trailing character, described section comprising first document content is determined.
Optionally, the determination includes the second document content of the default Doctype of first document content, comprising:
If first document content is located in different sections, it is determined that multiple sections comprising first document content;
It is described to set selected state for second document content, comprising:
Selected state is set by multiple sections comprising first document content.
Optionally, if first document content is located in different sections, it is determined that comprising in first document
Multiple sections held, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and in institute
It is different to state the nearest section first symbol of trailing character described in the front distance of the trailing character of the first document content, it is determined that first document
Nearest section first symbol before the initial character of content, by the character after the section first symbol determined, as multiple sections of lead-in
Symbol, and when the trailing character of first document content is section end mark, before the trailing character of first document content
Character is as the multiple section of trailing character, when the trailing character of first document content is not section end mark, determine described in
Nearest section end mark after the trailing character of first document content, by the character before the section end mark determined, as described
Multiple sections of trailing character;Based on the multiple section of initial character and trailing character, determine described comprising first document content
Multiple sections.
In the embodiment of the present disclosure, when detecting document content selection operation, quilt in the destination document currently shown is obtained
The first document content chosen determines the second document of the default Doctype comprising the first document content in destination document
The second document content is set selected state by content.In this way, user can be chosen in sub-fraction by manual operation
Hold, most corresponding content is chosen to trigger, it is thus possible to improve the selection efficiency of document content.
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (17)
1. a kind of method for choosing document content, which is characterized in that the described method includes:
When detecting document content selection operation, the first document content being selected in the destination document currently shown is obtained;
If the hierarchical structure of the destination document is clearly demarcated, and first document content is located on the same floor time, and includes described
The full content of same level, then in the destination document, by the document of the upper level comprising first document content
Content is determined as the second document content;
If the hierarchical structure of the destination document is clearly demarcated, and first document content is located at different levels arranged side by side, then exists
In the destination document, the document content of multiple parallel hierarchies comprising first document content is determined as in the second document
Hold;
Selected state is set by second document content.
2. the method according to claim 1, wherein it is described detect document content selection operation after, also wrap
It includes:
Option is expanded in display;
When receiving the triggering command for expanding option, execute described by the upper level comprising first document content
Document content be determined as the second document content, alternatively, by the document of multiple parallel hierarchies comprising first document content
Content is determined as the step of the second document content.
3. the method according to claim 1, wherein the method also includes:
It then will include first document content if first document content is located in same section, and includes imperfect sentence
Sentence be determined as second document content.
4. if according to the method described in claim 3, it is characterized in that, first document content is located at same section
It is interior, and include imperfect sentence, then the sentence comprising first document content is determined as second document content, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and described
The nearest section first symbol of trailing character described in the front distance of the trailing character of one document content is identical, moreover, the initial character is previous
A character is not end mark or section first symbol or the trailing character is not end mark or section end mark, it is determined that described
Nearest sentence end mark or section first symbol before the initial character of first document content, by the sentence end mark determined or section first symbol
Character later, as the initial character of sentence, and when the trailing character of first document content is sentence end mark or section end mark,
Using the trailing character of first document content as the trailing character of the sentence, when the trailing character of first document content is not sentence
When end mark and section end mark, nearest sentence end mark after the trailing character of first document content is determined, as the sentence
Trailing character;Initial character and trailing character based on the sentence determine the sentence comprising first document content;Institute will be included
The sentence for stating the first document content is determined as second document content.
5. the method according to claim 1, wherein the method also includes:
It, then will be comprising in first document if first document content is located in same section, and does not include imperfect sentence
The section of appearance is determined as second document content.
6. if according to the method described in claim 5, it is characterized in that, first document content is located at same section
It is interior, and do not include imperfect sentence, then the section comprising first document content is determined as second document content, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and described
The nearest section first symbol of trailing character described in the front distance of the trailing character of one document content is identical, moreover, the initial character is previous
A character is an end mark or section first symbol and the trailing character is an end mark or section end mark, it is determined that first text
Nearest section first symbol before the initial character of shelves content, by the character after the section first symbol determined, as the initial character of section,
And when the trailing character of first document content is section end mark, by the character before the trailing character of first document content
As described section of trailing character, when the trailing character of first document content is not section end mark, first document is determined
Nearest section end mark after the trailing character of content, by the character before the section end mark determined, as described section of tail word
Symbol;Based on described section of initial character and trailing character, described section comprising first document content is determined;It will include described first
Described section of document content is determined as second document content.
7. the method according to claim 1, wherein the method also includes:
If first document content is located in different sections, multiple sections comprising first document content are determined as institute
State the second document content.
8. if the method according to the description of claim 7 is characterized in that first document content is located at different sections
It is interior, then multiple sections comprising first document content are determined as second document content, comprising:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and described
The nearest section first symbol of trailing character described in the front distance of the trailing character of one document content is different, it is determined that first document content
Initial character before nearest section first symbol, by the character after the section first symbol determined, as multiple sections of initial character, and
When the trailing character of first document content is section end mark, the character before the trailing character of first document content is made
For the multiple section of trailing character, when the trailing character of first document content is not section end mark, first text is determined
Nearest section end mark after the trailing character of shelves content, by the character before the section end mark determined, as the multiple section
Trailing character;Based on the multiple section of initial character and trailing character, the multiple section comprising first document content is determined;
The multiple section comprising first document content is determined as second document content.
9. a kind of device for choosing document content, which is characterized in that described device includes:
Module is obtained, for being selected in the destination document that acquisition is currently shown when detecting document content selection operation
First document content;
Determining module, if the hierarchical structure for the destination document is clearly demarcated, and first document content is located on the same floor
It is secondary, and include the full content of the same level, then in the destination document, the upper of first document content will be included
The document content of one level is determined as the second document content;If the hierarchical structure of the destination document is clearly demarcated, and described first
Document content is located at different levels arranged side by side, then in the destination document, by comprising first document content it is multiple simultaneously
The document content of column level is determined as the second document content;
Setup module, second document content for determining the determining module are set as selected state.
10. device according to claim 9, which is characterized in that the determining module includes:
Display sub-module expands option for showing;
It determines submodule, will include first text for when receiving the triggering command for expanding option, executing described
The document content of a upper level for shelves content is determined as the second document content, alternatively, will include the more of first document content
The step of document content of a parallel hierarchy is determined as the second document content.
11. device according to claim 9, which is characterized in that the determining module is also used to:
It then will include first document content if first document content is located in same section, and includes imperfect sentence
Sentence be determined as second document content.
12. device according to claim 11, which is characterized in that the determining module is specifically used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and described
The nearest section first symbol of trailing character described in the front distance of the trailing character of one document content is identical, moreover, the initial character is previous
A character is not end mark or section first symbol or the trailing character is not end mark or section end mark, it is determined that described
Nearest sentence end mark or section first symbol before the initial character of first document content, by the sentence end mark determined or section first symbol
Character later, as the initial character of sentence, and when the trailing character of first document content is sentence end mark or section end mark,
Using the trailing character of first document content as the trailing character of the sentence, when the trailing character of first document content is not sentence
When end mark and section end mark, nearest sentence end mark after the trailing character of first document content is determined, as the sentence
Trailing character;Initial character and trailing character based on the sentence determine the sentence comprising first document content;Institute will be included
The sentence for stating the first document content is determined as second document content.
13. device according to claim 9, which is characterized in that the determining module is also used to:
It, then will be comprising in first document if first document content is located in same section, and does not include imperfect sentence
The section of appearance is determined as second document content.
14. device according to claim 13, which is characterized in that the determining module is specifically used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and described
The nearest section first symbol of trailing character described in the front distance of the trailing character of one document content is identical, moreover, the initial character is previous
A character is an end mark or section first symbol and the trailing character is an end mark or section end mark, it is determined that first text
Nearest section first symbol before the initial character of shelves content, by the character after the section first symbol determined, as the initial character of section,
And when the trailing character of first document content is section end mark, by the character before the trailing character of first document content
As described section of trailing character, when the trailing character of first document content is not section end mark, first document is determined
Nearest section end mark after the trailing character of content, by the character before the section end mark determined, as described section of tail word
Symbol;Based on described section of initial character and trailing character, described section comprising first document content is determined;It will include described first
Described section of document content is determined as second document content.
15. device according to claim 9, which is characterized in that the determining module is also used to:
If first document content is located in different sections, multiple sections comprising first document content are determined as institute
State the second document content.
16. device according to claim 15, which is characterized in that the determining module is specifically used for:
If the nearest section first symbol of the initial character described in the front distance of the initial character of first document content, and described
The nearest section first symbol of trailing character described in the front distance of the trailing character of one document content is different, it is determined that first document content
Initial character before nearest section first symbol, by the character after the section first symbol determined, as multiple sections of initial character, and
When the trailing character of first document content is section end mark, the character before the trailing character of first document content is made
For the multiple section of trailing character, when the trailing character of first document content is not section end mark, first text is determined
Nearest section end mark after the trailing character of shelves content, by the character before the section end mark determined, as the multiple section
Trailing character;Based on the multiple section of initial character and trailing character, the multiple section comprising first document content is determined;
The multiple section comprising first document content is determined as second document content.
17. a kind of device for choosing document content characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
When detecting document content selection operation, the first document content being selected in the destination document currently shown is obtained;
If the hierarchical structure of the destination document is clearly demarcated, and first document content is located on the same floor time, and includes described
The full content of same level, then in the destination document, by the document of the upper level comprising first document content
Content is determined as the second document content;
If the hierarchical structure of the destination document is clearly demarcated, and first document content is located at different levels arranged side by side, then exists
In the destination document, the document content of multiple parallel hierarchies comprising first document content is determined as in the second document
Hold;
Selected state is set by second document content.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610282736.1A CN105955616B (en) | 2016-04-29 | 2016-04-29 | A kind of method and apparatus for choosing document content |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610282736.1A CN105955616B (en) | 2016-04-29 | 2016-04-29 | A kind of method and apparatus for choosing document content |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105955616A CN105955616A (en) | 2016-09-21 |
CN105955616B true CN105955616B (en) | 2019-05-07 |
Family
ID=56914506
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610282736.1A Active CN105955616B (en) | 2016-04-29 | 2016-04-29 | A kind of method and apparatus for choosing document content |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105955616B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106970758B (en) * | 2016-12-01 | 2020-07-03 | 阿里巴巴集团控股有限公司 | Electronic document operation processing method and device and electronic equipment |
CN107679038B (en) * | 2017-10-16 | 2021-05-28 | 鼎富智能科技有限公司 | Method and device for extracting text paragraphs |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2669779A1 (en) * | 2012-05-29 | 2013-12-04 | BlackBerry Limited | Portable electronic device including touch-sensitive display and method of controlling same |
CN104050158A (en) * | 2014-06-27 | 2014-09-17 | 吴涛军 | Automatic quotation extraction method and device with semantic integrity kept |
CN104102452A (en) * | 2014-07-11 | 2014-10-15 | 厦门美图移动科技有限公司 | Enhancement mode text selection method of touch screen |
CN104281394A (en) * | 2013-07-05 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Method and device for intelligently selecting words |
CN105786309A (en) * | 2014-12-26 | 2016-07-20 | 广州市动景计算机科技有限公司 | Text selection method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7683889B2 (en) * | 2004-12-21 | 2010-03-23 | Microsoft Corporation | Pressure based selection |
US9069416B2 (en) * | 2010-03-25 | 2015-06-30 | Google Inc. | Method and system for selecting content using a touchscreen |
-
2016
- 2016-04-29 CN CN201610282736.1A patent/CN105955616B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2669779A1 (en) * | 2012-05-29 | 2013-12-04 | BlackBerry Limited | Portable electronic device including touch-sensitive display and method of controlling same |
CN104281394A (en) * | 2013-07-05 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Method and device for intelligently selecting words |
CN104050158A (en) * | 2014-06-27 | 2014-09-17 | 吴涛军 | Automatic quotation extraction method and device with semantic integrity kept |
CN104102452A (en) * | 2014-07-11 | 2014-10-15 | 厦门美图移动科技有限公司 | Enhancement mode text selection method of touch screen |
CN105786309A (en) * | 2014-12-26 | 2016-07-20 | 广州市动景计算机科技有限公司 | Text selection method and device |
Also Published As
Publication number | Publication date |
---|---|
CN105955616A (en) | 2016-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2568374B1 (en) | Mobile terminal and method for providing user interface thereof | |
CN106155517B (en) | Mobile terminal and control method thereof | |
CN104038827B (en) | Multi-medium play method and device | |
KR102196671B1 (en) | Electronic Device And Method Of Controlling The Same | |
KR101929301B1 (en) | Method and apparatus for control actuating function through recognizing user's writing gesture in portable terminal | |
CN106020634B (en) | Screenshotss method and device | |
CN103916535A (en) | Mobile terminal and controlling method thereof | |
CN105306752B (en) | The method and device that generation event is reminded | |
CN104683565A (en) | Mobile terminal and controlling method thereof | |
CN103793097A (en) | Mobile terminal and control method thereof | |
US20140136977A1 (en) | Mobile terminal and control method thereof | |
KR101709427B1 (en) | Method and device for selecting information | |
CN106789551B (en) | Conversation message methods of exhibiting and device | |
CN108038102A (en) | Recommendation method, apparatus, terminal and the storage medium of facial expression image | |
CN105068976A (en) | Ticket information exhibition method and device | |
CN107229403B (en) | Information content selection method and device | |
CN105447109A (en) | Key word searching method and apparatus | |
CN112632327A (en) | Lyric processing method, device, electronic equipment and computer readable storage medium | |
CN112764869A (en) | Work editing prompting method and device, electronic equipment and storage medium | |
CN106503131A (en) | Obtain the method and device of interest information | |
CN104679386B (en) | The method and apparatus of recording processing | |
CN105955616B (en) | A kind of method and apparatus for choosing document content | |
US20220208156A1 (en) | Method for generating song melody and electronic device | |
CN105187671A (en) | Recording method and device | |
CN110085066A (en) | Show the method, apparatus and electronic equipment of reading information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |