Text processing method and device

By identifying and comparing the tenses of text sentences and topics, we can quickly and accurately find target sentences with confusing tenses in the text, which solves the problem of low accuracy of computer tense judgment in natural language processing and improves analysis efficiency.

CN112395870BActive Publication Date: 2024-09-17LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011380053.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2024-09-17
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

There is an accuracy problem in the computer's judgment of text tense in natural language processing, which results in inefficient manual verification and makes it difficult for users to identify incorrect tenses.

Method used

By identifying the tenses of the sentences and topics of the text to be processed, tense sequences and topic tenses are generated, and compared to determine the tense of the target sentence, achieving fast and accurate search of chaotic tenses.

Benefits of technology

It saves a lot of manual inspection costs and improves the accuracy and efficiency of text tense analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395870B
    Figure CN112395870B
Patent Text Reader

Abstract

The embodiment of the present application discloses a text processing method, the method comprising: performing tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence; performing tense recognition on the subject of the text to be processed to obtain a second tense; comparing the second tense with each first tense in the tense sequence to determine a target sentence in the text to be processed; the tense of the target sentence is a chaotic tense. The embodiment of the present application also discloses an electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to natural language processing technology, and in particular to a text processing method and device. Background Art

[0002] As we all know, with the rapid development of computers and the Internet, artificial intelligence based on computers and the Internet has become mainstream. For my country, one of the major difficulties in artificial intelligence technology is natural language processing. Natural language processing is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between humans and computers using natural language.

[0003] However, no matter whether the text is in Chinese, English or other languages, the semantics of the language are complex and difficult to understand in depth, making it difficult for the computer to make an accurate judgment on the tense of the text. In addition, if the computer makes an incorrect tense judgment, the user has no way of knowing and can only manually check each one, resulting in low checking efficiency. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a text processing method and device.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] On the one hand, an embodiment of the present application provides a text processing method, including:

[0007] Performing tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence;

[0008] Performing tense recognition on the subject of the text to be processed to obtain a second tense;

[0009] The second tense is compared with each first tense in the tense sequence to determine a target sentence in the text to be processed; the tense of the target sentence is a confusing tense.

[0010] On the one hand, an embodiment of the present application provides a text processing device, including:

[0011] A first recognition unit is used to perform tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence;

[0012] A second recognition unit is used to perform tense recognition on the subject of the text to be processed to obtain a second tense;

[0013] A comparison unit is used to compare the second tense with each first tense in the tense sequence to determine a target sentence in the text to be processed; the tense of the target sentence is a confusing tense.

[0014] On the one hand, an embodiment of the present application also provides an electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps of the above-mentioned text processing method when running the computer program.

[0015] On the one hand, an embodiment of the present application further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned text processing method is implemented.

[0016] In an embodiment of the present application, tense recognition is performed on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence; tense recognition is performed on the subject of the text to be processed to obtain a second tense; the second tense is compared with each first tense in the tense sequence to determine a target sentence in the text to be processed; the tense of the target sentence is a chaotic tense; thereby, by comparing the tense sequence of the text to be processed itself with the tense of the subject of the text to be processed, the target sentence in the text to be processed with a chaotic tense can be quickly and accurately found, saving a lot of manual inspection costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is an optional structural diagram of the text processing system of the embodiment of the present application;

[0018] Figure 2 This is an optional structural diagram of the text processing system of the embodiment of the present application;

[0019] Figure 3 This is an optional flowchart of the text processing method of the embodiment of the present application;

[0020] Figure 4 A schematic diagram of the display effect of an optional display interface of the text processing method according to an embodiment of the present application;

[0021] Figure 5 This is an optional flowchart of the text processing method of the embodiment of the present application;

[0022] Figure 6 This is an optional structural diagram of a text processing device according to an embodiment of the present application;

[0023] Figure 7 This is an optional flowchart of the text processing method of the embodiment of the present application;

[0024] Figure 8This is an optional structural diagram of a text processing device according to an embodiment of the present application;

[0025] Fig. 9 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] The present application will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the embodiments provided herein are only used to explain the present application and are not intended to limit the present application. In addition, the embodiments provided below are partial embodiments for implementing the present application, rather than providing all embodiments for implementing the present application. In the absence of conflict, the technical solutions recorded in the embodiments of the present application can be implemented in any combination.

[0027] In various embodiments of the present application: tense recognition is performed on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence; tense recognition is performed on the subject of the text to be processed to obtain a second tense; the second tense is compared with each first tense in the tense sequence to determine a target sentence in the text to be processed; the tense of the target sentence is a confused tense.

[0028] The text processing method of the present application embodiment can be applied to Figure 1 In the text processing system shown, the text processing device in the text processing system can process the text to be processed to obtain the target sentence with a confused tense in the text to be processed.

[0029] In one example, if Figure 1 As shown, the text processing system includes a client 10 and a server 20; wherein the client 10 is installed with an input application APP that can receive user input operations or a browser that provides an input page, and the user can receive the text to be processed input by the user through the input application APP or the input page. The server 20 provides services for the client 10, and the server 20 can receive the text to be processed and process the text to be processed. The client 10 and the server 20 interact with each other through a network 30.

[0030] The server 20 can be implemented as a text processing device for implementing the text processing method. The server 20 performs tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence; the subject of the text to be processed is tense recognized to obtain a second tense; the second tense is compared with each first tense in the tense sequence to determine the target sentence in the text to be processed; the tense of the target sentence is a chaotic tense, and the target sentence or the identifier of the target sentence is pushed to the client 10. The client 10 can present the target sentence to the user through a display.

[0031] In one example, if Figure 2 As shown, the text processing system only includes a client 40, and the client 40 is implemented as a text processing device for implementing the text processing method.

