WO2017219595A1 - 文本选择方法及装置 - Google Patents

文本选择方法及装置 Download PDF

Info

Publication number
WO2017219595A1
WO2017219595A1 PCT/CN2016/106379 CN2016106379W WO2017219595A1 WO 2017219595 A1 WO2017219595 A1 WO 2017219595A1 CN 2016106379 W CN2016106379 W CN 2016106379W WO 2017219595 A1 WO2017219595 A1 WO 2017219595A1
Authority
WO
WIPO (PCT)
Prior art keywords
selection point
text
display position
drag
point
Prior art date
Application number
PCT/CN2016/106379
Other languages
English (en)
French (fr)
Inventor
王熙
徐胜强
谢然
易海洋
Original Assignee
北京小米移动软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Priority to RU2017112514A priority Critical patent/RU2668736C1/ru
Priority to JP2017502605A priority patent/JP2018530015A/ja
Publication of WO2017219595A1 publication Critical patent/WO2017219595A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction 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/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Definitions

  • the present disclosure relates to the field of text processing, and in particular, to a text selection method and apparatus.
  • the text to be selected is semantically divided into several text blocks that conform to the semantic granularity.
  • the first display position of the start selection point or the end selection point is changed to The second display position includes:
  • the dividing module includes:
  • a first determining sub-module configured to determine a semantic granularity, the semantic granularity being a word, a sentence, or a paragraph;
  • the forward drag is at least one of a horizontal left drag and a vertical upward drag
  • the backward drag is at least one of a horizontal right drag and a vertical downward drag.
  • a text selection apparatus comprising:
  • the first display position of the start selection point or the end selection point is changed to the second display position according to the drag operation in units of text blocks.
  • the text to be selected is semantically divided into several text blocks, and a drag operation corresponding to the start selection point or the end selection point is received.
  • the first display position of the start selection point or the end selection point is changed to the second display position according to the drag operation, and the display position of the selection point is determined only according to the user operation in the related art.
  • the operation is not accurate, which leads to the problem that the target text is not selected accurately. It is achieved that the selected target text is changed in units of text blocks divided according to semantics, so that the content of the selected target text conforms to the semantics and more accurate effects. .
  • FIG. 1 is a flowchart of a text selection method according to an exemplary embodiment
  • FIG. 2 is a flowchart of a text selection method according to another exemplary embodiment
  • FIG. 3A is a schematic diagram of an interface according to another exemplary embodiment
  • FIG. 3B is a schematic diagram of an interface according to another exemplary embodiment
  • FIG. 4A is a schematic diagram of an interface according to another exemplary embodiment
  • 4B is a schematic diagram of an interface, according to another exemplary embodiment.
  • 4C is a schematic diagram of an interface, according to another exemplary embodiment.
  • FIG. 5A is a schematic diagram of an interface according to another exemplary embodiment
  • FIG. 5B is a schematic diagram of an interface according to another exemplary embodiment
  • FIG. 5C is a schematic diagram of an interface according to another exemplary embodiment.
  • FIG. 6 is a flowchart of a text selection method according to another exemplary embodiment
  • FIG. 7 is a block diagram of a text selection apparatus according to an exemplary embodiment
  • FIG. 8 is a block diagram of a text selection apparatus according to another exemplary embodiment.
  • FIG. 9 is a block diagram of a text selection apparatus, according to another exemplary embodiment.
  • the text selection method provided by various embodiments of the present disclosure may be implemented by a terminal having a display screen.
  • the terminal can be a mobile phone, a tablet computer, an e-book reader, a MP3 (Moving Picture Experts Group Audio Layer III) player, and an MP4 (Moving Picture Experts Group Audio Layer IV). Level 4) Electronic devices such as players, laptops, and desktop computers.
  • FIG. 1 is a flow chart showing a text selection method according to an exemplary embodiment. This embodiment is exemplified by applying the text selection method to the terminal, and includes the following steps:
  • step 101 in the text to be selected, the first display position of the start selection point and the end selection point is determined, and the text between the start selection point and the end selection point is the target text, and the target text includes at least one character.
  • step 102 the text to be selected is semantically divided into a number of text blocks.
  • step 103 a drag operation corresponding to the start selection point or the end selection point is received.
  • step 104 the first display position of the start selection point or the end selection point is changed to the second display position according to the drag operation in units of text blocks.
  • the text selection method determines the first display position of the initial selection point and the end selection point in the text to be selected, and divides the text to be selected into semantics according to semantics. Drying a text block, receiving a drag operation corresponding to the start selection point or the end selection point, and changing the first display position of the start selection point or the end selection point to the second display according to the drag operation in units of text blocks Position; solves the problem that the display position of the selection point is determined only according to the user operation in the related art, and the selection of the target text is not accurate due to the inaccurate user operation; the selection is made in units of text blocks divided according to semantics.
  • the target text makes the content of the selected target text conform to the semantics and more accurate effects.
  • FIG. 2 is a flow chart showing a text selection method according to another exemplary embodiment. This embodiment is exemplified by applying the text selection method to the terminal, and includes the following steps:
  • step 201 an operation corresponding to the text to be selected is received, the operation causing the text to be selected to enter the selection mode.
  • the text to be selected is any one of the texts displayed in the terminal.
  • the operation is a click operation, when the terminal detects that the operation duration of the click operation corresponding to the text to be selected is greater than a predetermined threshold, or when detecting that the click operation is a double-click operation, the text to be selected is entered into the selection mode, wherein
  • the predetermined threshold is preset by the system or customized by the user, which is not limited in this embodiment.
  • step 202 in the text to be selected, the first display position of the start selection point and the end selection point is determined, and the text between the start selection point and the end selection point is the target text, and the target text includes at least one character.
  • a start selection point and an end selection point appear in the text, and the text between the start selection point and the end selection point is the target text, the start selection point and the end selection point.
  • the first display position is within a predetermined area of the operation point at which the operation is received, and the present embodiment does not limit the style of the start selection point and the end selection point, and the predetermined area.
  • the first display position of the initial selection point is in front of the first display position of the end selection point, and the front side is at least one of a horizontal left side and a vertical upper side.
  • an operation menu for operating the target text appears, and the operation menu includes: setting options of semantic granularity, and operation options for the selected target text, this embodiment
  • the content and form of the operation menu and the position where it appears are not limited.
  • At least one of the background display color, the text color, and the text font of the target text is different from the other texts, so that the display effect of the target text is different from other texts, which is not limited in this embodiment. set.
  • the terminal 301 displays the text 302 to be selected.
  • the text 302 to be selected enters. Select the mode.
  • a start selection point 304 and an end selection point 305 appear, and an operation menu 306, as shown in FIG. 3B.
  • the first display position of the start selection point 304 and the end selection point 305 is within a predetermined area around the operation point 303, and the target text between the start selection point 304 and the end selection point 305 is the target text.
  • the operation menu 306 includes a setting option 307 for semantic granularity and an operational option 308 for the target text.
  • the setting option 307 of the semantic granularity includes: words, sentences and paragraphs
  • the operation options 308 for the target text include: copying and cutting.
  • step 203 semantic granularity is determined, which is a word, sentence, or paragraph.
  • the terminal receives the operation corresponding to the setting option of the semantic granularity in the operation menu to determine the semantic granularity.
  • step 204 the text to be selected is semantically divided into a number of text blocks that conform to the semantic granularity.
  • the terminal matches the character string in the text to be selected with the term in the machine dictionary, if the character string in the text to be selected is a term in the machine dictionary, then Dividing the string into a block of text. If the character in the text to be selected cannot be combined with the characters before and after it becomes a term in the machine dictionary, the character is used as a block of text, that is, when the semantic granularity is a word
  • the divided blocks of text are words, characters, or punctuation.
  • the terminal divides the text to be selected into several text blocks by detecting punctuation of the text to be selected, and each text block is a sentence, including a string and a character string. Punctuation.
  • the terminal divides the text to be selected into a plurality of text blocks by detecting a line break in the text to be selected, and each text block is a paragraph.
  • This embodiment does not limit the division method.
  • the division result of the text 302 to be selected is as shown in FIG. 4A, with "/" as a gap between text blocks; when semantic granularity When it is a sentence, the division result of the selection text 302 is as shown in FIG. 4B, with "/" as the text block.
  • the gap; when the semantic granularity is a paragraph, the division result of the text 302 to be selected is as shown in FIG. 4C, with "/" as a gap between the text blocks.
  • step 205 when the first display position of the at least one selection point in the initial selection point and the end selection point is located inside the text block, the first display position of the start selection point and the end selection point is adjusted according to the text block, so that The first display position of the start selection point and the end selection point respectively stay at a closest gap position, and the gap position is a position between two text blocks.
  • adjusting the first display position of the start selection point and the end selection point according to the text block so that the first display position of the start selection point moves forward and stays at a gap position between the text block and the previous text block, so that The second display position of the end selection point moves backward and stays at a gap position between the text block and the next text block, wherein the forward movement is at least one of a lateral leftward movement and a vertical upward movement, and the backward movement is At least one of a lateral rightward movement and a vertical downward movement.
  • step is optional.
  • the step is not necessary to perform the step to adjust the first display position.
  • the result of dividing the text to be selected 302 is as shown in FIG. 4A, and the initial selection point 304 and the end selection point 305 in FIG. 3B are adjusted to As shown in FIG. 5A; when the semantic granularity is a sentence, the initial selection point 304 and the end selection point 305 in FIG. 3B are adjusted as shown in FIG. 5B; when the semantic granularity is a paragraph, in FIG. 3B The start selection point 304 and the end selection point 305 are adjusted as shown in FIG. 5C.
  • step 206 a drag operation corresponding to the start selection point or the end selection point is received.
  • step 207 when the drag operation is to drag the start selection point forward, the first display position of the start selection point is moved forward by several text blocks to obtain a second display position.
  • the forward drag is at least one of a horizontal left drag and a vertical upward drag.
  • the backward dragging is at least one of a horizontal right drag and a vertical downward drag.
  • the first display position moves forward or backward according to the drag operation by a predetermined number.
  • any of the foregoing steps 207-210 may be replaced by the steps shown in FIG. 6:
  • step 602 a gap position closest to the end position is found, the gap position being the position between the two text blocks.
  • the end position is the same as the distance between the left and right gap positions, it randomly stays at one of the gap positions.
  • the dividing module 720 is configured to divide the text to be selected into a plurality of text blocks according to semantics
  • the text selection method determines the first display position of the start selection point and the end selection point in the text to be selected, and divides the text to be selected into several text blocks according to semantics. Receiving a drag operation corresponding to the start selection point or the end selection point, and changing the first display position of the start selection point or the end selection point to the second display position according to the drag operation in units of text blocks;
  • the display position of the selection point is determined according to the user operation, and the selection of the target text is not accurate due to the inaccurate user operation; the selected target text is changed in units of text blocks divided according to semantics.
  • the content of the selected target text is semantic and more Accurate results.
  • the dividing module 820 includes:
  • the operation module 850 is configured to change the first display position of the start selection point or the end selection point to the second display position according to the drag operation in units of text blocks.
  • An exemplary embodiment of the present disclosure provides a text selection apparatus capable of implementing a text selection method provided by the present disclosure, the apparatus comprising: a processor, a memory for storing processor executable instructions;
  • Memory 904 is configured to store various types of data to support operation at device 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 904 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 906 provides power to various components of device 900.
  • Power component 906 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 900.
  • the I/O interface 912 provides an interface between the processing component 902 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 914 includes one or more sensors for providing device 900 with various aspects of status assessment.
  • sensor component 914 can detect an open/closed state of device 900, a relative positioning of components, such as a display and a keypad of device 900, and sensor component 914 can also detect a change in position of one component of device 900 or device 900, user The presence or absence of contact with device 900, device 900 orientation or acceleration/deceleration and temperature variation of device 900.
  • Sensor assembly 914 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 914 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 916 is configured to facilitate wired or wireless communication between device 900 and other devices.
  • the device 900 can access a wireless network based on a communication standard, such as Wi-Fi, 2G or 3G, or a combination thereof.
  • communication component 916 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • communication component 916 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth

