Punctuation judgment method and device, electronic equipment and storage medium
By identifying and recombining text feature sequences, and using a bidirectional long short-term memory network and a discriminator to determine the rationality of punctuation marks, the problem of inaccurate punctuation mark judgment in intelligent correction technology is solved, thereby improving the level of language expression and the judgment effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CENTURY TAL EDUCATION TECH CO LTD
- Filing Date
- 2022-08-19
- Publication Date
- 2026-05-29
Smart Images

Figure CN115376133B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text recognition technology, and in particular to a method, apparatus, electronic device, and storage medium for punctuation mark identification. Background Technology
[0002] Punctuation marks are an important part of text. The same sequence of words can have vastly different meanings depending on the punctuation marks used. Therefore, the use of punctuation marks is an important aspect of improving language expression skills.
[0003] With the popularization and application of artificial intelligence technology, intelligent education can improve students' learning efficiency and enable teachers to intelligently grade tests or assignments, allowing them to focus more on improving teaching quality. However, current intelligent grading technology cannot effectively judge the appropriateness of punctuation usage in text.
[0004] In view of this, there is an urgent need for a processing method that can intelligently detect the appropriateness of the use of punctuation marks in text. Summary of the Invention
[0005] In view of the above, embodiments of this disclosure provide a punctuation mark determination method, apparatus, electronic device, and storage medium to at least partially solve the above problems.
[0006] According to one aspect of this disclosure, a punctuation mark determination method is provided, comprising: identifying text information, label information, punctuation mark information, and sentence type information of a target sentence to obtain a target feature sequence of the target sentence; recombining the character features in the target feature sequence to obtain label recombination features and punctuation mark recombination features of the target feature sequence; and performing a determination on the label information and punctuation mark information of the target sentence based on the label recombination features and the punctuation mark recombination features to obtain a punctuation mark determination result of the target sentence.
[0007] According to a second aspect of this disclosure, a punctuation mark determination device is provided, comprising: a fusion module for recognizing text information, label information, punctuation information, and sentence type information of a target sentence to obtain a target feature sequence of the target sentence; a recombination module for recombinating the character features in the target feature sequence to obtain label recombination features and punctuation recombination features of the target feature sequence; and a determination module for performing determination on the label information and punctuation information of the target sentence based on the label recombination features and the punctuation recombination features to obtain a punctuation mark determination result of the target sentence.
[0008] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to perform the punctuation mark determination method described in the first aspect above.
[0009] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the punctuation mark determination method as described in the first aspect.
[0010] The punctuation judgment schemes provided in this disclosure identify textual information, punctuation information, point information, and sentence type information of the target sentence. Based on multiple dimensions, they judge the rationality of the use of each punctuation mark in the text, so as to guide users to use punctuation marks correctly and improve users' language expression ability. Attached Figure Description
[0011] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0012] Figure 1 This is a flowchart illustrating a punctuation mark determination method as an exemplary embodiment of the present disclosure.
[0013] Figure 2 This is a flowchart illustrating a punctuation mark determination method as another exemplary embodiment of this disclosure.
[0014] Figure 3 This is a flowchart illustrating a punctuation mark determination method as another exemplary embodiment of this disclosure.
[0015] Figure 4 This is a flowchart illustrating a punctuation mark determination method as another exemplary embodiment of this disclosure.
[0016] Figure 5 This is a schematic diagram of the architecture of a punctuation mark determination device, which is an exemplary embodiment of the present disclosure.
[0017] Figure 6 This is a schematic diagram of the architecture of an electronic device that is an exemplary embodiment of this disclosure. Detailed Implementation
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0020] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative and not restrictive. Those skilled in the art should understand that, unless explicitly stated in the context, they should be understood as "one or more". The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0022] With the development of artificial intelligence technology, there are a large number of application scenarios for OCR (Optical Character Recognition) and ASR (Automatic Speech Recognition). Among them, the OCR processing process itself introduces recognition errors, and the output of ASR is plain text without punctuation marks. Therefore, punctuation correction is a technical problem that cannot be solved in these two scenarios at present.
[0023] In existing technologies, probabilistic models (such as N-gram models and conditional random field models) are mainly used to solve the problem of automatically adding punctuation marks in text. However, these methods all require manual feature design and are highly dependent on prior knowledge, which limits the practical application of the models. Furthermore, these models cannot correct erroneous punctuation marks in text.
[0024] Given that existing technical solutions only automatically add punctuation to text data without punctuation and cannot correct punctuation errors for text with added punctuation, this disclosure proposes a tag symbol judgment and processing technology that can judge the reasonableness of the use of punctuation marks in text in order to guide users to use punctuation marks correctly.
[0025] It should be noted that the punctuation marks referred to in this disclosure can be divided into two parts: punctuation marks and period marks.
[0026] "Labels" can include parentheses, dashes, book titles, ellipses, quotation marks, proper noun marks, emphasis marks, interpuncts, hyphens, etc., and are mainly used to indicate the nature and function of words or sentences.
[0027] Punctuation marks can include commas, semicolons, periods, colons, exclamation marks, etc.
[0028] It should be noted that question marks and exclamation marks are both punctuation marks and punctuation marks. Specifically, when used to indicate a pause at the end of a sentence, question marks and exclamation marks are punctuation marks, while when used to indicate the tone of a sentence, question marks and exclamation marks are punctuation marks.
[0029] The embodiments of this disclosure are described in detail below with reference to the accompanying drawings.
[0030] Figure 1 This is a flowchart illustrating a punctuation mark determination method as an exemplary embodiment of the present disclosure. As shown in the figure, this embodiment mainly includes the following steps:
[0031] Step S102: Identify the text information, punctuation information, and sentence type information of the target sentence to obtain the target feature sequence of the target sentence.
[0032] Optionally, each original sentence in the text to be detected can be subjected to error filtering and / or sentence transformation processing to obtain each target sentence in the text to be detected.
[0033] Example 1
[0034] Based on the punctuation recognition results of each original sentence in the text to be detected and the given symbol usage rules, the system can filter out each target sentence that meets the symbol usage rules from each original sentence.
[0035] Optionally, the given rules for using symbols may include rules for punctuation and rules for labeling.
[0036] Specifically, the position of each punctuation mark in the original sentence can be detected according to the given punctuation rules. When a punctuation mark that should be at the end of the sentence (e.g., period ".", question mark "?", exclamation mark "!", etc.) is detected at the beginning of the sentence, the original sentence containing this punctuation mark is removed from the text to be detected.
[0037] Specifically, the position of each punctuation mark in the original sentence can be detected according to the given punctuation rules. When a case of consecutive punctuation marks is detected in the original sentence, the original sentence can be removed from the text to be detected according to the basic rule that punctuation marks cannot be consecutive.
[0038] Specifically, according to the given labeling rules, each pair of labels used in pairs in the original statement can be detected. If the original statement contains unpaired labels (for example, the original statement contains only one quotation mark, parenthesis, book title mark, etc.), or if the original statement contains disordered nesting of paired labels (for example, "''", """, etc.), the original statement can be removed from the text to be detected.
[0039] Example 2
[0040] Based on the punctuation recognition results of each original sentence in the text to be detected and the given symbol conversion rules, the system can perform conversion processing on each original sentence to obtain the corresponding target sentences.
[0041] Optionally, the transformation processing performed on each original statement may include, but is not limited to, one of the following: character substitution processing, character deletion processing, and statement splitting processing.
[0042] For example, character replacement can be performed on the book title marks and the character information within them in the original statement according to the given symbol conversion rules.
[0043] Specifically, since book title marks and the character information within them have almost no impact on the use of external punctuation, on the contrary, if there are modal particles in the book title or thesis title, it may mislead the use of external punctuation. Therefore, this disclosure improves the accuracy of punctuation recognition results by treating book title marks and the character information within them as a whole and replacing them with a specified replacement character (e.g., #).
[0044] For example:
[0045] Original sentence: I first encountered the article "My Hometown" when I was in the sixth grade of elementary school.
[0046] Target sentence: I first encountered this article when I was in the sixth grade of elementary school.
[0047] For example, according to a given symbol conversion rule, a label that occupies two characters in the original statement can be replaced with a label that occupies one character.
[0048] Specifically, since each label or punctuation mark is processed as a single character in the subsequent discrimination process, the accuracy of the punctuation mark discrimination results can be improved by replacing the label that occupies two characters with a single character.
[0049] For example, the two-character ellipsis “…” can be replaced with a one-character ellipsis “…”.
[0050] For example, the two-character dash "——" can be replaced with the one-character dash "—".
[0051] For example, the length of characters in parentheses of the original statement can be identified according to the given symbol conversion rules, and the original statement can be converted according to the identification result (conversion processing includes, but is not limited to, deletion processing and splitting processing).
[0052] Specifically, since the characters in parentheses are mainly comments and do not affect the use of other punctuation marks in the whole sentence, the characters in parentheses can be deleted or treated as a single sentence to improve the accuracy of punctuation mark recognition results.
[0053] In this embodiment, if the length of the characters in the parentheses is less than a given first length threshold, the parentheses and the character information (including text and / or punctuation marks) in the parentheses are deleted.
[0054] For example:
[0055] Original text: The Great Wall of Zhao started in Dai (now Xuanhua, Hebei) in the east, passed through northern Shanxi, turned northwest into Yinshan, and ended at Gaoque (the gap between Wula Mountain and Langshan Mountain).
[0056] Target statement: The Great Wall of Zhao starts in Dai in the east, passes through northern Shanxi, turns northwest into Yinshan, and ends at Gaoque.
[0057] In this embodiment, if the length of the characters in the parentheses is not less than a given first length threshold, the character information in the parentheses is split from the original statement to generate multiple target statements.
[0058] For example:
[0059] Original sentence: He cultivated many fragrant flowers and fed and trained many small animals. (He later even cared for a young tiger cub in the zoo who had no mother, feeding it milk spoonful by spoonful every day.)
[0060] Target statement 1: He cultivated many fragrant flowers and fed and trained many small animals.
[0061] Target statement 2: He later also took care of a baby tiger in the zoo that had no mother tiger, feeding it milk spoonful by spoonful every day.
[0062] For example, the character length in the quotation marks of the original statement can be identified according to the given symbol conversion rules, and the original statement can be converted (conversion processing includes, but is not limited to, splitting processing) according to the identification result.
[0063] In this embodiment, if the length of the characters within the quotation marks is not less than a given second length threshold, multiple target statements are generated based on the character information (including text and punctuation marks) within the quotation marks and the original statement. An example is given below:
[0064] Original quote: Mr. Li taught his students: "We must adopt a realistic attitude, know what we know, and admit what we don't know. We should not pretend to know what we don't know."
[0065] Target statement 1: Mr. Li taught his students: "We must adopt a realistic attitude, know what we know, and admit what we don't know, and not pretend to know what we don't know."
[0066] Target statement 2: We must adopt a realistic attitude, admitting what we know and what we don't know, and not pretending to know what we don't know.
[0067] Example 3
[0068] Based on the punctuation recognition results of each original sentence in the text to be detected and the given symbol usage rules, the system can determine each sentence to be detected that meets the symbol usage rules in each original sentence, and perform conversion processing on each sentence to be detected based on the punctuation recognition results of each sentence to be detected and the given symbol conversion rules to obtain each target sentence corresponding to each sentence to be detected.
[0069] For the specific acquisition scheme of the statement to be detected and the target statement in this embodiment 3, please refer to the relevant descriptions of embodiments 1 and 2 above, which will not be repeated here.
[0070] Optionally, the text information, label information, and punctuation information of the target statement can be added and fused to obtain the fused feature sequence of the target statement, and the sentence class information of the target statement can be concatenated with the fused feature sequence to obtain the target feature sequence of the target statement.
[0071] Step S104: Reconstruct the character features in the target feature sequence to obtain the label reconstruction features and dot reconstruction features of the target feature sequence.
[0072] Alternatively, an encoder can be used to extract the character features from the target feature sequence.
[0073] Optionally, a bidirectional long short-term memory network (Bi-LSTM) can be used to recombine the features of each character in the target feature sequence to obtain the label recombination features and dot recombination features of the target feature sequence.
[0074] Step S106: Based on the label recombination feature and the punctuation recombination feature, perform a judgment on the label information and punctuation information of the target statement to obtain the punctuation judgment result of the target statement.
[0075] Optionally, a label discriminator can be used to perform a reasonableness judgment on each label in the target statement based on the label recombination characteristics, and obtain the label judgment result for each label in the target statement.
[0076] Specifically, the label discriminator can perform prediction on the label position corresponding to each label in the target statement based on the label recombination features, obtain the predicted label for each label position, and perform a reasonableness judgment on each label in the target statement based on the predicted label for each label position, thereby obtaining the label judgment result for each label in the target statement.
[0077] Optionally, a punctuation discriminator can be used to perform a reasonableness judgment on each punctuation in the target sentence based on the punctuation recombination characteristics, and obtain the punctuation discrimination result for each punctuation in the target sentence.
[0078] Specifically, the dot discriminator can predict the position of each dot in the target sentence based on the dot recombination features, obtain the predicted dot for each dot position, and perform a reasonableness judgment on each dot in the target sentence based on the predicted dot for each dot position, thereby obtaining the dot discrimination result for each dot in the target sentence.
[0079] In summary, the punctuation mark judgment method of this embodiment, by integrating and recombining the text information, punctuation information, point information, and sentence type information of the target sentence, performs judgment on the punctuation marks in the target sentence based on multiple feature dimensions, and can provide highly accurate punctuation mark judgment results to guide users to use punctuation marks correctly and improve their language expression level.
[0080] The punctuation mark judgment method provided in this embodiment can filter out target sentences that meet the punctuation mark usage rules from the original sentences of the text to be detected by using given punctuation mark usage rules, and remove original sentences with obviously non-compliant punctuation mark usage. By using this text preprocessing method, the amount of punctuation mark judgment processing can be effectively reduced and the punctuation mark judgment processing effect can be improved.
[0081] The punctuation mark recognition method provided in this embodiment can convert long sentences and complex sentences in the text to be detected into simple sentences by using given symbol conversion rules, so as to avoid interference with punctuation mark recognition and processing and improve the accuracy of punctuation mark recognition and processing.
[0082] Figure 2 A flowchart illustrating a punctuation mark determination method according to another exemplary embodiment of this disclosure is shown. This embodiment is a specific implementation of step S102 described above. As shown in the figure, this embodiment mainly includes the following steps:
[0083] Step S202: Obtain the character feature sequence of the target statement according to each character recognized from the target statement and each character position corresponding to each character, obtain the label feature sequence of the target statement according to each label recognized from the target statement and each label position corresponding to each label, and obtain the punctuation feature sequence of the target statement according to each punctuation mark recognized from the target statement and each punctuation mark position corresponding to each punctuation mark.
[0084] In this embodiment, the character feature sequence, label feature sequence, and full stop feature sequence of the target statement have the same sequence length.
[0085] Optionally, the character feature sequence of the target statement can be generated according to each character recognized from the target statement and the character position of each character.
[0086] Optionally, according to each label recognized from the target statement, the label position of each label, and the character feature sequence of the target statement, character replacement processing can be performed on each label in the target statement to generate the label feature sequence of the target statement.
[0087] Specifically, any one label or any group of consecutive multiple labels recognized from the target statement can be determined as the current unit label. According to the current position of the current unit label in the target statement, one preceding character located at the position before the current unit label is determined from the characters of the target statement, and the character corresponding to the preceding character in the character feature sequence is replaced with the current unit label, so as to obtain the label feature sequence having the same feature length as the text feature sequence.
[0088] It should be noted that since there may be multiple consecutive labels in the target statement (for example, "A Dream of Red Mansions"), in view of this, the present disclosure adds parentheses (such as square brackets) to each occupied character in the label feature sequence, so that multiple consecutive labels only occupy one character position in the label feature sequence.
[0089] For example, convert the "“《” in "A Dream of Red Mansions" into a character [“《], and convert the "》”" into a character [》”], so as to ensure that the text feature sequence and label feature sequence of the target statement have the same sequence length.
[0090] In this embodiment, in the case where there are multiple consecutive labels in the same character position, a label vector of dimension H2 can be set for each label, and a new character vector of dimension H2 corresponding to the character position can be obtained by performing summation processing on the label vectors at the same character position.
[0091] Optionally, character replacement processing can be performed for each period in the target statement according to each period recognized from the target statement, the position of each period, and the character feature sequence of the target statement, to generate a period feature sequence having the same sequence length as the text feature sequence.
[0092] Specifically, any period recognized from the target statement can be determined as the current period. According to the current position of the current period in the target statement, a preceding character located at the previous position of the current period is determined from each character in the target statement, and the character corresponding to the preceding character in the text feature sequence is replaced with the current period, so as to obtain a period feature sequence having the same feature length as the text feature sequence.
[0093] Exemplary descriptions of the text feature sequence, label feature sequence, and period feature sequence of the target statement are as follows:
[0094] The target statement is: Mom asked, "Xiaogang, is it raining outside?"
[0095] The text feature sequence is: [[CLS], mom, mom, asked, xiao, gang, out, side, is, it, rain, ing, [SEP]]
[0096] The label feature sequence is: [[0], [0], [0], ["], [0], [0], [0], [0], [0], [0], [""], [0]]
[0097] The period feature sequence is: [0, 0, 0, :, 0, ,, 0, 0, 0, 0, ?, 0]
[0098] In the above text feature sequence, [CLS] and [SEP] are ending placeholders.
[0099] In this embodiment, the text feature sequence can be, for example, a tensor of L×H1, where L represents the sequence length of the text feature sequence (i.e., the number of characters in the target statement plus two placeholders), and H1 is the character feature dimension of each character in the text feature sequence.
[0100] In the above label feature sequence, the two characters "0" at the first and last positions respectively correspond to the two placeholders "[CLS]" and "[SEP]" in the text feature sequence. Among them, the label "" replaces the character corresponding to the preceding character "asked" in the text feature sequence; the period ,, replaces the character corresponding to the preceding character "gang" in the text feature sequence; the period "" replaces the character corresponding to the preceding character "ing" in the text feature sequence. In this embodiment, the label feature sequence can be, for example, a tensor of L×H2, where L represents the sequence length of the label feature sequence (the same as the sequence length of the text feature sequence), and H2 is the character feature dimension of each character in the period feature sequence.
[0101] In the above dot feature sequence, the two characters "0" at the first and last positions respectively correspond to the two placeholders "[CLS]" and "[SEP]" in the text feature sequence. Among them, the colon ":" replaces the character corresponding to the previous text "问" in the literal feature sequence; the comma "," replaces the character corresponding to the previous text "刚" in the literal feature sequence; the question mark "?" replaces the character corresponding to the previous text "了" in the literal feature sequence. In this embodiment, the dot feature sequence can be, for example, a tensor of L×H3, where L represents the sequence length of the dot feature sequence (the same as the sequence length of the literal feature sequence), and H3 is the character feature dimension of each character in the dot feature sequence.
[0102] In this embodiment, the character feature dimensions H1, H2, and H3 can be set to the same feature dimension.
[0103] Step S204, obtain the sentence class feature of the target sentence according to the sentence class information of the target sentence.
[0104] Optionally, an embedding encoding can be performed on the target sentence to obtain an embedding vector of the target sentence, feature extraction can be performed on the embedding vector to obtain the embedding feature of the embedding vector, and sentence class prediction can be performed on the target sentence according to the embedding feature to obtain the sentence class information of the target sentence.
[0105] Specifically, word embedding encoding can be performed on the target sentence to obtain a word embedding vector of the target sentence, and a feature extraction model can be used to perform feature extraction on the word embedding vector to obtain the word embedding feature of the word embedding vector. Then, a sentence class classifier can be used to perform sentence class prediction on the target sentence according to the word embedding feature to obtain the sentence class information of the target sentence.
[0106] Optionally, the feature extraction model can include but is not limited to: CNN (Convolutional Neural Networks) model, LSTM (Long Short-Term Memory) model, BERT (Bidirectional Encoder Representation from Transformers) model, etc.
[0107] Optionally, the sentence class classifier can at least include a fully connected layer and a softmax layer, which are used to perform sentence class prediction according to a given plurality of sentence class categories and the embedding feature of the target sentence, and determine the sentence class category corresponding to the maximum probability value as the sentence class information of the target sentence.
[0108] Optionally, the given sentence class categories can include but are not limited to: interrogative sentence, imperative sentence, declarative sentence, exclamatory sentence.
[0109] It should be noted that the classification of sentence categories is not limited to the above four categories. It can be adjusted according to the actual detection accuracy requirements. For example, interrogative sentences can be further divided into general interrogative sentences, rhetorical questions, and so on.
[0110] In this embodiment, the character length in the quotation marks of the target statement can be identified according to the given quotation mark conversion rules. If the character length in the quotation marks is greater than the given third length threshold, at least one character to be replaced in the quotation marks is determined, and the determined at least one character to be replaced is converted into a specified character.
[0111] Specifically, based on all character information contained in the quotation marks of the target statement and the given reserved character threshold, the leading and trailing reserved characters that meet the reserved character threshold in all character information can be determined, and at least one character to be replaced in the target statement located between the leading and trailing reserved characters can be determined, thereby performing the replacement process of the specified character.
[0112] For example, with the character retention threshold set to 5 and the specified character set to $, the conversion process for the target statement is as follows:
[0113] Target statement: Mr. Li taught his students, "We must always adopt a realistic attitude, admit what we know and what we don't know, and never pretend to know what we don't know."
[0114] The transformed target statement: Li Lao taught his students, "One must always adopt a practical approach to knowledge."
[0115] Step S206: Obtain the target feature sequence based on the text feature sequence, punctuation feature sequence, period feature sequence, and sentence type feature of the target sentence.
[0116] Optionally, the text feature sequence, punctuation feature sequence, and period feature sequence of the target sentence can be fused to obtain the fused feature sequence of the target sentence, and the fused feature sequence of the target sentence and sentence class features can be concatenated to obtain the target feature sequence.
[0117] Specifically, based on the character positions corresponding to each character feature in the text feature sequence (T), label feature sequence (D), and period feature sequence (B), the features of each character with the same character position can be added together to obtain the fused feature sequence (T+D+B). Then, the sentence category feature (C) is concatenated with the fused feature sequence (T+D+B) to obtain the target feature sequence (S=[C,T+D+B]).
[0118] In summary, the punctuation mark judgment method provided in this embodiment converts the text information, label information, punctuation mark information, and sentence type information of the target sentence into text feature sequences, label special case sequences, and punctuation mark feature sequences with the same sequence length, so as to facilitate the fusion processing of feature sequences and perform punctuation mark prediction and judgment based on multiple feature dimensions, thereby improving the accuracy of the judgment results.
[0119] Furthermore, the punctuation mark judgment method provided in this embodiment can effectively improve the accuracy of punctuation mark judgment results by introducing sentence category information.
[0120] Specifically, different contexts have a significant impact on punctuation marking. For example, "Xiaogang, it's raining outside." and "Xiaogang, it's raining outside?" are both correct from the perspective of punctuation usage, but they differ greatly in meaning. Therefore, this embodiment further integrates the sentence type information, text information, punctuation information, and mark information of the target sentence to perform punctuation judgment processing based on four dimensions of feature information. This not only further improves the objectivity of the judgment results but also meets the punctuation marking needs of different contexts.
[0121] Furthermore, the punctuation mark judgment method provided in this embodiment improves the accuracy of sentence category prediction results by performing conversion processing on the content within the quotation marks of the target sentence before performing sentence category information prediction.
[0122] Figure 3 A flowchart illustrating a punctuation mark determination method according to another exemplary embodiment of this disclosure is shown. As shown, this embodiment mainly illustrates a specific implementation of step S104 described above. As shown, this embodiment mainly includes the following steps:
[0123] Step S302: Extract features from each character in the target feature sequence to obtain the features of each character in the target feature sequence.
[0124] Optionally, an encoder can be used to extract features from each character in the target feature sequence to obtain the character features corresponding to each character. The extracted character features incorporate contextual information, punctuation information, sentence type information, and other relevant information, which can help improve the accuracy of punctuation mark identification.
[0125] Optionally, the encoder may include a BERT (Bidirectional Encoder Representations from Transformer) model. However, this is not a limitation; any deep learning model capable of sequence feature extraction may be applicable to this disclosure.
[0126] In this embodiment, the extraction process of each character feature is as shown in Formula 1 below:
[0127] F = M(S) (Formula 1)
[0128] In Formula 1 above, S represents the target feature sequence, F represents each character feature, and M represents the information extraction process of the encoder.
[0129] In this disclosure, the target feature sequence focuses more on displaying the overall sentence features of the target sentence, while the character features focus more on displaying the features of individual characters in the target sentence.
[0130] Step S304: Using the first bidirectional LSTM model, feature recombination is performed based on the features of each character to obtain the label recombination features.
[0131] In this embodiment, the recombination process of the label recombination feature is as shown in Formula 2 below:
[0132] F1=LSTM1(F) (Formula 2)
[0133] In Formula 2 above, F represents the character features, F1 represents the label recombination features, and LSTM1 represents the first bidirectional long short-term memory model.
[0134] Step S306: Using the second bidirectional long short-term memory model, feature recombination is performed based on the character features and label recombination features of the target feature sequence to obtain the dot recombination features.
[0135] In this embodiment, the recombination process of the dot recombination feature is as shown in Formula 3 below:
[0136] F2 = LSTM2(F + F1) (Formula 3)
[0137] In Formula 3 above, F represents the character features, F1 represents the label recombination feature, F2 represents the dot recombination feature, and LSTM2 represents the second bidirectional long short-term memory model.
[0138] In summary, the punctuation mark judgment method of this embodiment utilizes the characteristic that the bidirectional LSTM model is more sensitive to sequence order, and recombines the character features in the target feature sequence to obtain the punctuation mark recombination features and the period recombination features respectively, which can effectively improve the accuracy of the punctuation mark judgment results.
[0139] Furthermore, since label information can play a positive role in the determination of point numbers, the accuracy of point number determination results can be further improved by introducing label recombination features during the point number feature recombination process.
[0140] Figure 4A flowchart illustrating a punctuation mark determination method according to another exemplary embodiment of this disclosure is shown. This embodiment is a specific implementation of step S106 described above. As shown in the figure, this embodiment mainly includes the following steps:
[0141] Step S402: Using the label discriminator, based on the label recombination features and the given label category, prediction is performed on each label position corresponding to each actual label in the target sentence to obtain each predicted label corresponding to each label position. The actual label and the predicted label at the same label position are compared to obtain the label discrimination result of the target sentence.
[0142] Optionally, the label discriminator includes at least a fully connected layer and a sigmoid layer; the sigmoid function is also called... Logistic function , is used for the output of hidden layer neurons, and its value range is (0,1). It can map a real number to the interval (0,1) and can be used for binary classification.
[0143] This approach leverages the characteristic of the sigmoid layer to output probability values for each predicted category (e.g., each label category) to meet the need for determining if there are multiple consecutive labels in the target statement.
[0144] In this embodiment, the label discriminator is as shown in Formulas 4 and 5 below:
[0145] B out =sigmoid(FC1(F1)) (Formula 4)
[0146]
[0147] In Formula 4 above, F1 represents the label recombination feature, FC1 represents the fully connected layer of the label discriminator, sigmoid represents the sigmoid layer of the label discriminator, and B... out This indicates the label judgment result output by the label discriminator.
[0148] In Formula 5 above, x represents the output of the fully connected layer of the label discriminator.
[0149] In this embodiment, the given label category may include 15 categories.
[0150] Specifically, commonly used punctuation marks include single quotation marks, double quotation marks, parentheses, dashes, ellipses, hyphens, separators, book title marks, and single book title marks (where curly braces, square brackets, proper noun marks, and separators are not restricted). Paired punctuation marks include 5 categories, for a total of 14 categories. An additional empty punctuation mark category is added to indicate cases where no punctuation mark is needed at a certain position.
[0151] It should be noted that the numbering categories are not limited to the 15 categories described in the above embodiments. Those skilled in the art can add or subtract them arbitrarily according to actual testing needs, and this disclosure does not impose any restrictions on this.
[0152] In this embodiment, the label discriminator can output the probability score of each label position in the target statement corresponding to each label category based on the label recombination features and each label category (for example, outputting 15 probability scores for 15 label categories). The sigmoid layer is used to perform normalization processing on each probability score corresponding to each label category.
[0153] Optionally, for any current label position among all label positions, one or more label categories with the highest probability scores can be determined as the predicted label for the current label position based on the probability scores of each label category corresponding to the current label position.
[0154] Optionally, for any current label position among all label positions, one or more label categories with probability scores greater than the score threshold can be determined as the predicted label for the current label position based on the probability scores of each label category corresponding to the current label position.
[0155] Step S404: Using the dot discriminator, based on the dot recombination features and the given dot category, predict the positions of each actual dot in the target sentence to obtain the predicted dot positions. Then, compare the actual dot positions with the predicted dot positions to obtain the dot discrimination results of the target sentence.
[0156] Optionally, the dot discriminator includes at least a fully connected layer and a softmax layer. The softmax logistic regression model is a generalization of the logistic regression model to multi-class classification problems, in which the class label y can take more than two values.
[0157] This approach utilizes a softmax layer that outputs only one predicted category (e.g., the period category) corresponding to the highest probability value, in order to meet the requirement that only one period should appear after a character in the target sentence.
[0158] In this embodiment, the dot number discriminator is as shown in formulas 6 and 7 below:
[0159] D out =softmax(FC2(F2)) (Formula 6)
[0160]
[0161] In Formula 6 above, F2 represents the dot recombination feature, FC2 represents the fully connected layer of the dot discriminator, softmax represents the softmax layer of the label discriminator, and D... outThis indicates the dot number determination result output by the dot number discriminator.
[0162] In formula 7 above, C represents the probability score of the i-th dot category output by the fully connected layer (FC2) of the dot discriminator, and C represents the number of all dot categories.
[0163] The softmax function formula in Formula 7 ensures that the sum of the probability scores for all point categories equals 1.
[0164] In this embodiment, the given dot number category may include 8 categories.
[0165] Specifically, commonly used punctuation marks include sentence-ending punctuation marks and sentence-internal punctuation marks. Sentence-ending punctuation marks further include: period, question mark, and exclamation mark. Sentence-internal punctuation marks further include: comma, pause mark, semicolon, and colon, totaling 7 categories. An additional empty punctuation mark category is added to indicate that no punctuation mark is needed at a certain punctuation mark position.
[0166] It should be noted that the dot type is not limited to the eight types described in the above embodiments. Those skilled in the art can add or subtract them arbitrarily according to actual testing needs, and this disclosure does not impose any restrictions on this.
[0167] In this embodiment, the dot discriminator can predict the probability scores of each dot position in the target statement corresponding to each dot category based on the dot recombination features and each dot category. For any current dot position, the dot category with the highest probability score is determined as the predicted dot position of the current dot position based on the probability scores of each dot category corresponding to the current dot position.
[0168] Step S406: Determine whether there are any unreasonable labels and / or unreasonable periods in the target statement. If yes, proceed to step S408; otherwise, exit the process.
[0169] Optionally, for any current label position among all label positions, the actual label at the current label position can be compared with the predicted label. If the comparison result is that the two do not match, it is determined that the actual label at the current label position is unreasonable, and the judgment result that there is an unreasonable label in the target statement is obtained.
[0170] Optionally, for any current point position among all point positions, the actual point number at the current point position can be compared with the predicted point number. If the comparison result is that the two do not match, it is determined that the actual point number at the current point position is unreasonable, and the judgment result that there is an unreasonable point number in the target statement is obtained.
[0171] Step S408: Output recommended labels for unreasonable labels and / or output recommended point numbers for unreasonable point numbers.
[0172] Specifically, if the judgment result is that there is an unreasonable label in the target statement, the predicted label corresponding to the unreasonable label position (refer to step S402) is output as the recommended label according to the unreasonable label position.
[0173] Specifically, if the judgment result is that there are unreasonable point numbers in the target statement, the predicted point number corresponding to the unreasonable point number (refer to step S404) is output as the recommended point number according to the position of the unreasonable point number.
[0174] In summary, the punctuation mark judgment method provided in this embodiment performs predictions on the punctuation marks and punctuation marks in the target sentence based on the punctuation mark recombination features and the punctuation mark recombination features respectively, and can obtain punctuation mark judgment results with high accuracy.
[0175] Furthermore, a label discriminator containing a sigmoid layer is used to perform label judgment on the target statement to accommodate the judgment requirement that there may be multiple consecutive labels in the target statement. A punctuation discriminator containing a softmax layer is used to perform punctuation judgment on the target statement to accommodate the judgment requirement that only one punctuation mark will appear after a character in the target statement, thereby further improving the rationality of the punctuation judgment results.
[0176] Figure 5 A schematic diagram of the architecture of a punctuation mark determination device according to an exemplary embodiment of the present disclosure is shown. As shown in the figure, the punctuation mark determination device 500 of this embodiment includes: a fusion module 502, a recombination module 504, and a determination module 506.
[0177] The fusion module 502 is used to identify the text information, label information, punctuation information, and sentence type information of the target sentence to obtain the target feature sequence of the target sentence.
[0178] The recombination module 504 is used to recombine the character features in the target feature sequence to obtain the label recombination feature and the dot recombination feature of the target feature sequence.
[0179] The judgment module 506 is used to perform judgment on the label information and punctuation information of the target statement based on the label recombination feature and the punctuation recombination feature, and obtain the punctuation judgment result of the target statement.
[0180] Optionally, the punctuation mark determination device 500 further includes an acquisition module (not shown), used to filter each target sentence in each original sentence that satisfies the symbol usage rules according to the punctuation mark recognition results of each original sentence in the text to be detected and the given symbol usage rules; and / or to perform conversion processing on each original sentence according to the punctuation mark recognition results of each original sentence in the text to be detected and the given symbol conversion rules, so as to obtain each target sentence corresponding to each original sentence.
[0181] Optionally, the symbol usage rules include period rules and label rules; the conversion processing performed on each original statement includes at least one of: character substitution processing, character deletion processing, and statement splitting processing.
[0182] Optionally, the fusion module 502 is further configured to: obtain a text feature sequence of the target sentence based on each character identified from the target sentence and the corresponding character positions; obtain a label feature sequence of the target sentence based on each label identified from the target sentence and the corresponding label positions; obtain a punctuation feature sequence of the target sentence based on each punctuation mark identified from the target sentence and the corresponding punctuation mark positions; obtain a sentence type feature of the target sentence based on the sentence type information of the target sentence; and obtain the target feature sequence based on the text feature sequence, label feature sequence, period feature sequence, and sentence type feature of the target sentence.
[0183] Optionally, the text feature sequence, label feature sequence, and period feature sequence of the target statement have the same sequence length.
[0184] Optionally, the fusion module 502 is further configured to: fuse the text feature sequence, punctuation feature sequence, and period feature sequence of the target sentence to obtain the fused feature sequence of the target sentence; and concatenate the fused feature sequence and sentence type features of the target sentence to obtain the target feature sequence.
[0185] Optionally, the acquisition module is further configured to: perform embedding encoding on the target statement to obtain the embedding vector of the target statement; perform feature extraction on the embedding vector to obtain the embedding features of the embedding vector; and perform sentence class prediction on the target statement based on the embedding features to obtain the sentence class information of the target statement.
[0186] Optionally, the recombination module 504 is further configured to: extract features from each character in the target feature sequence to obtain the character features of the target feature sequence; recombine features based on each character feature using a first bidirectional long short-term memory model to obtain the label recombination features; and recombine features based on each character feature of the target feature sequence and the label recombination features using a second bidirectional long short-term memory model to obtain the dot recombination features.
[0187] Optionally, the judgment module 506 is further configured to: use a label discriminator to predict the position of each actual label in the target statement based on the label recombination feature and the given label category, obtain the predicted label corresponding to each label position, and compare the actual label and the predicted label at the same label position to obtain the punctuation discrimination result of the target statement; use a punctuation discriminator to predict the position of each actual punctuation in the target statement based on the punctuation recombination feature and the given punctuation category, obtain the predicted punctuation corresponding to each punctuation position, and compare the actual punctuation and the predicted punctuation at the same punctuation position to obtain the punctuation discrimination result of the target statement.
[0188] Optionally, the label discriminator includes at least a fully connected layer and a sigmoid layer.
[0189] Optionally, the dot discriminator includes at least a fully connected layer and a softmax layer.
[0190] Optionally, the judgment module 506 is further configured to: if the punctuation judgment result of the target statement is that there are unreasonable punctuation marks and / or unreasonable period marks in the target statement, output the recommended punctuation marks and / or output the recommended period marks of the unreasonable period marks.
[0191] This disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to cause the computer to execute the punctuation mark determination method described in the exemplary embodiments of this disclosure.
[0192] An exemplary embodiment of this disclosure provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, causing the electronic device to perform a punctuation mark determination method according to an exemplary embodiment of this disclosure.
[0193] Please refer to Figure 6The present invention describes a structural block diagram of an electronic device 1300 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0194] like Figure 6 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0195] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, output unit 607, storage unit 608, and communication unit 609. Input unit 606 can be any type of device capable of inputting information to electronic device 600. Input unit 606 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 607 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 604 may include, but is not limited to, disk and optical disk. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0196] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above. For example, in some embodiments, the punctuation mark determination method described above can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. In some embodiments, the computing unit 601 can be configured to perform the punctuation mark determination method described above by any other suitable means (e.g., by means of firmware).
[0197] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0198] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0199] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0200] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0201] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0202] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0203] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this disclosure can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this disclosure.
[0204] The above embodiments are only used to illustrate the embodiments of this disclosure, and are not intended to limit the embodiments of this disclosure. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this disclosure. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this disclosure, and the patent protection scope of the embodiments of this disclosure should be defined by the claims.
Claims
1. A method for determining punctuation marks, characterized in that, include: The text information, punctuation information, period information, and sentence type information of the target sentence are identified to obtain the text feature sequence, punctuation feature sequence, period feature sequence, and sentence type features of the target sentence, wherein the text feature sequence, punctuation feature sequence, and period feature sequence of the target sentence have the same sequence length; the text feature sequence, punctuation feature sequence, and period feature sequence of the target sentence are fused to obtain the fused feature sequence of the target sentence; the fused feature sequence and sentence type features of the target sentence are concatenated to obtain the target feature sequence of the target sentence; Feature extraction is performed on each character in the target feature sequence to obtain the character features of the target feature sequence; using a first bidirectional long short-term memory model, feature recombination is performed based on each character feature to obtain the label recombination feature; using a second bidirectional long short-term memory model, feature recombination is performed based on each character feature of the target feature sequence and the label recombination feature to obtain the dot recombination feature; Based on the label recombination feature and the punctuation recombination feature, the label information and punctuation information of the target statement are judged to obtain the punctuation judgment result of the target statement.
2. The method according to claim 1, characterized in that, The target statement can be obtained in the following ways: Based on the punctuation recognition results of each original sentence in the text to be detected and the given symbol usage rules, select the target sentences in each original sentence that satisfy the symbol usage rules; and / or Based on the punctuation recognition results of each original sentence in the text to be detected and the given symbol conversion rules, the original sentences are converted to obtain the target sentences corresponding to each original sentence.
3. The method according to claim 2, characterized in that, The rules for using symbols include rules for punctuation marks and rules for labeling marks; The transformation process performed on each original statement includes at least one of the following: character substitution processing, character deletion processing, and statement splitting processing.
4. The method according to any one of claims 1 to 3, characterized in that, The process of identifying the text information, punctuation information, and sentence type information of the target sentence to obtain the target feature sequence of the target sentence includes: Based on each character identified from the target sentence and the position of each character, the text feature sequence of the target sentence is obtained; Based on each label identified from the target statement and the position of each label corresponding to each label, the label feature sequence of the target statement is obtained; Based on the point numbers identified from the target statement and the corresponding point number positions, the point number feature sequence of the target statement is obtained. Based on the sentence type information of the target sentence, obtain the sentence type features of the target sentence; The target feature sequence is obtained based on the text feature sequence, label feature sequence, punctuation feature sequence, and sentence type feature of the target statement.
5. The method according to claim 4, characterized in that, The sentence type information of the target statement can be obtained in the following ways: The target statement is subjected to embedding encoding to obtain the embedding vector of the target statement; Feature extraction is performed on the embedding vector to obtain the embedding features of the embedding vector; Based on the embedded features, sentence class prediction is performed on the target sentence to obtain the sentence class information of the target sentence.
6. The method according to claim 1, characterized in that, The step of performing a judgment on the label information and punctuation information of the target statement based on the label recombination feature and the punctuation recombination feature to obtain the punctuation judgment result of the target statement includes: Using a label discriminator, based on the label recombination features and the given label category, prediction is performed on each label position corresponding to each actual label in the target statement to obtain each predicted label corresponding to each label position. The actual label and the predicted label at the same label position are compared to obtain the label discrimination result of the target statement. Using a dot discriminator, based on the dot recombination features and the given dot category, prediction is performed on the positions of each actual dot in the target statement to obtain the predicted dot for each dot position. The actual dot and the predicted dot for the same dot position are then compared to obtain the dot discrimination result of the target statement.
7. The method according to claim 6, characterized in that, The label discriminator includes at least: a fully connected layer and a sigmoid layer; The dot discriminator includes at least a fully connected layer and a softmax layer.
8. The method according to claim 1 or 6, characterized in that, The method further includes: If the punctuation judgment result of the target statement indicates that there are unreasonable punctuation marks and / or unreasonable period marks in the target statement, the recommended punctuation marks and / or the recommended period marks for the unreasonable period marks are output.
9. A punctuation mark determination device, characterized in that, include: The fusion module is used to identify the text information, label information, punctuation information, and sentence type information of the target sentence, and obtain the text feature sequence, label feature sequence, punctuation feature sequence, and sentence type features of the target sentence, wherein the text feature sequence, label feature sequence, and punctuation feature sequence of the target sentence have the same sequence length; fuse the text feature sequence, label feature sequence, and punctuation feature sequence of the target sentence to obtain the fused feature sequence of the target sentence; and concatenate the fused feature sequence and sentence type features of the target sentence to obtain the target feature sequence of the target sentence. The recombination module is used to extract features from each character in the target feature sequence to obtain the character features of the target feature sequence; to recombine the features based on each character feature using a first bidirectional long short-term memory model to obtain the label recombination feature; and to recombine the features based on each character feature of the target feature sequence and the label recombination feature using a second bidirectional long short-term memory model to obtain the dot recombination feature. The judgment module is used to perform judgment on the label information and punctuation information of the target statement based on the label recombination feature and the punctuation recombination feature, and obtain the punctuation judgment result of the target statement.
10. An electronic device, comprising: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the punctuation mark determination method according to any one of claims 1-8.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-8.