[0032] The client receives the text to be processed input by the user through an input application APP or an input page, and performs tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence; the subject of the text to be processed is tense recognized to obtain a second tense; the second tense is compared with each first tense in the tense sequence to determine the target sentence in the text to be processed, and the target sentence is presented to the user.

[0033] In combination with the above-mentioned text processing system, this embodiment proposes a text processing method, which can accurately and quickly analyze the tense of the text.

[0034] Next, combine Figure 1 or Figure 2 The schematic diagram of the text processing system shown illustrates various embodiments of the text processing method, apparatus, device and storage medium provided in the embodiments of the present application.

[0035] based on Figure 1 and Figure 2 The text processing system shown in the present application provides a text processing method, which is applied to a text processing device. The functional modules in the text processing device can be collaboratively implemented by hardware resources of an electronic device (such as a terminal device, a server or a server cluster), such as computing resources such as a processor, and communication resources (such as for supporting various communication methods such as optical cables and cellular communications).

[0036] Of course, the embodiments of the present application are not limited to being provided as methods and hardware, and there may be a variety of implementation methods, such as being provided as a storage medium (storing instructions for executing the text processing method provided by the embodiments of the present application).

[0037] The present application embodiment provides a text processing method, such as Figure 3 As shown, the text processing method includes:

[0038] S301 , performing tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense.

[0039] Wherein, the first tense is set as the tense of the sentence.

[0040] The document processing device determines a file to be processed based on an operation of a user.

[0041] In one example, the text processing device is a client, and the client obtains the text to be processed based on the user's input or selection of existing text. In one example, the text processing device is a server, and the client obtains the text to be processed based on the user's input or selection of existing text, and sends the text to be processed to the server, and the server receives the text to be processed.

[0042] Here, the language of the text to be processed may be Chinese, English, etc. The embodiment of the present application does not impose any limitation on the language type of the text to be processed.

[0043] After the text processing device determines the text to be processed, it identifies the tense of each sentence included in the text to be processed. The text processing device can determine the tense of a sentence by identifying the tense of a keyword in the sentence, or it can use each sentence as a sentence tense discriminator to obtain the tense of each sentence output by the sentence tense discriminator. In the embodiment of the present application, there is no limitation on the method of identifying the tense of a sentence.

[0044] In the embodiment of the present application, based on the division of tense levels, the tense of a sentence may include a primary tense or a secondary tense, the tense level of the primary tense is primary, and the tense level of the secondary tense is secondary, wherein the primary tense includes three tenses: past tense, present tense and future tense, and the secondary tense includes: general present tense, present progressive tense, present perfect tense, present perfect progressive tense, general past tense, past progressive tense, past perfect tense, past perfect progressive tense, general future tense, future progressive tense, future perfect tense, past future tense. Among them, the secondary tenses: general present tense, present progressive tense, present perfect tense, and present perfect progressive tense belong to the primary tense: present tense, and the secondary tenses: general past tense, past progressive tense, past perfect tense, and past perfect progressive tense belong to the primary tense: past tense, and the secondary tenses: general future tense, future progressive tense, future perfect tense, and past future tense belong to the primary tense: future tense.

[0045] In one example, the text to be processed includes a sentence “I have finished my homework”, and the tense of the sentence is present perfect tense or present tense.

[0046] In one example, the text to be processed includes a sentence “I have done it before I went home yesterday”, and the tense of the sentence is past perfect tense or past tense.

[0047] In one example, the text to be processed includes a sentence “He will send the package out before nine o'clock tomorrow morning”, and the tense of the sentence is future perfect or future tense.

[0048] Here, the tense of each sentence is called the first tense. After the text processing device determines the tense of each sentence, it sorts the tenses of each sentence according to the order between the sentences, and forms a tense sequence with the sorted tenses. In an example, the sentences in the text to be processed include: sentence 1, sentence 2, sentence 3, ..., sentence 50, and the tense sequence obtained is (T1, T2, T3, ..., T 50 ), where Ti is the tense of sentence i.

[0049] In actual applications, when the text to be processed is an article including a title and a main text, the text processing device identifies the tense of each sentence included in the main text of the text to be processed to form a tense sequence.

[0050] S302: Perform tense recognition on the subject of the text to be processed to obtain a second tense.

[0051] After the text processing device determines the text to be processed, it obtains the tense of the subject of the device to be processed, that is, the second tense. The tense of a subject may include one or more tenses. The tense of the subject may be a primary tense or a secondary tense.

[0052] The text processing device determines the subject in one of the following ways:

[0053] Determination method 1: output a theme input interface, and receive a theme input by a user based on the theme input interface;

[0054] Determination method 2: when the text to be processed is an article including a main text and a title, the title is taken as the subject of the text to be processed;

[0055] Determination method three: if the text to be processed does not include a title, then the keywords included in the text are identified, and the subject of the text to be processed is determined based on the identified keywords;

[0056] Determination method four: input the text to be processed into a topic identification model, and the topic identification model outputs the topic of the text to be processed.

[0057] For determination method 4, the topic identification model can be trained by the topics corresponding to each text in the corpus to construct a topic identification model that can identify the topic of the text to be processed.

[0058] In the embodiments of the present application, there is no limitation on the manner in which the text processing device determines the subject of the text to be processed.

[0059] After the text processing device determines the topic, it can search for the tense corresponding to the topic in the tense library. Here, the tense library includes the corresponding relationship between the topic and the tense. Here, the tense sequence of the text corresponding to each topic in the corpus can be obtained, and the number of each tense in the tense sequence of the text corresponding to the same topic can be counted, and the tenses can be sorted from high to low according to the number of times, and the tenses whose number is before the set order can be used as the tense corresponding to the topic. In an example, the number of times each tense appears in the tense sequence of the text corresponding to topic 1 in the corpus is counted, wherein the tenses appearing in the tense sequence of the text corresponding to topic 1 include: tense A, tense B, tense C, tense D, tense F, tense G, wherein the number of occurrences of tense A is 25, the number of occurrences of tense B is 3, the number of occurrences of tense C is 20, the number of occurrences of tense D is 10, the number of occurrences of tense F is 1, and the number of occurrences of tense G is 16, then the tenses of topic 1 are: tense A, tense C and tense G.