Landscapes

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

Abstract

一种文本选择方法及装置,属于文本处理领域,所述方法包括:在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符(101),将待选择文本按照语义划分为若干个文本块(102),接收对应于起始选择点或结束选择点的拖动操作(103),以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置(104)。该方法解决了相关技术中仅根据用户操作确定选择点的显示位置,由于用户操作不精确而导致对目标文本选定不够准确的问题;达到了以根据语义划分的文本块为单位,改变选定的目标文本,使选定的目标文本的内容符合语义,更为准确的效果。

Description

文本选择方法及装置
本申请基于申请号为201610466423.1、申请日为2016年06月23日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及文本处理领域,特别涉及一种文本选择方法及装置。
背景技术
当用户需要对文本区域的内容进行复制、标记、移动等操作时,通常先要将文本区域进行选定。
在通过触摸屏进行操作的终端中,当文本进入选择模式后,文本上出现前后两个选择点,用户通过手指拖动前后两个选择点选定文本区域,由于手指对选择点的操作不精确,导致对文本区域的选定不够准确。
发明内容
为了解决对文本区域选定不准确的问题,本公开提供一种文本选择方法及装置。所述技术方案如下:
根据本公开实施例的第一方面,提供一种文本选择方法,该方法包括:
在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符;
将待选择文本按照语义划分为若干个文本块;
接收对应于起始选择点或结束选择点的拖动操作;
以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置。
可选的,将待选择文本按照语义划分为若干个文本块,包括:
确定语义颗粒度,语义颗粒度是词语、句子或段落;
将待选择文本按照语义划分为符合语义颗粒度的若干个文本块。
可选的,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为 第二显示位置,包括:
当拖动操作是将起始选择点向前拖动时,将起始选择点的第一显示位置向前移动若干个文本块得到第二显示位置;
当拖动操作是将起始选择点向后拖动时,将起始选择点的第一显示位置向后移动若干个文本块得到第二显示位置;
当拖动操作是将结束选择点向前拖动时,将结束选择点的第一显示位置向前移动若干个文本块得到第二显示位置;
当拖动操作是将结束选择点向后拖动时,将结束选择点的第一显示位置向后移动若干个文本块得到第二显示位置;
其中,向前拖动是横向向左拖动和竖向向上拖动中的至少一种,向后拖动是横向向右拖动和竖向向下拖动中的至少一种。
可选的,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置,包括:
获取拖动操作的结束位置;
查找与结束位置距离最近的一个间隙位置,间隙位置是两个文本块之间的位置;
将间隙位置确定为起始选择点或结束选择点的第二显示位置。
可选的,该方法还包括:
当起始选择点和结束选择点中存在至少一个选择点的第一显示位置位于文本块内部时,根据文本块调整起始选择点和结束选择点的第一显示位置,使起始选择点和结束选择点的第一显示位置分别停留在距离最近的一个间隙位置,间隙位置是两个文本块之间的位置。
根据本公开实施例的第二方面,提供一种文本选择装置,该装置包括:
确定模块,被配置为在在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符;
划分模块,被配置为将待选择文本按照语义划分为若干个文本块;
接收模块,被配置为接收对应于起始选择点或结束选择点的拖动操作;
操作模块,被配置为以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置。
可选的,划分模块包括:
第一确定子模块,被配置为确定语义颗粒度,语义颗粒度是词语、句子或段落;
划分子模块,被配置为将待选择文本按照语义划分为符合语义颗粒度的若干个文本块。
可选的,操作模块被配置为:
当拖动操作是将起始选择点向前拖动时,将起始选择点的第一显示位置向前移动若干个文本块得到第二显示位置;
当拖动操作是将起始选择点向后拖动时,将起始选择点的第一显示位置向后移动若干个文本块得到第二显示位置;
当拖动操作是将结束选择点向前拖动时,将结束选择点的第一显示位置向前移动若干个文本块得到第二显示位置;
当拖动操作是将结束选择点向后拖动时,将结束选择点的第一显示位置向后移动若干个文本块得到第二显示位置;
其中,向前拖动是横向向左拖动和竖向向上拖动中的至少一种,向后拖动是横向向右拖动和竖向向下拖动中的至少一种。
可选的,操作模块包括:
获取子模块,被配置为获取拖动操作的结束位置;
查找子模块,被配置为查找与结束位置距离最近的一个间隙位置,间隙位置是两个文本块之间的位置;
第二确定子模块,被配置为将间隙位置确定为起始选择点或结束选择点的第二显示位置。
可选的,该装置还包括:
调整模块,被配置为当起始选择点和结束选择点中存在至少一个选择点的第一显示位置位于文本块内部时,根据文本块调整起始选择点和结束选择点的第一显示位置,使起始选择点和结束选择点的第一显示位置分别停留在距离最近的一个间隙位置,间隙位置是两个文本块之间的位置。
根据本公开实施例的第三方面,提供一种文本选择装置,该装置包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,处理器被配置为:
在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符;
将待选择文本按照语义划分为若干个文本块;
接收对应于起始选择点或结束选择点的拖动操作;
以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置。
本公开的实施例提供的技术方案可以包括以下有益效果:
通过在待选择文本中,确定起始选择点和结束选择点的第一显示位置,将待选择文本按照语义划分为若干个文本块,接收对应于起始选择点或结束选择点的拖动操作,以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置;解决了相关技术中仅根据用户操作确定选择点的显示位置,由于用户操作不精确而导致对目标文本选定不够准确的问题;达到了以根据语义划分的文本块为单位,改变选定的目标文本,使选定的目标文本的内容符合语义,更为准确的效果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并于说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种文本选择方法的流程图;
图2是根据另一示例性实施例示出的一种文本选择方法的流程图;
图3A是根据另一示例性实施例示出的一种界面的示意图;
图3B是根据另一示例性实施例示出的一种界面的示意图;
图4A是根据另一示例性实施例示出的一种界面的示意图;
图4B是根据另一示例性实施例示出的一种界面的示意图;
图4C是根据另一示例性实施例示出的一种界面的示意图;
图5A是根据另一示例性实施例示出的一种界面的示意图;
图5B是根据另一示例性实施例示出的一种界面的示意图;
图5C是根据另一示例性实施例示出的一种界面的示意图;
图6是根据另一示例性实施例示出的一种文本选择方法的流程图;
图7是根据一示例性实施例示出的一种文本选择装置的框图;
图8是根据另一示例性实施例示出的一种文本选择装置的框图;
图9是根据另一示例性实施例示出的一种文本选择装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
本公开各个实施例提供的文本选择方法,可以由具有显示屏的终端来实现。该终端可以是手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio LayerⅢ,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio LayerⅣ,动态影像专家压缩标准音频层面4)播放器、便携式计算机和台式计算机之类的电子设备。
图1是根据一示例性实施例示出的一种文本选择方法的流程图。本实施例以该文本选择方法应用于上述终端中来举例说明,包括以下步骤:
在步骤101中,在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符。
在步骤102中,将待选择文本按照语义划分为若干个文本块。
在步骤103中,接收对应于起始选择点或结束选择点的拖动操作。
在步骤104中,以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置。
综上所述,本公开实施例提供的文本选择方法,通过在待选择文本中,确定起始选择点和结束选择点的第一显示位置,将待选择文本按照语义划分为若 干个文本块,接收对应于起始选择点或结束选择点的拖动操作,以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置;解决了相关技术中仅根据用户操作确定选择点的显示位置,由于用户操作不精确而导致对目标文本选定不够准确的问题;达到了以根据语义划分的文本块为单位,改变选定的目标文本,使选定的目标文本的内容符合语义,更为准确的效果。
图2是根据另一示例性实施例示出的一种文本选择方法的流程图。本实施例以该文本选择方法应用于上述终端中来举例说明,包括以下步骤:
在步骤201中,接收对应于待选择文本的操作,该操作使待选择文本进入选择模式。
可选的,待选择文本是终端中显示的任何一个文本。
可选的,该操作是点击操作,当终端检测到对应于待选择文本的点击操作的操作时长大于预定阈值时,或者,检测到点击操作是双击操作时,使待选择文本进入选择模式,其中,预定阈值由***预设或用户自定义,本实施例对此不作限定。
在步骤202中,在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符。
可选的,当待选择文本进入选择模式后,在文本中出现起始选择点和结束选择点,起始选择点和结束选择点之间的文本为目标文本,起始选择点和结束选择点的第一显示位置在接收到操作的操作点的预定区域内,本实施例对起始选择点和结束选择点的样式,以及预定区域不作限定。
可选的,起始选择点的第一显示位置在结束选择点的第一显示位置的前方,前方是横向左侧和竖向上方中的至少一种。
可选的,当待选择文本进入选择模式后,出现用于对目标文本进行操作的操作菜单,操作菜单包括:语义颗粒度的设置选项,以及对选定的目标文本的操作选项,本实施例对操作菜单的内容和形式,以及出现的位置不作限定。
可选的,目标文本的背景显示颜色、文字颜色、文本字体中的至少一种与其他文本不同,使目标文本与其他文本的显示效果不同,本实施例对此不作限 定。
以终端是通过触摸屏进行操作的手机为例,如图3A所示,终端301上显示有待选择文本302,当用户在触摸屏上长按待选择文本302中的操作点303时,待选择文本302进入选择模式。
待选择文本302进入选择模式后,出现起始选择点304和结束选择点305,以及操作菜单306,如图3B所示。其中,起始选择点304和结束选择点305的第一显示位置在操作点303周围的预定区域内,起始选择点304和结束选择点305之间的为目标文本。
操作菜单306包括:语义颗粒度的设置选项307和对目标文本的操作选项308。其中,语义颗粒度的设置选项307包括:词语、句子和段落,对目标文本的操作选项308包括:复制和剪切。
在步骤203中,确定语义颗粒度,语义颗粒度是词语、句子或段落。
终端接收对应于操作菜单中语义颗粒度的设置选项的操作,确定语义颗粒度。
在步骤204中,将待选择文本按照语义划分为符合语义颗粒度的若干个文本块。
可选的,当语义颗粒度是词语时,终端通过将待选择文本中的字符串与机器词典中的词条进行匹配,若待选择文本中的字符串是机器词典中的一个词条,则将该字符串划分为一个文本块,若待选择文本中的字符不能与其前后的字符组合成为机器词典中的一个词条,则将该字符作为一个文本块,也即,当语义颗粒度是词语时,划分出的文本块是词语、字符或标点符号。
可选的,当语义颗粒度是句子时,终端通过检测待选择文本的标点符号,将待选择文本划分为若干个文本块,每个文本块是一个句子,包括字符串以及字符串后的一个标点符号。
可选的,当语义颗粒度是段落时,终端通过检测待选择文本中的换行符,将待选择文本划分为若干个文本块,每个文本块是一个段落。
本实施例对划分方法不作限定。
以图3A所示的待选择文本302为例,当语义颗粒度是词语时,对待选择文本302的划分结果如图4A所示,以“/”作为文本块之间的间隙;当语义颗粒度是句子时,对待选择文本302的划分结果如图4B所示,以“/”作为文本块之间 的间隙;当语义颗粒度是段落时,对待选择文本302的划分结果如图4C所示,以“/”作为文本块之间的间隙。
在步骤205中,当起始选择点和结束选择点中存在至少一个选择点的第一显示位置位于文本块内部时,根据文本块调整起始选择点和结束选择点的第一显示位置,使起始选择点和结束选择点的第一显示位置分别停留在距离最近的一个间隙位置,间隙位置是两个文本块之间的位置。
可选的,当起始选择点或结束选择点的第一显示位置在文本块内部,且与左右两个间隙位置的距离相同时,随机停留在其中一个间隙位置。
可选的,根据文本块调整起始选择点和结束选择点的第一显示位置,使起始选择点的第一显示位置向前移动并停留在文本块与前一个文本块的间隙位置,使结束选择点的第二显示位置向后移动并停留在文本块与后一个文本块的间隙位置,其中,向前移动是横向向左移动和竖向向上移动中的至少一种,向后移动是横向向右移动和竖向向下移动中的至少一种。
需要说明的是,该步骤是可选的,当起始选择点和结束选择点的第一显示位置分别在文本块之间的间隙位置时,不需要执行该步骤对第一显示位置进行调整。
在图3B所示的例子中,以语义颗粒度是词语为例,对待选择文本302的划分结果如图4A所示,则将图3B中的起始选择点304和结束选择点305进行调整为如图5A所示;当语义颗粒度是句子时,将图3B中的起始选择点304和结束选择点305进行调整为如图5B所示;当语义颗粒度是段落时,将图3B中的起始选择点304和结束选择点305进行调整为如图5C所示。
在步骤206中,接收对应于起始选择点或结束选择点的拖动操作。
在步骤207中,当拖动操作是将起始选择点向前拖动时,将起始选择点的第一显示位置向前移动若干个文本块得到第二显示位置。
可选的,向前拖动是横向向左拖动和竖向向上拖动中的至少一种。
可选的,将起始选择点拖动到待选择文本的第一个字符之前时,停止向前拖动。
在步骤208中,当拖动操作是将起始选择点向后拖动时,将起始选择点的第一显示位置向后移动若干个文本块得到第二显示位置。
可选的,向后拖动是横向向右拖动和竖向向下拖动中的至少一种。
可选的,当起始选择点被拖动到结束选择点之后时,起始选择点变为结束选择点,结束选择点变为起始选择点。
在步骤209中,当拖动操作是将结束选择点向前拖动时,将结束选择点的第一显示位置向前移动若干个文本块得到第二显示位置。
可选的,当结束选择点被拖动到起始选择点之前时,结束选择点变为起始选择点,起始选择点变为结束选择点。
在步骤210中,当拖动操作是将结束选择点向后拖动时,将结束选择点的第一显示位置向后移动若干个文本块得到第二显示位置。
可选的,将结束选择点拖动到待选择文本的最后一个字符之后时,停止向后拖动。
可选的,对于上述步骤207-步骤210中的任一步骤,当起始选择点或结束选择点接收一次拖动操作时,第一显示位置根据拖动操作向前或向后移动预定个数的文本块,其中,预定个数由***预设或用户自定义。
需要说明的是,上述步骤207-步骤210是并列的四个步骤,当存在对应于起始选择点或结束选择点的拖动操作时,执行上述四个步骤中的其中一种。
可选的,上述步骤207-步骤210中的任一步骤都可被替代实现为如图6所示的步骤:
在步骤601中,获取拖动操作的结束位置。
在步骤602中,查找与结束位置距离最近的一个间隙位置,间隙位置是两个文本块之间的位置。
可选的,当结束位置与左右两个间隙位置的距离相同时,随机停留在其中一个间隙位置。
在步骤603中,将间隙位置确定为起始选择点或结束选择点的第二显示位置。
需要说明的是,当确定了起始选择点或结束选择点的第二显示位置后,可以继续对起始选择点或结束选择点进行拖动操作,即重新执行上述步骤206。
在一个示例性的例子中,以图3A所示的待选择文本302为例,语义颗粒度是词语,则对待选择文本302进行划分文本块,且调整起始选择点和结束选择点的第一显示位置后如图5A所示,则当对结束选择点向后拖动一次时,目标文 本中的内容增加一个文本块“、”,再对结束选择点向后拖动一次时,目标文本中的内容再增加一个文本块“孙坚”,并以此类推。
综上所述,本公开实施例提供的文本选择方法,通过在待选择文本中,确定起始选择点和结束选择点的第一显示位置,将待选择文本按照语义划分为若干个文本块,接收对应于起始选择点或结束选择点的拖动操作,以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置;解决了相关技术中仅根据用户操作确定选择点的显示位置,由于用户操作不精确而导致对目标文本选定不够准确的问题;达到了以根据语义划分的文本块为单位,改变选定的目标文本,使选定的目标文本的内容符合语义,更为准确的效果。
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。
图7是根据一示例性实施例示出的一种文本选择方法的框图,该装置包括以下几个模块:
确定模块710,被配置为在在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符;
划分模块720,被配置为将待选择文本按照语义划分为若干个文本块;
接收模块730,被配置为接收对应于起始选择点或结束选择点的拖动操作;
操作模块740,被配置为以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置。
综上所述,本公开实施例提供的文本选择方法,通过在待选择文本中,确定起始选择点和结束选择点的第一显示位置,将待选择文本按照语义划分为若干个文本块,接收对应于起始选择点或结束选择点的拖动操作,以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置;解决了相关技术中仅根据用户操作确定选择点的显示位置,由于用户操作不精确而导致对目标文本选定不够准确的问题;达到了以根据语义划分的文本块为单位,改变选定的目标文本,使选定的目标文本的内容符合语义,更为 准确的效果。
图8是根据另一示例性实施例示出的一种文本选择方法的框图,该装置包括以下几个模块:
确定模块810,被配置为在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符;
划分模块820,被配置为将待选择文本按照语义划分为若干个文本块;
划分模块820包括:
第一确定子模块821,被配置为确定语义颗粒度,语义颗粒度是词语、句子或段落;
划分子模块822,被配置为将待选择文本按照语义划分为符合语义颗粒度的若干个文本块。
调整模块830,被配置为当起始选择点和结束选择点中存在至少一个选择点的第一显示位置位于文本块内部时,根据文本块调整起始选择点和结束选择点的第一显示位置,使起始选择点和结束选择点的第一显示位置分别停留在距离最近的一个间隙位置,间隙位置是两个文本块之间的位置。
接收模块840,被配置为接收对应于起始选择点或结束选择点的拖动操作;
操作模块850,被配置为以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置。
操作模块850被配置为:
当拖动操作是将起始选择点向前拖动时,将起始选择点的第一显示位置向前移动若干个文本块得到第二显示位置;
当拖动操作是将起始选择点向后拖动时,将起始选择点的第一显示位置向后移动若干个文本块得到第二显示位置;
当拖动操作是将结束选择点向前拖动时,将结束选择点的第一显示位置向前移动若干个文本块得到第二显示位置;
当拖动操作是将结束选择点向后拖动时,将结束选择点的第一显示位置向后移动若干个文本块得到第二显示位置;
其中,向前拖动是横向向左拖动和竖向向上拖动中的至少一种,向后拖动 是横向向右拖动和竖向向下拖动中的至少一种。
或者,操作模块850包括:
获取子模块851,被配置为获取拖动操作的结束位置;
查找子模块852,被配置为查找与结束位置距离最近的一个间隙位置,间隙位置是两个文本块之间的位置;
第二确定子模块853,被配置为将间隙位置确定为起始选择点或结束选择点的第二显示位置。
综上所述,本公开实施例提供的文本选择方法,通过在待选择文本中,确定起始选择点和结束选择点的第一显示位置,将待选择文本按照语义划分为若干个文本块,接收对应于起始选择点或结束选择点的拖动操作,以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置;解决了相关技术中仅根据用户操作确定选择点的显示位置,由于用户操作不精确而导致对目标文本选定不够准确的问题;达到了以根据语义划分的文本块为单位,改变选定的目标文本,使选定的目标文本的内容符合语义,更为准确的效果。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本公开一示例性实施例提供了一种文本选择装置,能够实现本公开提供的文本选择方法,该装置包括:处理器、用于存储处理器可执行指令的存储器;
其中,处理器被配置为:
在待选择文本中,确定起始选择点和结束选择点的第一显示位置,起始选择点和结束选择点之间的文本为目标文本,目标文本至少包括一个字符;
将待选择文本按照语义划分为若干个文本块;
接收对应于起始选择点或结束选择点的拖动操作;
以文本块为单位,根据拖动操作将起始选择点或结束选择点的第一显示位置改变为第二显示位置。
图9是根据一示例性实施例示出的一种文本选择的框图。例如,装置900 可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图9,装置900可以包括以下一个或多个组件:处理组件902,存储器904,电源组件906,多媒体组件908,音频组件910,输入/输出(I/O)接口912,传感器组件914,以及通信组件916。
处理组件902通常控制装置900的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件902可以包括一个或多个处理器918来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件902可以包括一个或多个模块,便于处理组件902和其他组件之间的交互。例如,处理组件902可以包括多媒体模块,以方便多媒体组件908和处理组件902之间的交互。
存储器904被配置为存储各种类型的数据以支持在装置900的操作。这些数据的示例包括用于在装置900上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器904可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件906为装置900的各种组件提供电力。电源组件906可以包括电源管理***,一个或多个电源,及其他与为装置900生成、管理和分配电力相关联的组件。
多媒体组件908包括在装置900和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件908包括一个前置摄像头和/或后置摄像头。当装置900处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。
音频组件910被配置为输出和/或输入音频信号。例如,音频组件910包括一个麦克风(MIC),当装置900处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器904或经由通信组件916发送。在一些实施例中,音频组件910还包括一个扬声器,用于输出音频信号。
I/O接口912为处理组件902和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件914包括一个或多个传感器,用于为装置900提供各个方面的状态评估。例如,传感器组件914可以检测到装置900的打开/关闭状态,组件的相对定位,例如组件为装置900的显示器和小键盘,传感器组件914还可以检测装置900或装置900一个组件的位置改变,用户与装置900接触的存在或不存在,装置900方位或加速/减速和装置900的温度变化。传感器组件914可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件914还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件914还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件916被配置为便于装置900和其他设备之间有线或无线方式的通信。装置900可以接入基于通信标准的无线网络,如Wi-Fi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件916经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,通信组件916还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置900可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述文本选择方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器904,上述指令可由装置900的处理器918执行以完 成上述文本选择方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (11)

  1. 一种文本选择方法,其特征在于,所述方法包括:
    在待选择文本中,确定起始选择点和结束选择点的第一显示位置,所述起始选择点和所述结束选择点之间的文本为目标文本,所述目标文本至少包括一个字符;
    将所述待选择文本按照语义划分为若干个文本块;
    接收对应于所述起始选择点或所述结束选择点的拖动操作;
    以所述文本块为单位,根据所述拖动操作将所述起始选择点或所述结束选择点的所述第一显示位置改变为第二显示位置。
  2. 根据权利要求1所述的方法,其特征在于,所述将所述待选择文本按照语义划分为若干个文本块,包括:
    确定语义颗粒度,所述语义颗粒度是词语、句子或段落;
    将所述待选择文本按照语义划分为符合所述语义颗粒度的若干个文本块。
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据所述拖动操作将所述起始选择点或所述结束选择点的所述第一显示位置改变为第二显示位置,包括:
    当所述拖动操作是将所述起始选择点向前拖动时,将所述起始选择点的所述第一显示位置向前移动若干个文本块得到所述第二显示位置;
    当所述拖动操作是将所述起始选择点向后拖动时,将所述起始选择点的所述第一显示位置向后移动若干个文本块得到所述第二显示位置;
    当所述拖动操作是将所述结束选择点向前拖动时,将所述结束选择点的所述第一显示位置向前移动若干个文本块得到所述第二显示位置;
    当所述拖动操作是将所述结束选择点向后拖动时,将所述结束选择点的所述第一显示位置向后移动若干个文本块得到所述第二显示位置;
    其中,向前拖动是横向向左拖动和竖向向上拖动中的至少一种,向后拖动是横向向右拖动和竖向向下拖动中的至少一种。
  4. 根据权利要求1或2所述的方法,其特征在于,所述根据所述拖动操作将所述起始选择点或所述结束选择点的所述第一显示位置改变为第二显示位置,包括:
    获取所述拖动操作的结束位置;
    查找与所述结束位置距离最近的一个间隙位置,所述间隙位置是两个文本块之间的位置;
    将所述间隙位置确定为所述起始选择点或所述结束选择点的所述第二显示位置。
  5. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    当所述起始选择点和所述结束选择点中存在至少一个选择点的所述第一显示位置位于所述文本块内部时,根据所述文本块调整所述起始选择点和所述结束选择点的所述第一显示位置,使所述起始选择点和所述结束选择点的所述第一显示位置分别停留在距离最近的一个间隙位置,所述间隙位置是两个文本块之间的位置。
  6. 一种文本选择装置,其特征在于,所述装置包括:
    确定模块,被配置为在待选择文本中,确定起始选择点和结束选择点的第一显示位置,所述起始选择点和所述结束选择点之间的文本为目标文本,所述目标文本至少包括一个字符;
    划分模块,被配置为将所述待选择文本按照语义划分为若干个文本块;
    接收模块,被配置为接收对应于所述起始选择点或所述结束选择点的拖动操作;
    操作模块,被配置为以所述文本块为单位,根据所述拖动操作将所述起始选择点或所述结束选择点的所述第一显示位置改变为第二显示位置。
  7. 根据权利要求6所述的装置,其特征在于,所述划分模块包括:
    第一确定子模块,被配置为确定语义颗粒度,所述语义颗粒度是词语、句子或段落;
    划分子模块,被配置为将所述待选择文本按照语义划分为符合所述语义颗 粒度的若干个文本块。
  8. 根据权利要求6或7所述的装置,其特征在于,所述操作模块被配置为:
    当所述拖动操作是将所述起始选择点向前拖动时,将所述起始选择点的所述第一显示位置向前移动若干个文本块得到所述第二显示位置;
    当所述拖动操作是将所述起始选择点向后拖动时,将所述起始选择点的所述第一显示位置向后移动若干个文本块得到所述第二显示位置;
    当所述拖动操作是将所述结束选择点向前拖动时,将所述结束选择点的所述第一显示位置向前移动若干个文本块得到所述第二显示位置;
    当所述拖动操作是将所述结束选择点向后拖动时,将所述结束选择点的所述第一显示位置向后移动若干个文本块得到所述第二显示位置;
    其中,向前拖动是横向向左拖动和竖向向上拖动中的至少一种,向后拖动是横向向右拖动和竖向向下拖动中的至少一种。
  9. 根据权利要求6或7所述的装置,其特征在于,所述操作模块包括:
    获取子模块,被配置为获取所述拖动操作的结束位置;
    查找子模块,被配置为查找与所述结束位置距离最近的一个间隙位置,所述间隙位置是两个文本块之间的位置;
    第二确定子模块,被配置为将所述间隙位置确定为所述起始选择点或所述结束选择点的所述第二显示位置。
  10. 根据权利要求6或7所述的装置,其特征在于,所述装置还包括:
    调整模块,被配置为当所述起始选择点和所述结束选择点中存在至少一个选择点的所述第一显示位置位于所述文本块内部时,根据所述文本块调整所述起始选择点和所述结束选择点的所述第一显示位置,使所述起始选择点和所述结束选择点的所述第一显示位置分别停留在距离最近的一个间隙位置,所述间隙位置是两个文本块之间的位置。
  11. 一种文本选择装置,其特征在于,所述装置包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    在待选择文本中,确定起始选择点和结束选择点的第一显示位置,所述起始选择点和所述结束选择点之间的文本为目标文本,所述目标文本至少包括一个字符;
    将所述待选择文本按照语义划分为若干个文本块;
    接收对应于所述起始选择点或所述结束选择点的拖动操作;
    以所述文本块为单位,根据所述拖动操作将所述起始选择点或所述结束选择点的所述第一显示位置改变为第二显示位置。
