CN111475999A - Error prompt generation method and device - Google Patents

Error prompt generation method and device Download PDF

Info

Publication number
CN111475999A
CN111475999A CN201910060106.3A CN201910060106A CN111475999A CN 111475999 A CN111475999 A CN 111475999A CN 201910060106 A CN201910060106 A CN 201910060106A CN 111475999 A CN111475999 A CN 111475999A
Authority
CN
China
Prior art keywords
text
displayed
text segment
visible
segment
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.)
Granted
Application number
CN201910060106.3A
Other languages
Chinese (zh)
Other versions
CN111475999B (en
Inventor
朱佳墩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910060106.3A priority Critical patent/CN111475999B/en
Publication of CN111475999A publication Critical patent/CN111475999A/en
Application granted granted Critical
Publication of CN111475999B publication Critical patent/CN111475999B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides a method and a device for generating an error prompt, wherein the method for generating the error prompt comprises the following steps: determining a displayed text segment according to the visible text displayed in the screen effective display area; and carrying out grammar check on the displayed text segment, and generating an error prompt aiming at the visible text according to a check result. According to the error prompt generation scheme provided by the embodiment of the invention, the text segment corresponding to the visible text is determined, and then the error prompt is generated aiming at the visible text, and single full grammar check on the complete text is not needed, so that the time consumption for generating the error prompt can be greatly reduced, and further the error prompt can be fed back to the user relatively quickly, and the problem that the error prompt cannot be fed back to the user in time due to long time consumption in the existing scheme, and further the user editing has hysteresis and the user experience is poor is solved.

Description

Error prompt generation method and device
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a method and a device for generating an error prompt.
Background
Generally, people edit texts through various editors, and grammar errors and other situations inevitably occur in the editing process, and at the moment, users can find and correct the grammar errors in the edited texts through an error prompt function of the editors in time.
However, when some large texts are encountered, for example, a user edits multiple sections of SQ L in the editor, the editor takes a long time in the process of syntax checking the texts, so that the editor cannot timely feed back error prompts to the user, and further, the editor has hysteresis in editing the texts, so that the user experience is poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for generating an error prompt, so as to solve the above problem.
According to a first aspect of the embodiments of the present invention, a method for generating an error prompt is provided, including: determining a displayed text segment according to the visible text displayed in the screen effective display area; and carrying out grammar check on the displayed text segment, and generating an error prompt aiming at the visible text according to a check result.
According to a second aspect of the embodiments of the present invention, there is provided an error prompt generation apparatus, including: the display determining module is used for determining a displayed text segment according to the visible text displayed in the screen effective display area; and the checking module is used for carrying out grammar checking on the displayed text segment and generating an error prompt aiming at the visible text according to a checking result.
According to the scheme provided by the embodiment of the invention, the text segment corresponding to the visible text is determined, so that the error prompt is generated aiming at the visible text, and the single full grammar check of the complete text is not needed, so that the time consumption for generating the error prompt can be greatly reduced, and the error prompt can be fed back to the user more quickly, thereby avoiding the problem that the error prompt cannot be fed back to the user in time due to long time consumption in the existing scheme, and further, the user editing has hysteresis, so that the user experience is poor.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present invention, and it is also possible for a person skilled in the art to obtain other drawings based on the drawings.
Fig. 1 is a flowchart illustrating steps of a method for generating an error prompt according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of an effective display area of a screen according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for generating an error prompt according to a second embodiment of the present invention;
fig. 4 is a block diagram of a device for generating an error prompt according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention shall fall within the scope of the protection of the embodiments of the present invention.
The following further describes specific implementation of the embodiments of the present invention with reference to the drawings.
Example one
Referring to fig. 1, a flowchart illustrating steps of a method for generating an error prompt according to a first embodiment of the present invention is shown.
The method provided by the embodiment comprises the following steps:
s102, determining a displayed text segment according to the visible text displayed in the screen effective display area.
In this embodiment, when the method is applied to an editor for editing multiple segments of SQ L, the editor may be an editor for writing source code of a program, and a user may edit multiple segments of individual SQ L code in one editor and use the multiple segments of SQ L code as a unit for task execution as a whole, so that the multiple segments of SQ L code constitute complete text content, and each segment of individual SQ L code is a text segment.
In this embodiment, as described above, the visible text may actually be a text that is actually displayed in the screen effective display area, and the actually displayed content may be a part of text or all text in one text segment, which is not limited in this embodiment.
In contrast, in the case of the above, when the grammar check is performed before the error prompt is generated, the grammar check must be performed depending on the context in the text segment to obtain an accurate check result. However, even if the text is visible, there is a case where a certain text segment is not completely displayed, and therefore, the displayed text segment is determined according to the visible text in the present embodiment.
For example, referring to FIG. 2, the positional relationship between the screen active display area and a plurality of text segments is shown. As shown in fig. 3, the complete text content includes text segments as follows: the text I, the text II, the text III, the text IV and the text V …, and the visible text displayed in the screen effective display area in the figure comprises a part of text II, all of text III and a part of text IV, so that the displayed text segment determined according to the visible text comprises the text II, the text III and the text IV.
In this embodiment, the displayed text segment may be determined according to the display mode of the text segment; or the text segment may be marked in advance and then the displayed text segment may be determined from the text segment mark in the visible text, etc. The present embodiment is not limited as long as the displayed text segment can be determined.
S104, grammar check is carried out on the displayed text segment, and an error prompt aiming at the visible text is generated according to a check result.
In this embodiment, after the displayed text segment is determined in step S102, an accurate syntax check may be performed according to the context in the text segment, and a check result of the syntax check is determined, where the syntax check is to check whether the syntax in the checked text conforms to the preset syntax rule. Those skilled in the art can adaptively select a syntax checking method according to the type of the edited text, and the embodiment does not limit the type of the text and the syntax checking method.
In this embodiment, the displayed text segment is determined according to the visible text, and therefore, the check result obtained by performing syntax check on the displayed text segment includes the check result corresponding to the visible text. In this embodiment, an error prompt for the visible text may be directly generated according to the check result, and a method for generating an error prompt according to the check result may refer to related technologies, which is not described herein again.
The method provided by the embodiment can be applied to scenes including but not limited to scenes with more complete text contents such as the editing multi-segment SQ L, error prompts can be generated for the visible text by determining the text segments corresponding to the visible text, and single full grammar check on the complete text is not needed, so that the time consumption for generating the error prompts can be greatly reduced, and the error prompts can be fed back to the user more quickly, and the problem that the error prompts cannot be fed back to the user in time due to long time consumption in the existing scheme, and therefore, the user editing has hysteresis and the user experience is poor is avoided.
Example two
Referring to fig. 3, a flowchart illustrating steps of a method for generating an error prompt according to a second embodiment of the present invention is shown.
The method provided by the embodiment comprises the following steps:
s202, determining the visible text according to the position data of the screen effective display area and the complete text content.
In this embodiment, the position data of the screen effective display area may be width and height data, coordinate data, and the like of the screen effective display area. For example, if the editing is performed by a browser, the screen effective display area may specifically be a web page visible area of the browser, and the position data thereof may be a web page visible area height, a web page visible area width, and the like.
In this embodiment, if the editing is performed by the editor, the complete text content is all the text content in the editor.
After the position data of the effective display area of the screen is determined, the visible text can be determined by combining the complete text content, and the specific determination method refers to the related technology, which is not described herein again.
And S204, determining a display result of a text segment in the visible text according to the visible text.
In this embodiment, the display result includes complete display and partial display. The display result is partially displayed, which means that the text segment of the visible text must include the partially displayed text segment, and may also include the completely displayed text segment; the display result is complete display, which means that only the completely displayed text segment is included in the text segments of the visible text, and the partially displayed text segment is not included.
For example, referring to fig. 2, if the text two and the text four in fig. 2 are text segments that are partially displayed, and the text three in fig. 2 is text segments that are completely displayed, it may be determined that the display result of the text segments in the visible text of fig. 2 is partially displayed.
The display result may specifically be determined according to the boundaries of the visible text.
For the local display, for example, as shown in fig. 2, if the upper boundary of the visible region is the middle part of the second text, the display result of the text segment in the visible text in fig. 2 may be determined to be the local display, or if the lower boundary of the visible region is the middle part of the fourth text, the display result of the text segment in the visible text in fig. 2 may be determined to be the local display.
For the complete display, if the upper boundary and the lower boundary of the visible region are both the junctions of the text segments, for example, the upper boundary of the visible text is the junction of the text two and the text one, and the lower boundary of the visible text is the junction of the text four and the text five, it may be determined that the display result is the complete display.
In addition, the display result may also be determined in other ways, for example, if the visible text includes a text segment displayed in a hidden display form, that is, if a part of the content in the text segment is displayed and another part is hidden, the text segment is a text segment that is partially displayed, so that the display result of the text segment in the visible text is partially displayed.
S206, determining the displayed text segment according to the display result of the text segment in the visible text.
In this embodiment, the display result includes partial display and complete display.
And if the display result is local display, performing a find-all operation on the text segment which is locally displayed, and determining the displayed text segment according to the text segment obtained by the find-all operation. Through the full finding operation, the text segment which is displayed locally can be found simply, conveniently and quickly without other operations.
For example, as shown in fig. 2, if the second text and the fourth text in fig. 2 are partially displayed text segments, a search may be performed on the second text and the fourth text, so as to determine the second complete text and the fourth complete text according to the second partial text and the fourth partial text included in the visible text, and determine the second complete text and the fourth complete text and the third text between the second text and the fourth text as displayed text segments.
It should be noted that, the screen active display area may also include only one partially displayed text segment. For example, the screen effective display area may include a partially displayed second text and a completely displayed third text, and at this time, the partially displayed second text and the completely displayed third text may be found and determined as displayed text segments; or, the screen effective display area may include a completely displayed text three and a partially displayed text four, and at this time, the completely partially displayed text four may be found, and the text four and the text three are determined to be displayed text segments; or, only the partially displayed text three may be included in the screen effective display area, and at this time, the partially displayed text three may be found and determined as the displayed text segment.
Further, the performing a search operation on the partially displayed text segment includes: determining the position of the text segment displayed by the local display in the screen effective display area; and carrying out a search operation on the partially displayed text segment according to the determined position. Specifically, if it is determined that the partially displayed text segment is displayed at the top of the screen effective display area, for example, the text two in fig. 2, the text segment is searched upward until the partially displayed text segment is found from the visible text displayed at the top of the screen effective display area. Or, if it is determined that the partially displayed text segment is displayed at the bottom of the screen effective display area, for example, the text four in fig. 2, the text segment is searched downwards until the partially displayed text segment is found, starting from the visible text displayed at the bottom of the screen effective display area. In this embodiment, it may be determined by looking up paragraph markers that the globally displayed text segment has been found.
In an actual use process, if the display result is a partial display, the partially displayed text segment may be located at the top or the bottom of the screen effective display area, and the partially displayed text segment may be subjected to a find-all operation by searching for a paragraph mark. After the completion operation is performed, two paragraph marks corresponding to the beginning or the end of the visible text respectively can be determined, and then the text segment between the two paragraph marks can be directly determined as the displayed text segment. For example, for the visible text shown in fig. 2, the paragraph marks between the first text and the second text can be found upwards, the paragraph marks between the fourth text and the fifth text can be found downwards, and then the second text, the third text and the fourth text between the two paragraph marks are determined as the displayed text segments.
Of course, the above is only exemplified by using the arrangement direction of the text segments as the vertical arrangement, which is not limited in this embodiment, and in other implementation manners of this embodiment, the text segments may also be text segments typeset in other typesetting manners. For example, the arrangement directions of the first text, the second text, the third text, the fourth text and the fifth text may be arranged horizontally, at this time, the partially displayed text segment may be displayed on the left side or the right side of the screen effective display area, and when the search for all the partially displayed text segments is performed, the left or right search may be performed until the partially displayed text segment is found all the way from the visible text on the left side or the right side of the screen effective display area.
In this embodiment, the partially displayed text segment may also be displayed in other display manners, for example, in a hidden display manner. Specifically, in the case of the text three, when displayed, the text three may be partially displayed and partially hidden, so that the text three is a text segment that is partially displayed. When the text segment displayed in the mode is subjected to the finding operation, the position of the text segment displayed in the effective display area of the screen does not need to be determined, and the finding operation can be directly carried out by taking the content of the displayed part of the text segment as a starting point.
In addition, if the display result is complete display, and the display result is complete display means that only the completely displayed text segment is included in the visible text, it is sufficient to determine that the completely displayed text segment in the visible text is the displayed text segment. For example, if the visible text displayed in the screen effective display area is the complete text three, it is sufficient to directly determine that the text three is the displayed text segment.
S208, grammar check is carried out on the displayed text segment, and an error prompt aiming at the visible text is generated according to a check result.
The specific implementation manner of this step may refer to step S104 in the above embodiment.
Specifically, when the displayed text segment includes a partially displayed text segment, after the syntax check is performed on the displayed text segment in this step, a part of the check result is a check result corresponding to the invisible text. For example, referring to fig. 2, the text two is a text segment that is partially displayed, but in order to obtain an accurate check result, the grammar check is performed on the entire text two, so that the check result is a check result corresponding to the entire text two, that is, the check result includes not only the check result of the displayed part of the text two but also the check result corresponding to the part text that is not visible in the text two.
If the displayed text segment comprises the partially displayed text segment, when an error prompt aiming at the visible text is generated according to the inspection result, the inspection result of the invisible part can be directly ignored, and only the inspection result corresponding to the visible text is generated; or generating error prompts corresponding to all displayed text segments without ignoring the inspection result of the invisible part. The check result of whether to ignore the invisible part may be preset, or may be dynamically set according to other conditions, for example, dynamically set according to a ratio of the check result corresponding to the invisible part in the check result, dynamically set according to a ratio between the text of the invisible part and the visible text, and the like, which is not limited in this embodiment.
The method provided by the embodiment can be applied to scenes including but not limited to scenes with more complete text contents such as the editing multi-segment SQ L, error prompts can be generated for the visible text by determining the text segments corresponding to the visible text, and single full grammar check on the complete text is not needed, so that the time consumption for generating the error prompts can be greatly reduced, and the error prompts can be fed back to the user more quickly, and the problem that the error prompts cannot be fed back to the user in time due to long time consumption in the existing scheme, and therefore the user experience is poor due to hysteresis in editing the user is solved.
The method for generating the error prompt according to the first embodiment or the second embodiment of the present application may be executed by any suitable terminal device with data processing capability, including but not limited to: mobile terminals (such as tablet computers, mobile phones and the like) and PCs.
EXAMPLE III
Referring to fig. 4, a block diagram of an error prompt generation apparatus according to a third embodiment of the present invention is shown.
Referring to fig. 4, an apparatus provided in an embodiment of the present application includes: a display determination module 302, an inspection module 304.
The display determination module 302 is configured to determine a displayed text segment according to the visible text displayed in the screen active display area.
The checking module 304 is configured to perform syntax checking on the displayed text segment, and generate an error prompt for the visible text according to a checking result.
In an alternative embodiment, the display determination module comprises: the display result determining module is used for determining the display result of the text segment in the visible text according to the visible text, and the display result comprises complete display and partial display; and the text segment determining module is used for determining the displayed text segment according to the display result of the text segment in the visible text.
In an alternative embodiment, the text passage determination module comprises: and the local determining module is used for carrying out the full finding operation on the text segment which is locally displayed if the display result is local display, and determining the displayed text segment according to the text segment obtained by the full finding operation.
In an alternative embodiment, the local determination module comprises: and the searching and completing module is used for determining the position of the text segment which is locally displayed and displayed in the effective display area of the screen and performing searching and completing operation on the text segment which is locally displayed according to the determined position.
In an alternative embodiment, if it is determined that the partially displayed text segment is displayed at the top of the screen effective display area, the partially displayed text segment is searched upwards until the partially displayed text segment is found completely, with the visible text displayed at the top of the screen effective display area as a starting point.
In an alternative embodiment, if it is determined that the partially displayed text segment is displayed at the bottom of the screen effective display area, the partially displayed text segment is searched downwards until the partially displayed text segment is found completely, with the visible text displayed at the bottom of the screen effective display area as a starting point.
In an alternative embodiment, the text passage determination module comprises: and the complete determination module is used for determining the completely displayed text segment as the displayed text segment if the display result is complete display.
In an alternative embodiment, the displayed text segment is a text segment in which some or all of the text in the text segment belongs to the visible text.
The scenario applicable to the scheme provided by this embodiment includes, but is not limited to, the scenario with many complete text contents, such as the editing multi-segment SQ L, and an error prompt is generated for the visible text by determining the text segment corresponding to the visible text, instead of performing a single full grammar check on the complete text, so that time consumed for generating the error prompt can be greatly reduced, and the error prompt can be fed back to the user relatively quickly, thereby avoiding a problem that the error prompt cannot be fed back to the user in time due to long time consumption in the existing scheme, and further causing a lag in editing the user, so that the user experience is poor.
Example four
A terminal device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the error prompt generation method.
Specifically, referring to fig. 5, a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the terminal device.
As shown in fig. 5, the terminal device may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein:
the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508.
A communication interface 504 for communicating with other terminal devices or servers.
The processor 502 is configured to execute the program 510, and may specifically execute relevant steps in the above-described method for generating an error prompt.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the invention. The terminal device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations: determining a displayed text segment according to the visible text displayed in the screen effective display area; and carrying out grammar check on the displayed text segment, and generating an error prompt aiming at the visible text according to a check result.
In an alternative embodiment, the determining the displayed text segment according to the visible text displayed in the screen active display area includes: determining a display result of a text segment in the visible text according to the visible text, wherein the display result comprises complete display and partial display; and determining the displayed text segment according to the display result of the text segment in the visible text.
In an optional embodiment, the determining the displayed text segment according to the display result of the text segment in the visible text includes: and if the display result is local display, performing a find-all operation on the text segment which is locally displayed, and determining the displayed text segment according to the text segment obtained by the find-all operation.
In an alternative embodiment, the performing the full operation on the partially displayed text segment includes: determining the position of the text segment displayed by the local display in the screen effective display area; and carrying out a search operation on the partially displayed text segment according to the determined position.
In an alternative embodiment, if it is determined that the partially displayed text segment is displayed at the top of the screen effective display area, the partially displayed text segment is searched upwards until the partially displayed text segment is found completely, with the visible text displayed at the top of the screen effective display area as a starting point.
In an alternative embodiment, if it is determined that the partially displayed text segment is displayed at the bottom of the screen effective display area, the partially displayed text segment is searched downwards until the partially displayed text segment is found completely, with the visible text displayed at the bottom of the screen effective display area as a starting point.
In an optional embodiment, the determining the displayed text segment according to the display result of the text segment in the visible text includes: and if the display result is complete display, determining that the completely displayed text segment is the displayed text segment.
In an alternative embodiment, the displayed text segment is a text segment in which some or all of the text in the text segment belongs to the visible text.
For specific implementation of each step in the program 510, reference may be made to corresponding steps and corresponding descriptions in units in the above-described embodiment of the error prompt generating method, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The terminal device of the embodiment generates the error prompt aiming at the visible text by determining the text segment corresponding to the visible text, and does not need to perform single full grammar check on the complete text, so that the time consumption for generating the error prompt can be greatly reduced, and the error prompt can be fed back to the user relatively quickly, thereby avoiding the problem that the error prompt cannot be fed back to the user in time due to long time consumption in the existing scheme, and further leading to the time lag in editing the user, and leading to the poor user experience.
EXAMPLE six
An embodiment of the present application provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for generating an error prompt as described above is implemented.
The computer storage medium of this embodiment, through confirming the text section that visible text corresponds, and then generate the error prompt to the visible text, and need not carry out the grammar check of single full volume to complete text, can greatly reduce the consuming time that generates the error prompt, and then can feed back the error prompt to the user comparatively fast, thereby can not in time feed back the error prompt to the user owing to what lead to consuming time length in avoiding current scheme, and then lead to editing some lags nature to the user, make the problem of user experience difference.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present invention may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present invention.
The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that the computer, processor, microprocessor controller or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the error alert generation methods described herein. Further, when a general-purpose computer accesses code for implementing the error prompt generation method shown herein, execution of the code converts the general-purpose computer into a special-purpose computer for executing the error prompt generation method shown herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The above embodiments are only for illustrating the embodiments of the present invention and not for limiting the embodiments of the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention, so that all equivalent technical solutions also belong to the scope of the embodiments of the present invention, and the scope of patent protection of the embodiments of the present invention should be defined by the claims.

Claims (16)

1. A method for generating an error prompt, comprising:
determining a displayed text segment according to the visible text displayed in the screen effective display area;
and carrying out grammar check on the displayed text segment, and generating an error prompt aiming at the visible text according to a check result.
2. The method of claim 1, wherein,
determining a display result of a text segment in the visible text according to the visible text, wherein the display result comprises complete display and partial display;
and determining the displayed text segment according to the display result of the text segment in the visible text.
3. The method of claim 2, wherein,
and if the display result is local display, performing a find-all operation on the text segment which is locally displayed, and determining the displayed text segment according to the text segment obtained by the find-all operation.
4. The method of claim 3, wherein,
determining the position of the text segment displayed by the local display in the screen effective display area;
and carrying out a search operation on the partially displayed text segment according to the determined position.
5. The method of claim 4, wherein if it is determined that the partially displayed text segment is displayed at the top of the screen active display area, then looking up until the partially displayed text segment is found from the visible text displayed at the top of the screen active display area.
6. The method of claim 4, wherein if it is determined that the partially displayed text segment is displayed at the bottom of the screen active display area, looking down until the partially displayed text segment is found, starting with the visible text displayed at the bottom of the screen active display area.
7. The method of claim 2, wherein if the display result is a full display, determining the text segment that is fully displayed as the text segment that is displayed.
8. The method of any one of claims 1-7, wherein the displayed text segment is a text segment in which some or all of the text in the text segment belongs to the visible text.
9. An apparatus for generating an error message, comprising:
the display determining module is used for determining a displayed text segment according to the visible text displayed in the screen effective display area;
and the checking module is used for carrying out grammar checking on the displayed text segment and generating an error prompt aiming at the visible text according to a checking result.
10. The apparatus of claim 9, wherein,
the display result determining module is used for determining the display result of the text segment in the visible text according to the visible text, and the display result comprises complete display and partial display;
and the text segment determining module is used for determining the displayed text segment according to the display result of the text segment in the visible text.
11. The apparatus of claim 10, wherein the local determining module is configured to perform a find-and-complete operation on the partially displayed text segment if the display result is a local display, and determine the displayed text segment according to the text segment obtained by the find-and-complete operation.
12. The apparatus of claim 11, wherein the search module is configured to determine a location of the partially displayed text segment displayed in the screen active display area, and perform a search operation on the partially displayed text segment according to the determined location.
13. The apparatus of claim 12, wherein if it is determined that the partially displayed text segment is displayed at the top of the screen active display area, looking up until the partially displayed text segment is found from the visible text displayed at the top of the screen active display area.
14. The apparatus of claim 12, wherein if it is determined that the partially displayed text segment is displayed at the bottom of the screen active display area, looking down until the partially displayed text segment is found, starting with the visible text displayed at the bottom of the screen active display area.
15. The apparatus of claim 10, wherein the integrity determination module is configured to determine the completely displayed text segment as the displayed text segment if the display result is a complete display.
16. The apparatus according to any one of claims 9-15, wherein the displayed text segment is a text segment in which some or all of the text in the text segment belongs to the visible text.
CN201910060106.3A 2019-01-22 2019-01-22 Error prompt generation method and device Active CN111475999B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910060106.3A CN111475999B (en) 2019-01-22 2019-01-22 Error prompt generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910060106.3A CN111475999B (en) 2019-01-22 2019-01-22 Error prompt generation method and device

Publications (2)

Publication Number Publication Date
CN111475999A true CN111475999A (en) 2020-07-31
CN111475999B CN111475999B (en) 2023-04-14

Family

ID=71743218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910060106.3A Active CN111475999B (en) 2019-01-22 2019-01-22 Error prompt generation method and device

Country Status (1)

Country Link
CN (1) CN111475999B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335571A (en) * 2000-06-23 2002-02-13 微软公司 Method and system for filtering & selecting from a candidate listing generated by random inputting method
US20100188419A1 (en) * 2009-01-28 2010-07-29 Google Inc. Selective display of ocr'ed text and corresponding images from publications on a client device
CN108519848A (en) * 2018-03-30 2018-09-11 联想(北京)有限公司 A kind of display control method and electronic equipment
CN108664201A (en) * 2017-03-29 2018-10-16 北京搜狗科技发展有限公司 A kind of method for editing text, device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335571A (en) * 2000-06-23 2002-02-13 微软公司 Method and system for filtering & selecting from a candidate listing generated by random inputting method
US20100188419A1 (en) * 2009-01-28 2010-07-29 Google Inc. Selective display of ocr'ed text and corresponding images from publications on a client device
CN108664201A (en) * 2017-03-29 2018-10-16 北京搜狗科技发展有限公司 A kind of method for editing text, device and electronic equipment
CN108519848A (en) * 2018-03-30 2018-09-11 联想(北京)有限公司 A kind of display control method and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FENG CHENG等: "Visual speaker authentication with random prompt texts by a dual-task CNN framework" *
马金山,张宇,刘挺,李生: "利用三元模型及依存分析查找中文文本错误" *

Also Published As

Publication number Publication date
CN111475999B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
US20120192051A1 (en) Formatting data by example
CN111240669B (en) Interface generation method and device, electronic equipment and computer storage medium
CN104636322A (en) Text copying method and text copying device
CN111324609A (en) Knowledge graph construction method and device, electronic equipment and storage medium
EP4053732A1 (en) Systems and methods for extracting text from portable document format data
CN113282488B (en) Terminal test method and device, storage medium and terminal
CN107844468A (en) The cross-page recognition methods of form data, electronic equipment and computer-readable recording medium
CN112748923A (en) Method and device for creating visual billboard, electronic equipment and storage medium
CN112818457A (en) BIM (building information modeling) model intelligent generation method and system based on CAD (computer-aided design) drawing
CN105354138A (en) Method for determining specific control attribute of mobile phone page
CN115393560A (en) BIM model drawing marking method, device, equipment and readable storage medium
CN107085641A (en) A kind of quick positioning copper sheet void method in Allegro softwares
CN106776527B (en) Electronic book data display method and device and terminal equipment
CN111475999B (en) Error prompt generation method and device
KR102039422B1 (en) Apparatus and method for automatically processing images
CN103645829A (en) Character deletion method and portable terminal utilizing same
EP4053731A1 (en) Systems and methods for extracting text from portable document format data
CN113177392B (en) Method for synchronizing row segment information in proofreading interface, computing device and storage medium
KR101996159B1 (en) Information presentation method and apparatus
JP2016532897A (en) Method and apparatus for building an intermediate character library
CN109918633B (en) Information quick filling method and terminal
CN103369834B (en) The target parameters processing method made for PCB and device
CN108363525B (en) Method and device for responding to user gesture operation in webpage and terminal equipment
CN102567302B (en) Method and device for identifying typesetting form
CN111382552A (en) Typesetting processing method, device, equipment and storage medium

Legal Events

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