[0060] After the text processing device determines the topic, the topic can be input into the topic tense discriminator, and the topic tense discriminator outputs the tense of the topic. Here, the topic tense discriminator can be trained by each topic and the tense of each topic in the corpus to construct a topic tense discriminator that can recognize the tense of the topic.

[0061] In the embodiments of the present application, there is no limitation on the manner in which the text processing device identifies the tense of a topic.

[0062] S303: Compare the second tense with each first tense in the tense sequence to determine a target sentence in the text to be processed.

[0063] The tense of the target sentence is a confusing tense.

[0064] The text processing device determines the tense sequence of the text to be processed and the second tense of the text to be processed, compares the tense sequence with the second tense, and searches for a tense in the tense sequence that does not match the second tense, namely, a chaotic tense.

[0065] In one example, the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 future tense, T5 present tense, T6 present tense, T7 past tense, T8 present tense, T9 future tense, T 10 Present tense, T 11 Past tense and T 12 Present tense, the second tense includes: present tense and past tense. If T4 future tense and T9 future tense in the tense sequence do not match the second tense, then T4 future tense and T9 future tense are confusing tenses.

[0066] In one example, the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 past perfect tense, T5 present continuous tense, T6 present perfect tense, T7 past continuous tense, T8 present tense, T9 future continuous tense, T 10 Simple present tense, T 11 Simple past tense and T 12 In the general present tense, the second tense includes: the general present tense and the general past tense. If the T9 future continuous tense in the tense sequence does not match the second tense, then the T9 future continuous tense is a confusing tense.

[0067] In practical applications, the text processing device may include a tense comparator. The text processing device inputs the tense sequence and subject of the text to be processed into the tense comparator. The tense comparator analyzes the second tense, compares the second tense with each first tense in the tense sequence, and outputs the similarity between the second tense and each first tense. The text processing device determines the first tense whose similarity is lower than a third threshold as a mixed tense.

[0068] After the text processing device determines the confusing tense, it determines the sentence corresponding to the confusing tense as the target sentence, and prompts the target sentence. Here, the prompting method for the target sentence may include: distinguishing the target sentence, outputting the target sentence, etc., wherein the display method for distinguishing the display may include: highlighting, underlining, etc. In the embodiment of the present application, there is no limitation on the prompting method for the target sentence.

[0069] Here, when the text processing device is a client, the target sentence is prompted directly on the client. When the text processing device is a server, the server can output a prompt instruction for the target sentence, send the prompt instruction to the client, and the client executes the prompt instruction to prompt the target sentence; wherein the prompt instruction includes the target sentence or the identifier of the target sentence, and the prompt instruction may also include a prompt mode identifier indicating the prompt mode.

[0070] In one example, the embodiment of the present application can be applied to the following scenarios:

[0071] The scanner of the client scans the composition of each student to obtain the text to be processed, identifies the tense of each sentence in the text to be processed of each student, and obtains the tense sequence of each composition. The client receives the topic input by the teacher, and identifies the tense of the topic to obtain the second tense, compares the tense sequence of each composition with the second tense, finds the confusing tense that does not match the second tense, determines the target sentence of each confusing tense, and highlights the target sentence in the composition where the target sentence is located.

[0072] In one example, a display interface for highlighting a target sentence is shown in FIG. Figure 4As shown in 401, the composition to which the target sentence belongs is the composition of student B, and the target sentence is shown in 402. The display interface 401 also presents an error tense prompt box 403, which outputs the theme tense of the current composition, i.e., the second tense, and the tense of the target sentence 402, i.e., the abnormal tense. The error tense prompt box 403 also provides a first control with a control content of "Modify" and a second control with a control content of "Confirm". When the user clicks the first control, the tense of the sentence marked by 402 can be modified, and when the user clicks the second control, the abnormal tense of the sentence marked by 402 can be confirmed.

[0073] The text processing method provided in the embodiment of the present application performs tense recognition on each sentence included in the text to be processed to obtain a tense sequence composed of a first tense; the first tense is the tense of the sentence; the subject of the text to be processed is tense recognized to obtain a second tense; the second tense is compared with each first tense in the tense sequence to determine the target sentence in the text to be processed; the tense of the target sentence is a chaotic tense; thereby, by comparing the tense sequence of the text to be processed itself with the tense of the subject of the text to be processed, the target sentence in the text to be processed with a chaotic tense can be quickly and accurately found, saving a lot of manual inspection costs.

[0074] In some embodiments, Figure 5 As shown, the implementation of S301 includes:

[0075] S3011, segmenting the text to be processed to obtain a sentence set consisting of sentences included in the text to be processed;

[0076] S3012, using each sentence in the sentence set as an input of a first tense discriminator, and obtaining a first tense corresponding to each sentence output by the first tense discriminator;

[0077] S3013. Construct the tense sequence based on the first tense corresponding to each sentence.

[0078] After obtaining the text to be processed, the text processing device identifies the segmentation characters in the text to be processed, and performs segmentation processing on the text to be processed by identifying the segmentation characters, and divides the text to be processed into sentences. The segmentation characters may include punctuation marks, conjunctions that can lead clauses, etc.

[0079] The text processing device inputs each sentence included in the text to be processed into the first tense discriminator respectively, and obtains the tense of each sentence output by the first tense discriminator, that is, the corresponding first tense.

[0080] In an embodiment of the present application, a text preprocessing program may exist in the text processing device, and the text preprocessing program can segment the text to be processed and output the sentences included in the text to be processed.