PCT/CN2016/106379 2016-06-23 2016-11-18 文本选择方法及装置 WO2017219595A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
RU2017112514A RU2668736C1 (ru) 2016-06-23 2016-11-18 Способ и устройство для выбора текста
JP2017502605A JP2018530015A (ja) 2016-06-23 2016-11-18 テキスト選択方法及び装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610466423.1A CN106126052A (zh) 2016-06-23 2016-06-23 文本选择方法及装置
CN201610466423.1 2016-06-23

Publications (1)

Publication Number Publication Date
WO2017219595A1 true WO2017219595A1 (zh) 2017-12-28

Family

ID=57268197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/106379 WO2017219595A1 (zh) 2016-06-23 2016-11-18 文本选择方法及装置

Country Status (6)

Country Link
US (1) US10296201B2 (zh)
EP (1) EP3260967A1 (zh)
JP (1) JP2018530015A (zh)
CN (1) CN106126052A (zh)
RU (1) RU2668736C1 (zh)
WO (1) WO2017219595A1 (zh)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126052A (zh) * 2016-06-23 2016-11-16 北京小米移动软件有限公司 文本选择方法及装置
CN106325688B (zh) * 2016-08-17 2020-01-14 北京字节跳动网络技术有限公司 一种文本处理方法及装置
CN107015738A (zh) * 2016-09-20 2017-08-04 阿里巴巴集团控股有限公司 一种文本选择方法和设备
CN106844317A (zh) * 2016-12-19 2017-06-13 深圳众思科技有限公司 文本选择方法及装置
CN106951168B (zh) * 2017-03-03 2020-05-19 宇龙计算机通信科技(深圳)有限公司 一种文字处理方法及移动终端
CN106919307B (zh) * 2017-03-09 2018-12-04 维沃移动通信有限公司 一种文本复制方法及移动终端
CN108664201B (zh) * 2017-03-29 2021-12-28 北京搜狗科技发展有限公司 一种文本编辑方法、装置及电子设备
CN107423273B (zh) * 2017-05-09 2020-05-05 北京字节跳动网络技术有限公司 一种文本编辑方法及装置
CN110032324B (zh) * 2018-01-11 2024-03-05 荣耀终端有限公司 一种文本选中方法及终端
US10684764B2 (en) 2018-03-28 2020-06-16 Microsoft Technology Licensing, Llc Facilitating movement of objects using semantic analysis and target identifiers
CN108717347B (zh) * 2018-05-25 2020-04-14 北京金堤科技有限公司 商业信息交互识别方法、装置和电子设备
CN108959248A (zh) * 2018-06-21 2018-12-07 北京明略软件***有限公司 一种实体标注方法和装置、计算机可读存储介质
CN109241541A (zh) * 2018-08-14 2019-01-18 平安普惠企业管理有限公司 基于语音转换的交互方法及终端设备
JP7238314B2 (ja) * 2018-10-02 2023-03-14 カシオ計算機株式会社 電子機器、テキスト処理方法、およびプログラム
CN110825285B (zh) * 2019-10-28 2022-02-08 维沃移动通信有限公司 一种文本复制方法及移动终端
CN113254815B (zh) * 2020-02-08 2023-11-10 钉钉控股(开曼)有限公司 文档处理、页面处理方法及设备
CN114265525A (zh) * 2021-12-27 2022-04-01 咪咕数字传媒有限公司 文本选中方法、装置、电子设备及可读存储介质
CN115080170A (zh) * 2022-06-29 2022-09-20 维沃移动通信有限公司 信息处理方法、信息处理装置和电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526881A (zh) * 2008-03-04 2009-09-09 苹果公司 使用手势选择文本
US20120229493A1 (en) * 2011-03-09 2012-09-13 Lg Electronics Inc. Mobile terminal and text cursor operating method thereof
CN103186345A (zh) * 2013-02-25 2013-07-03 北京极兴莱博信息科技有限公司 一种文段选择方法、字段选择方法、装置及终端
CN103608760A (zh) * 2011-06-03 2014-02-26 谷歌公司 用于选择文本的手势
CN104375980A (zh) * 2014-11-18 2015-02-25 小米科技有限责任公司 文本内容选择方法及装置
CN106126052A (zh) * 2016-06-23 2016-11-16 北京小米移动软件有限公司 文本选择方法及装置