[0081] Here, when the text to be processed includes a complex sentence composed of a main clause and one or more subordinate clauses through conjunctions, the main clause and each subordinate clause can be treated as a separate sentence, and the tense of each sentence can be identified.

[0082] In one example, the complex sentence is It seems that Mr. Li has arrived in Beijing (It is said that Mr. Li has arrived in Beijing); the main clause is "It seems that...", the tense is present tense, and the subordinate clause is "Mr. Li has arrived in Beijing", the tense is past perfect tense. Therefore, the tenses of the complex sentence include: present tense and past perfect tense.

[0083] In one example, the complex sentence is: Xiao Ming said last year that he would graduate from college next year, in which the main clause is "Xiao Ming said last year...", the tense is past tense, and the subordinate clause is "He will graduate from college next year", the tense is future tense. Therefore, the tenses of this complex sentence include: past tense and future tense.

[0084] After the text processing device determines the tense of each sentence, it combines the tenses of each sentence according to the order of the sentences to obtain the tense sequence of the text to be processed. In one example, the sentences in the text to be processed include: sentence 1, sentence 2, sentence 3, ..., sentence 50, and the tense sequence obtained is (T1, T2, T3, ..., T 50 ), where Ti is the tense of sentence i.

[0085] In the embodiment of the present application, the text processing device includes a first tense discriminator, namely a sentence recognition discriminator, and the first tense discriminator is trained by using each sentence in the corpus and the tense corresponding to each sentence.

[0086] The text processing method provided in the embodiment of the present application identifies the tense of each sentence in the text to be processed by training a first tense discriminator, and quickly and correctly identifies the tense of each sentence.

[0087] In some embodiments, after determining the ten sentences of each sentence, the text processing device further implements the following steps: using the sentence and the first tense corresponding to the sentence as input of a second tense discriminator to obtain the accuracy of the output of the second discriminator; and when the accuracy is lower than a first threshold, marking the corresponding sentence.

[0088] Here, the text processing device includes a second tense discriminator, namely a sentence tense confirmer, to confirm whether the tense of each sentence identified in S101 is correct.

[0089] The training of the second tense discriminator can be achieved through positive and negative corpora in the corpus, wherein, for the positive corpus, the tense of the corpus is the correct tense, and for the negative corpus, the tense of the corpus is the wrong tense. The second tense discriminator is identified by the positive and negative corpora, so that the second tense discriminator can determine whether the tense of the sentence is correct.

[0090] After determining the tense of each sentence in the text to be processed, the text processing device inputs each sentence and the corresponding tense into the second tense discriminator, and the second tense discriminator outputs the probability of whether the tense of each sentence is correct. When the probability output by the second tense discriminator is greater than or equal to the first threshold, it is determined that the tense of the input sentence is the correct tense of the input sentence, and when the probability output by the second tense discriminator is lower than the first threshold, it is determined that the tense of the input sentence is the wrong tense of the input sentence.

[0091] The text processing device identifies sentences whose output probabilities are lower than a first threshold.

[0092] In the embodiment of the present application, the text processing device can output a sentence with a probability lower than the first threshold through the tense correction page to prompt the user to enter the correct tense of the sentence. After receiving the correct tense of the sentence input by the user based on the tense correction page, the text processing device forms a tense sequence of the text to be processed based on the tense with a recognized probability greater than or equal to the first threshold and the tense input by the user.

[0093] The text processing method provided in the embodiment of the present application can effectively confirm the correctness of the tense of each sentence recognized by the text processing device based on each sentence itself, ensure the correctness of the basis of the tense analysis of the text to be processed, and improve the accuracy of the tense analysis of the text to be processed.

[0094] In some embodiments, the implementation of S302 includes: using the subject as an input of a third tense discriminator to obtain a second tense output by the third tense discriminator.

[0095] After the text processing device determines the topic, the topic can be input into a third tense discriminator, the topic tense discriminator, which outputs the tense of the topic. Here, the topic tense discriminator can be trained by each topic and the tense of each topic in the corpus to construct a topic tense discriminator that can identify the tense of the topic.

[0096] Here, the corpus includes high-scoring essays, and the themes of the high-scoring texts can be determined. The tense of each sentence in the high-scoring texts can be counted to obtain the tense sequence of the high-scoring texts, thereby determining the tense sequence corresponding to each theme. The text processing device counts the number of times each tense appears in the tense sequence of the high-scoring texts corresponding to the same theme, and sorts each tense from high to low according to the number of times. The tense whose number is before the set order is used as the tense corresponding to the theme. The obtained theme and corresponding tense are used as training themes and labels corresponding to the training themes to train the third discriminator.

[0097] In some embodiments, the implementation of S303 includes:

[0098] S3031, determining the tense level of the second tense and the tense level of the first tense;

[0099] S3032: Compare the second tense with the first tense according to the determined tense level to determine a confusing tense in the tense sequence;

[0100] Wherein, when there is a tense to be adjusted whose tense level is a second-level tense in the first tense and the second tense, the tense level of the tense to be adjusted is adjusted to a first-level tense;

[0101] S3033. Determine that the sentence corresponding to the confusing tense is the target sentence.

[0102] The tense levels of tenses include: primary and secondary, among which the tense with the primary level is called primary tense, and the tense with the secondary level is called secondary tense. The following three tenses have the primary level: past tense, present tense and future tense, and the following twelve tenses have the secondary level: simple present tense, present continuous tense, present perfect tense, present perfect continuous tense, simple past tense, past continuous tense, past perfect tense, past perfect continuous tense, simple future tense, future continuous tense, future perfect tense, past future tense.

[0103] The text processing device determines the tense level of each first tense and the tense level of the second tense in the tense sequence. The recognition level based on the tense level of the first tense and the second tense includes the following four situations:

[0104] Case 1: The tense level of the first tense is level 1, and the tense level of the second tense is level 1;

[0105] Case 2: The tense level of the first tense is level 2, and the tense level of the second tense is level 2;

[0106] Case 3: The tense level of the first tense is level 2, and the tense level of the second tense is level 1;

[0107] Case 4: The tense level of the first tense is level one, and the tense level of the second tense is level two.

[0108] For case 1, when the tense level of the first tense and the recognition level of the second tense do not include the second level, the first tense and the second tense are directly compared.

[0109] At this time, the implementation of S3032 includes:

[0110] In the case that the second tense and the first tense both belong to the first tense, the second tense is compared with each first tense in the tense sequence; and the first tense in the tense sequence that is different from the second tense is determined as the chaotic tense.

[0111] In one example, the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 future tense, T5 present tense, T6 present tense, T7 past tense, T8 present tense, T9 future tense, T 10 Present tense, T 11 Past tense and T 12 Present tense, the second tense includes: present tense and past tense. If T4 future tense and T9 future tense in the tense sequence do not match the second tense, then T4 future tense and T9 future tense are confusing tenses.

[0112] For case 2, case 3 or case 4, when the tense level of the first tense and the recognition level of the second tense do not include level 2, the tense with level 2 is used as the tense to be adjusted, and the recognition level of the tense to be adjusted is adjusted to level 1 before comparison.

[0113] Here, when the secondary tense is the following tenses, the tense level is adjusted to the first level to be present tense: simple present tense, present continuous tense, present perfect tense or present perfect continuous tense; when the secondary tense is the following tense, the tense level is adjusted to the first level to be past tense: simple past tense, past continuous tense, past perfect tense, past perfect continuous tense; when the secondary tense is the following tense, the tense level is adjusted to the first level to be future tense: secondary tenses: simple future tense, future continuous tense, future perfect tense, past future tense.

[0114] In case 2, the tenses to be adjusted include the first tense and the second tense, and the tense levels of the first tense and the second tense are adjusted respectively. At this time, the implementation of S3032 includes: when the second tense and the first tense both belong to the second tense, the tense level of the second tense is adjusted to the first tense, and the tense level of each first tense in the tense sequence is adjusted to the first tense; the second tense is compared with the first tense; and the first tense in the tense sequence that is different from the second tense is determined as the confused tense.

[0115] In one example, the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 past perfect tense, T5 present continuous tense, T6 present perfect tense, T7 past continuous tense, T8 present tense, T9 future continuous tense, T 10 Simple present tense, T 11 Simple past tense and T 12 The second tense includes the general present tense and the general past tense. The tense sequence after adjusting the tense level of each first tense in the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 past tense, T5 present tense, T6 present tense, T7 past tense, T8 present tense, T9 future tense, T10 future tense, T11 future tense, T12 future tense, T13 future tense, T14 future tense, T15 future tense, T16 future tense, T17 future tense, T18 future tense, T19 future tense, T20 future tense, T21 future tense, T22 future tense, T23 future tense, T24 future tense, T25 future tense, T26 future tense, T27 future tense, T28 future tense, T29 future tense, T30 future tense, T30 future tense, T30 future tense, T 10 Present tense, T 11 Past tense and T 12 Present tense, the second tense after the tense level adjustment includes: present tense and past tense, then the confusing tense is T9 future continuous tense.

[0116] In case three, the tense to be adjusted includes the first tense, and the tense level of each first tense in the tense sequence is adjusted. At this time, the implementation of S3032 includes: when the second tense belongs to the first tense and the first tense belongs to the second tense, the tense level of each first tense in the tense sequence is adjusted to the first tense; the second tense is compared with each first tense in the tense sequence; and the first tense in the tense sequence that is different from the second tense is determined as the confused tense.

[0117] In one example, the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 past perfect tense, T5 present continuous tense, T6 present perfect tense, T7 past continuous tense, T8 present tense, T9 future continuous tense, T 10 Simple present tense, T 11 Simple past tense and T 12 The second tense includes: present tense and past tense. The tense sequence after adjusting the tense level of each first tense in the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 past tense, T5 present tense, T6 present tense, T7 past tense, T8 present tense, T9 future tense, T10 future tense, T11 future tense, T12 future tense, T13 future tense, T14 future tense, T15 future tense, T16 future tense, T17 future tense, T18 future tense, T19 future tense, T20 future tense, T21 future tense, T22 future tense, T23 future tense, T24 future tense, T25 future tense, T26 future tense, T27 future tense, T28 future tense, T29 future tense, T30 future tense, T30 future tense, T30 future tense, T30 future 10 Present tense, T 11 Past tense and T 12 Present tense, then the confusing tense is T9 future continuous tense.

[0118] In case four, the tense to be adjusted includes the second tense, and the tense level of the second tense is adjusted. At this time, the implementation of 3032 includes: when the second tense belongs to the second tense and the first tense belongs to the first tense, adjusting the tense level of the second tense to the first tense; comparing the second tense with each first tense in the tense sequence; and determining the first tense in the tense sequence that is different from the second tense as the confused tense.

[0119] In one example, the tense sequence is: T1 present tense, T2 past tense, T3 past tense, T4 past tense, T5 present tense, T6 present tense, T7 past tense, T8 present tense, T9 future tense, T 10 Present tense, T 11 Past tense and T 12 Present tense, the second tense includes: simple present tense and simple past tense, the second tense after tense level adjustment includes: present tense and past tense, then the confused tense is T9 future continuous tense.

[0120] In the embodiment of the present application, when the tense sequence and the second tense include a tense with a tense level of one, the tense level of the tense is adjusted to ensure that the first tense and the second tense can be accurately compared, and to ensure that the target sentence with a confused tense in the text to be processed is quickly and accurately found.