Family Cites Families (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0612411A (ja) * 1992-06-25 1994-01-21 Sanyo Electric Co Ltd 文書処理装置
JPH09190436A (ja) * 1996-01-12 1997-07-22 Toshiba Corp 情報処理装置及び範囲指定方法
US20060053382A1 (en) * 2004-09-03 2006-03-09 Biowisdom Limited System and method for facilitating user interaction with multi-relational ontologies
DE102005003333A1 (de) * 2005-01-25 2006-07-27 Büstgens, Burkhard, Dr.-Ing. Verfahren für den positionsabhängigen Farbauftrag auf konturierten Flächen
US8201109B2 (en) * 2008-03-04 2012-06-12 Apple Inc. Methods and graphical user interfaces for editing on a portable multifunction device
JP5368547B2 (ja) * 2008-04-05 2013-12-18 ソーシャル・コミュニケーションズ・カンパニー 共有仮想エリアコミュニケーション環境ベースの装置および方法
US20100030549A1 (en) * 2008-07-31 2010-02-04 Lee Michael M Mobile device having human language translation capability with positional feedback
JP2012027723A (ja) * 2010-07-23 2012-02-09 Sony Corp 情報処理装置、情報処理方法及び情報処理プログラム
US9002701B2 (en) * 2010-09-29 2015-04-07 Rhonda Enterprises, Llc Method, system, and computer readable medium for graphically displaying related text in an electronic document
US20120185787A1 (en) * 2011-01-13 2012-07-19 Microsoft Corporation User interface interaction behavior based on insertion point
US9215506B2 (en) * 2011-03-31 2015-12-15 Tivo Inc. Phrase-based communication system
US8750042B2 (en) 2011-07-28 2014-06-10 Sandisk Technologies Inc. Combined simultaneous sensing of multiple wordlines in a post-write read (PWR) and detection of NAND failures
US9146670B2 (en) * 2011-09-10 2015-09-29 Microsoft Technology Licensing, Llc Progressively indicating new content in an application-selectable user interface
US20130125008A1 (en) * 2011-11-15 2013-05-16 Stremor Corporation Systems And Methods For Providing Content Streams
CA2821814C (en) * 2012-04-30 2017-01-10 Research In Motion Limited Method and apparatus for text selection
CN102937864B (zh) * 2012-10-31 2015-11-25 百度在线网络技术(北京)有限公司 一种用于在触摸终端上确定所选文本的方法与设备
CN104007832B (zh) * 2013-02-25 2017-09-01 上海触乐信息科技有限公司 连续滑行输入文本的方法、***及设备
US20140280109A1 (en) * 2013-03-14 2014-09-18 Google Inc. User-Guided Term Suggestions
US9431008B2 (en) * 2013-05-29 2016-08-30 Nuance Communications, Inc. Multiple parallel dialogs in smart phone applications
US20150121179A1 (en) * 2013-10-25 2015-04-30 Palo Alto Research Center Incorporated System and method for creating graphically rich messages incorporating shared docments
RU2608884C2 (ru) * 2014-06-30 2017-01-25 Общество С Ограниченной Ответственностью "Яндекс" Реализуемый компьютером способ обеспечения графического пользовательского интерфейса на экране дисплея электронного устройства браузерным контекстным помощником (варианты), сервер и электронное устройство, используемые в нем
US10387034B2 (en) * 2015-09-03 2019-08-20 Microsoft Technology Licensing, Llc Modifying captured stroke information into an actionable form
US20170109335A1 (en) * 2015-10-16 2017-04-20 Microsoft Technology Licensing, Llc Authoring visual representations for text-based documents
US10565225B2 (en) * 2016-03-04 2020-02-18 International Business Machines Corporation Exploration and navigation of a content collection
US10102191B2 (en) * 2016-06-16 2018-10-16 Adobe Systems Incorporated Propagation of changes in master content to variant content

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526881A (zh) * 2008-03-04 2009-09-09 苹果公司 使用手势选择文本
US20120229493A1 (en) * 2011-03-09 2012-09-13 Lg Electronics Inc. Mobile terminal and text cursor operating method thereof
CN103608760A (zh) * 2011-06-03 2014-02-26 谷歌公司 用于选择文本的手势
CN103186345A (zh) * 2013-02-25 2013-07-03 北京极兴莱博信息科技有限公司 一种文段选择方法、字段选择方法、装置及终端
CN104375980A (zh) * 2014-11-18 2015-02-25 小米科技有限责任公司 文本内容选择方法及装置
CN106126052A (zh) * 2016-06-23 2016-11-16 北京小米移动软件有限公司 文本选择方法及装置

Also Published As

Publication number Publication date
CN106126052A (zh) 2016-11-16
US10296201B2 (en) 2019-05-21
US20170371513A1 (en) 2017-12-28
RU2668736C1 (ru) 2018-10-02
EP3260967A1 (en) 2017-12-27
JP2018530015A (ja) 2018-10-11

Similar Documents

Publication Publication Date Title
WO2017219595A1 (zh) 文本选择方法及装置
US10936798B2 (en) Text editing method, device, and electronic apparatus
JP6321296B2 (ja) テキスト入力方法、装置、プログラム及び記録媒体
WO2015176483A1 (zh) 标签创建方法、装置及终端
WO2016065814A1 (zh) 信息选取方法及装置
US9959487B2 (en) Method and device for adding font
US10078422B2 (en) Method and device for updating a list
US20150242118A1 (en) Method and device for inputting
WO2015139469A1 (zh) 网页调整方法、装置及电子设备
CN104133623B (zh) 页面缩放方法和装置
WO2016206295A1 (zh) 字符确定方法及装置
WO2016061927A1 (zh) 描述信息的显示方法及装置、电子设备
WO2020042468A1 (zh) 一种数据处理方法、装置和用于数据处理的装置
US20150116368A1 (en) Method and device for adjusting characters of application
CN105094539B (zh) 参考信息显示方法和装置
WO2016026297A1 (zh) 光标定位的方法及装置
CN112584222A (zh) 视频处理方法和装置、用于视频处理的装置
US10013151B2 (en) Method and terminal device for adjusting widget
WO2021000450A1 (zh) 一种触控信号处理方法、装置及介质
CN109977424B (zh) 一种机器翻译模型的训练方法及装置
CN112329480A (zh) 一种区域调整方法、装置和电子设备
CN109308126B (zh) 一种候选词展示方法和装置
CN111092971A (zh) 一种显示方法、装置和用于显示的装置
US10423706B2 (en) Method and device for selecting information
CN112115947A (zh) 文本处理方法及装置、电子设备、存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2017502605

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2017112514

Country of ref document: RU

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16906134

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16906134

Country of ref document: EP

Kind code of ref document: A1