[0121] In some embodiments, the text processing method provided by the embodiments of the present application, after S301, further includes: obtaining a tense sequence of a reference text associated with the text to be processed to obtain a standard tense sequence; the subject of the reference text is the same as the subject of the text to be processed; determining the similarity between the standard tense sequence and the tense sequence; and outputting a prompt message when the similarity is lower than a second threshold.

[0122] Here, the reference text may be a model text such as a high-scoring text in the corpus, and the text processing device searches the corpus for a tense sequence of the reference text with the same subject as the text to be processed, i.e., a standard tense sequence. Here, the corpus may directly store a standard tense sequence corresponding to the reference text, or may not store a tense sequence of the reference text. In the case where the corpus does not store a tense sequence of the reference text, the text processing device may identify the tense of each sentence in the reference text to obtain a standard tense sequence.

[0123] After obtaining the standard tense sequence, the text processing device calculates the similarity between the tense sequence of the text to be processed and the standard tense sequence, and compares the calculated similarity with a second threshold. When the calculated similarity is greater than or equal to the second threshold, it is determined that the overall tense usage of the text to be processed is normal. When the calculated similarity is less than the second threshold, it is determined that there is a problem with the overall tense usage of the text to be processed.

[0124] When the text processing device determines that there is a problem with the tense usage of the entire text to be processed, a prompt message is output to prompt the user that there is a problem with the tense usage of the current text to be processed.

[0125] The text processing device may calculate the similarity between the tense sequence of the text to be processed and the standard tense sequence in a calculation method that may include:

[0126] Method 1: The minimum number of transformations required to convert the tense sequence of the text to be processed into the standard tense sequence (or convert the standard tense sequence into the tense sequence of the text to be processed), i.e., the Levenshtein distance;

[0127] In one example, the tense sequence Q1 of the text to be processed is: T1 present tense, T2 past tense, T3 past tense, T4 past perfect tense, T5 present continuous tense, T6 present perfect tense, T7 past continuous tense, T8 present tense, T9 future continuous tense, T10 10 Simple present tense, T 11 Simple past tense and T 12 The standard tense sequence Q2 is: T'1 past tense, T'2 past tense, T'3 past tense, T'4 past perfect, T'5 present continuous, T'6 perfect, T'7 past continuous, T'8 present tense, T'9 future continuous, which undergoes the following transformations: the first transformation: T'1 past tense to T1 present tense, the second transformation: T'6 perfect to T6 present perfect, the third transformation: T'1 past tense to T1 present tense, the third transformation: T'1 past tense to T1 present tense, the fourth transformation: T'1 past tense to T1 present tense, the fifth transformation: T'1 past tense to T1 present tense, the fifth transformation: T'1 past tense to T1 present tense, the fifth transformation: T'1 past tense to T1 present tense, the sixth transformation: T'1 past tense to T1 present perfect, the seventh transformation: T'1 past tense to T1 present tense, the eighth ... 10 Supplementary and fourth tense of the present tense: T 11 The supplement of the simple past tense, and the fifth time: T 12 For the supplement of the general present tense, the similarity between the tense sequence Q1 of the text to be processed and the standard tense sequence Q2 is 5.

[0128] Method 2: Calculate based on the proportion of the longest common subsequence in the tense sequence and the standard tense sequence of the text to be processed.

[0129] In one example, the tense sequence Q3 of the text to be processed is: T1 present tense, T2 past tense, T3 past tense, T4 past perfect tense, T5 present continuous tense, T6 present perfect tense, T7 past continuous tense, T8 present tense, T9 future continuous tense, T10 10 Simple present tense, T 11 Simple past tense and T 12For general present tense, the standard tense sequence Q4 is: T'1 past continuous tense, T'2 general present tense, T'3 future continuous tense, T'4 general present tense, T'5 general past tense and T'6 general present tense, T'7 general past tense, T'8 general past tense, then the similarity between the tense sequence Q1 of the text to be processed and the standard tense sequence Q2 is 5; then the longest common subsequence of the tense sequence Q3 of the text to be processed and the standard tense sequence Q4 is (past continuous tense, general present tense, future continuous tense, general present tense, general past tense and general present tense), then the longest common subsequence occupies 1 / 2 of Q3 and 3 / 4 of Q4, then the similarity between the tense sequence Q3 of the text to be processed and the standard tense sequence Q4 is 3 / 8.

[0130] It should be noted that, in the embodiments of the present application, the calculation method of the similarity is different, and the corresponding value of the second threshold may be different.

[0131] Method three: input the tense sequence of the text to be processed and the standard tense sequence into the fourth tense discriminator, and obtain the similarity between the tense sequence of the text to be processed and the standard tense sequence output by the fourth tense discriminator.

[0132] In the embodiment of the present application, the fourth tense discriminator can be trained by using tense sequences of different texts in different corpora.

[0133] In the embodiment of the present application, there is no limitation on the method for calculating the similarity between the tense sequence of the text to be processed and the standard tense sequence.

[0134] In an embodiment of the present application, the text processing device matches the tense sequence of the text to be processed with the tense of the topic, thereby locally determining the sentences in the text to be processed that may have problems, and by comparing the tense sequence of the text to be processed with the standard tense sequence, judges the difference between the overall tense of the text to be processed and the model text, so as to analyze the tense of the text to be processed from different angles.

[0135] It should be noted that, in the above description, the training of the first tense discriminator, the second tense discriminator, the third tense discriminator and the fourth tense discriminator is performed by a text processing device. In actual applications, the training of one or more of the above tense discriminators may be performed by a training device other than the text processing device. After the training is completed, the training device sends the trained tense discriminator to the text processing device.

[0136] The text recognition method provided in the embodiment of the present application is further described below through specific examples.

[0137] like Figure 6As shown, the text processing device 600 includes four tense classifiers: a first tense discriminator 601 (M1), a second tense discriminator 602 (M2), a third tense discriminator 603 (M3) and a fourth tense discriminator 604 (M4). Among them, M1 is a sentence tense discriminator for identifying the tense of a sentence, M2 is a tense discriminator for judging whether the tense of a sentence is correct, M3 is a topic tense discriminator for identifying the tense of a topic, and M4 is a discriminator for judging the similarity between the tense sequence of the model text of the topic and the tense sequence of the text to be processed.

[0138] The construction methods of M1 include:

[0139] The model trained to recognize 12 tenses can recognize sentence tenses and construct a sentence tense classifier, denoted as M1.

[0140] The construction methods of M2 include:

[0141] The tense classification model is trained using positive and negative examples including sentences with correct tense and sentences with incorrect tense, and M2 is constructed.

[0142] The construction methods of M3 include:

[0143] According to the tense sequence of each sentence in the historical essay or high-scoring essay, the tense sequence of the corresponding essay is determined, and the tense sequence library of the corresponding topic essay is constructed. According to the tense tag library, positive and negative tense sequence samples are constructed, and the topic main tense classifier M3 is constructed.

[0144] The M4 is constructed in the following ways:

[0145] The temporal sequence discriminator M4 of the Transformer structure is trained based on M3. The discriminator can judge whether the sequence is an abnormal temporal sequence based on the temporal sequence. M4 can also be a sequence similarity discriminator, which judges whether the sequence is abnormal by judging the similarity between the input temporal sequence and the model text temporal sequence.

[0146] When the text processing device receives the text to be processed input by the user, such as Figure 7 As shown, the text processing device performs the following processing:

[0147] The text processing device receives the text to be processed 701, and executes S702 and S703 to obtain a tense sequence 704, wherein:

[0148] S702, determining the tense of each sentence;

[0149] S703, constructing a tense sequence;

[0150] The text processing device determines the tense of each sentence in the to-be-processed text 701 based on the first tense discriminator, and constructs a tense sequence 704 based on the determined tense.

[0151] After executing S702, the text processing device further executes the following steps:

[0152] S705, determining the correctness of the tense of each sentence;

[0153] The text processing device determines the correctness of the tense of each sentence in the to-be-processed text 701 based on the second tense discriminator, and executes S706 when there is a sentence with a wrong tense.

[0154] S706. Output the sentence with incorrect tense.

[0155] The text processing device performs S708 to determine the tense of the topic based on the topic 707 of the text to be processed, and obtains the tense 709 of the topic.

[0156] The text processing device executes S710 , judging an abnormal tense in the tense sequence based on the tense sequence 704 and the tense 709 of the subject, and executes S711 , identifying a sentence corresponding to the abnormal tense, when the tense sequence includes an abnormal tense.

[0157] The text processing device performs S713 based on the tense sequence 704 and the range tense sequence 712, i.e., the reference tense sequence, to determine whether the tense sequence matches the model text tense sequence, and if the similarity is less than a second threshold, performs S714 to identify sentences with mismatched tenses. Here, the sentences with mismatched tenses are sentences corresponding to tenses in the tense sequence that are inconsistent with the model text tense in the model text tense sequence.

[0158] The text processing method provided in the embodiment of the present application can perform the following processing:

[0159] 1. Use M1 to determine the tense of a single sentence in the composition, and use M2 to determine whether the tense is used correctly.

[0160] 2. Use M3 to determine the tense sequence that should be used in the entire article based on the composition title, and use M4 to determine whether there are any abnormalities in the tense sequence used in the composition based on model essays or high-scoring history papers.

[0161] 3. Based on the results of 1 and 2, perform usage correctness judgment, consistency judgment and anomaly detection on the tense sequence of the essay to be scored.

[0162] 4. Highlight confusing tenses that are inconsistent with the full text, and remind teachers of tenses that are inconsistent with the tense predicted in the title of the article.

[0163] Figure 8A schematic diagram of the implementation process of a text processing device according to an embodiment of the present application is shown in FIG. Figure 8 As shown, the device 800 includes:

[0164] The first recognition unit 801 is used to perform tense recognition on each sentence included in the text to be processed, and obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence;

[0165] A second recognition unit 802 is used to perform tense recognition on the subject of the text to be processed to obtain a second tense;

[0166] The comparison unit 803 is used to compare the second tense with each first tense in the tense sequence to determine the target sentence in the text to be processed; the tense of the target sentence is a confusing tense.

[0167] In some embodiments, the first identification unit 801 is further configured to:

[0168] Segmenting the text to be processed to obtain a sentence set consisting of the sentences included in the text to be processed;

[0169] Using each sentence in the sentence set as an input of a first tense discriminator, and obtaining a first tense corresponding to each sentence output by the first tense discriminator;

[0170] The tense sequence is constructed based on the first tense corresponding to each sentence.

[0171] In some embodiments, the apparatus 800 further includes: a first determination unit, configured to:

[0172] Using the sentence and the first tense corresponding to the sentence as inputs of a second tense discriminator, and obtaining the accuracy of the output of the second discriminator;

[0173] When the accuracy rate is lower than the first threshold, the corresponding sentence is marked.

[0174] In some embodiments, the second identification unit 802 is further configured to:

[0175] The subject is used as an input of a second temporal discriminator to obtain a second temporal state output by the second temporal discriminator.

[0176] In some embodiments, the comparison unit 803 is further configured to:

[0177] determining a tense level of the second tense and a tense level of the first tense;

[0178] According to the determined tense level, the second tense is compared with the first tense to determine the disordered tense in the tense sequence; wherein, when there is a tense to be adjusted whose tense level is a second-level tense in the first tense and the second tense, the tense level of the tense to be adjusted is adjusted to a first-level tense;

[0179] The sentence corresponding to the confusing tense is determined to be the target sentence.

[0180] In some embodiments, the comparison unit 803 is further configured to:

[0181] When the second tense and the first tense both belong to the first tense, comparing the second tense with each first tense in the tense sequence;

[0182] A first tense in the tense sequence that is different from the second tense is determined as the chaotic tense.

[0183] In some embodiments, the comparison unit 803 is further configured to:

[0184] In the case where both the second tense and the first tense belong to the second tense, adjusting the tense level of the second tense to the first tense, and adjusting the tense level of each first tense in the tense sequence to the first tense;

[0185] comparing the second tense with the first tense;

[0186] A first tense in the tense sequence that is different from the second tense is determined as the chaotic tense.

[0187] In some embodiments, the comparison unit 803 is further configured to:

[0188] When the second tense belongs to the first tense and the first tense belongs to the second tense, adjusting the tense level of each first tense in the tense sequence to the first tense;

[0189] comparing the second tense with each first tense in the tense sequence;

[0190] A first tense in the tense sequence that is different from the second tense is determined as the chaotic tense.

[0191] In some embodiments, the apparatus 800 further includes: a second determination unit, configured to:

[0192] Acquire a tense sequence of a reference text associated with the text to be processed to obtain a standard tense sequence; the subject of the reference text is the same as the subject of the text to be processed;

[0193] Determining the similarity between the standard tense sequence and the tense sequence;

[0194] When the similarity is lower than the second threshold, prompt information is output.

[0195] It should be noted that the text processing device provided in the embodiment of the present application includes the various units included, which can be implemented by a processor in an electronic device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Signal Processor) or a field programmable gate array (FPGA, Field-Programmable Gate Array), etc.

[0196] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0197] An embodiment of the present application provides an electronic device, Fig. 9 Schematic diagram of the structure of the electronic device according to the embodiment of the present application. Fig. 9 As shown, the device 900 includes: a processor 901, at least one communication bus 902, at least one external communication interface 904 and a memory 905. The communication bus 902 is configured to realize the connection and communication between these components. The device 900 may also include a user interface 903, which may include an API interface, and the external communication interface 904 may include a standard wired interface and a wireless interface.

[0198] The processor 901 is configured to execute a computer program stored in the memory to implement the following steps:

[0199] Performing tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; the first tense is the tense of the sentence;

[0200] Performing tense recognition on the subject of the text to be processed to obtain a second tense;

[0201] The second tense is compared with each first tense in the tense sequence to determine a target sentence in the text to be processed; the tense of the target sentence is a confusing tense.

[0202] Accordingly, an embodiment of the present application further provides a storage medium, namely, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned text processing method are implemented.

[0203] The description of the above electronic device, storage system and computer-readable storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the electronic device, storage system and computer-readable storage medium embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0204] In the embodiment of the present application, if the above-mentioned text processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0205] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0206] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0207] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0208] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0209] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0210] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0211] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0212] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A text processing method, the method comprising: Performing tense recognition on each sentence included in the text to be processed to obtain a tense sequence consisting of a first tense; The first tense is the tense of the sentence; Performing tense recognition on the subject of the text to be processed to obtain a second tense; determining a tense level of the second tense and a tense level of the first tense; According to the determined tense level, the second tense is compared with the first tense to determine the disordered tense in the tense sequence; wherein, when there is a tense to be adjusted with a tense level of level 2 between the first tense and the second tense, the tense level of the tense to be adjusted is adjusted to level 1; The sentence corresponding to the confusing tense is determined as the target sentence.

2. The method according to claim 1, wherein the tense recognition process is performed on each sentence included in the text to be processed to obtain a tense sequence consisting of the first tense, comprising: Segmenting the text to be processed to obtain a sentence set consisting of the sentences included in the text to be processed; Using each sentence in the sentence set as an input of a first tense discriminator, and obtaining a first tense corresponding to each sentence output by the first tense discriminator; The tense sequence is constructed based on the first tense corresponding to each sentence.

3. The method according to claim 1, further comprising: Using the sentence and the first tense corresponding to the sentence as inputs of a second tense discriminator, and obtaining the accuracy of the output of the second tense discriminator; When the accuracy rate is lower than the first threshold, the corresponding sentence is marked.

4. According to the method of claim 1, the subject of the text to be processed is subjected to tense recognition processing to obtain the second tense, comprising: The subject is used as an input of a third tense discriminator to obtain a second tense output by the third tense discriminator.

5. The method according to claim 1, wherein the step of comparing the second tense with the first tense according to the determined tense level to determine the disordered tense in the tense sequence comprises: When the second tense and the first tense both belong to the first tense, comparing the second tense with each first tense in the tense sequence; A first tense in the tense sequence that is different from the second tense is determined as the chaotic tense.

6. The method according to claim 1, wherein the step of comparing the second tense with the first tense according to the determined tense level to determine the disordered tense in the tense sequence comprises: In the case where both the second tense and the first tense belong to the second tense, adjusting the tense level of the second tense to the first tense, and adjusting the tense level of each first tense in the tense sequence to the first tense; comparing the second tense with the first tense; A first tense in the tense sequence that is different from the second tense is determined as the chaotic tense.

7. The method according to claim 1, wherein the step of comparing the second tense with the first tense according to the determined tense level to determine the disordered tense in the tense sequence comprises: When the second tense belongs to the first tense and the first tense belongs to the second tense, adjusting the tense level of each first tense in the tense sequence to the first tense; comparing the second tense with each first tense in the tense sequence; A first tense in the tense sequence that is different from the second tense is determined as the chaotic tense.

8. The method according to claim 1, further comprising: Acquire a tense sequence of a reference text associated with the text to be processed to obtain a standard tense sequence; the subject of the reference text is the same as the subject of the text to be processed; Determining the similarity between the standard tense sequence and the tense sequence; When the similarity is lower than the second threshold, prompt information is output.

9. An electronic device, comprising: A processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps of the text processing method according to any one of claims 1 to 8 when running the computer program.