Text analysis and editing method and system
By using a text analysis and editing system, which utilizes a text analyzer and editor for character analysis and paragraph segmentation, the problem of time-consuming character relationship determination in script editing is solved, thus improving the efficiency and quality of literary adaptation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING LINGBAN JISHI INTELLIGENT TECH CO LTD
- Filing Date
- 2023-03-24
- Publication Date
- 2026-04-24
AI Technical Summary
In the process of adapting literature into audiovisual media, script editors need to spend a lot of energy analyzing and determining the characters appearing in the plot segments and the correspondence between the characters and the text segments, resulting in low efficiency in text adaptation.
A text analysis and editing system is used to perform role analysis and paragraph segmentation using a text analyzer. Combined with pattern matching and machine learning models, the system generates role analysis results and paragraph relationships, which are then verified and adjusted using a text editor.
The human-machine collaborative work mode significantly saves editors' energy and improves the efficiency and quality of text adaptation.
Smart Images

Figure CN117172251B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text analysis and processing, and in particular to a text analysis and editing method and system. Background Technology
[0002] Currently, the trend of adapting literature into audiovisual media and film and television is intensifying. In the context of adapting existing written works (such as novels and essays), the final target form of adaptation is usually film, TV series, animation, comics, radio drama, stage play, musical, etc. The adaptation process is abstractly divided into two stages: the script editing stage and the performance stage.
[0003] In the script editing stage, the script editor adapts the text of the written work into a script. The script describes the relationship between the performers and the characters, as well as the relationship between the script content and the characters. The relationship between the script content and the performers can also be deduced from the script. In the performance stage, the performers act out the content of the script.
[0004] Given a set of known characters in a written work, such as a set of characters in a book, for a plot segment, such as a chapter in a book, the script editor needs to analyze and provide a subset of all characters appearing in that plot segment, such as a subset of characters appearing in that chapter in the set of characters in the book, and further determine the correspondence between characters and text segments. Therefore, this process of adapting a script requires a lot of effort from the editor, which greatly reduces the efficiency of text adaptation. Summary of the Invention
[0005] Based on this, and to address the technical problems in existing technologies, a text analysis and editing method is proposed, including:
[0006] Step 1: The text analysis and editing system acquires and analyzes the text to determine the set of local roles appearing in each text segment from the global role set of the text; the text analysis and editing system includes a text analyzer and a text editor;
[0007] Step 1.1: The text analyzer performs role analysis on the text and generates role analysis results, which include a local set of roles of the characters appearing in each text segment.
[0008] Step 1.2: The editor verifies the character analysis results in the text editor; the text editor includes a character editing interface and a script editing interface;
[0009] Step 2: The text analyzer analyzes and determines the corresponding relationships between characters and text fragments;
[0010] Step 2.1: The text analyzer divides the text into different paragraphs according to narration and dialogue, generating paragraph division results; the paragraph division results include narration paragraphs and dialogue paragraphs;
[0011] Step 2.2: The editor verifies the paragraph division results in the text editor through the script editing interface and adjusts any incorrect paragraph division results.
[0012] Step 2.3: The text analyzer analyzes and determines the corresponding relationships between dialogue paragraphs and text fragment characters;
[0013] Step 2.4: The editor verifies the correspondence between dialogue paragraphs and text fragment characters in the script editing interface of the text editor and adjusts any incorrect correspondences.
[0014] In one embodiment, the local role set includes a first role subset and a second role subset;
[0015] The text analyzer uses pattern matching to discover and obtain the characters that appear in each text segment and form a first character subset, which is a subset of the global character set;
[0016] Alternatively, the text analyzer uses named entity recognition methods to discover and obtain the characters appearing in each text fragment and form a second subset of characters;
[0017] The difference between the second subset of roles and the global set of roles is the difference between the first set of roles.
[0018] In one embodiment, the roles in the first subset of roles obtained by the text analyzer through role analysis include:
[0019] If a character from the first subset of characters actually appears in the current text fragment, the editor adds it to the first subset of characters in the text fragment through the character editing interface in the text editor;
[0020] If a character from the first subset of characters does not appear in the current text fragment, it indicates an error in the character analysis results. In this case, the editor can remove the character from the first subset of characters through the character editing interface in the text editor.
[0021] The roles in the first role difference set include: if a role in the first role difference set is a missing role in the global role set, the editor adds it to the global role set through the role editing interface, and at the same time adds it to the first role subset;
[0022] If a character in the first character difference set does not appear in the clip, it indicates an error in the character analysis results, and the editor chooses not to add it to the global character set.
[0023] In one embodiment, in step 2.1, the text analyzer uses a rule-based pattern matching method to separate narration and dialogue; wherein, the rule-based pattern matching method includes regular expressions;
[0024] For texts where it is difficult to separate narration and dialogue using rule-based pattern matching methods, the text analyzer uses a machine learning model to separate narration and dialogue.
[0025] In step 2.3, the text analyzer uses a rule-based pattern matching method to match the text patterns of the narration paragraphs in the context of the dialogue paragraphs, thereby identifying the text segment roles corresponding to the dialogue paragraphs; wherein, the rule-based pattern matching method includes regular expressions.
[0026] In one embodiment, the text analyzer uses a machine learning model to establish a correspondence between characters and dialogue content in dialogue segments, with narration content near the dialogue content serving as the context of that dialogue content.
[0027] For each dialogue segment, the text analyzer uses a machine learning model to obtain the probability of the dialogue segment corresponding to each character appearing in the text segment it belongs to, and judges the corresponding relationship between the dialogue segment and the character based on the obtained probability.
[0028] In one embodiment, when there are N dialogue segments and M characters, the text analyzer constructs a character probability matrix of dimension N×M, where M and N are both integers greater than 0; the text analyzer uses a dynamic programming algorithm to decode the character probability matrix to obtain the corresponding relationship between each dialogue segment and character in the text segment; wherein, the dynamic programming algorithm includes Viterbi decoding.
[0029] In addition, to address the technical problems in the existing technology, a text analysis and editing system is proposed, including a text analyzer and a text editor;
[0030] The text analysis and editing system acquires and analyzes the text to determine the set of local roles that appear in each text segment within the global role set of the text;
[0031] The text analyzer performs role analysis on the text and generates role analysis results, which include a local set of roles of the characters appearing in each text segment.
[0032] The editor verifies the character analysis results in a text editor; the text editor includes a character editing interface and a script editing interface.
[0033] The text analyzer divides the text into different paragraphs based on narration and dialogue, generating paragraph segmentation results; the paragraph segmentation results include narration paragraphs and dialogue paragraphs.
[0034] In this process, the editor verifies the paragraph division results through the script editing interface in the text editor and adjusts any incorrect paragraph division results.
[0035] Among them, the text analyzer analyzes and determines the corresponding relationships between dialogue paragraphs and text fragment characters;
[0036] In this process, the editor uses the script editing interface in the text editor to verify the correspondence between dialogue paragraphs and text fragments and characters, and adjusts any incorrect correspondences.
[0037] In one embodiment, the local role set includes a first role subset and a second role subset;
[0038] The text analyzer uses pattern matching to discover and obtain the characters that appear in each text segment and form a first character subset, which is a subset of the global character set;
[0039] Alternatively, the text analyzer uses named entity recognition methods to discover and obtain the characters appearing in each text fragment and form a second subset of characters;
[0040] The difference between the second subset of roles and the global set of roles is the difference between the first set of roles.
[0041] In one embodiment, the roles in the first subset of roles obtained by the text analyzer through role analysis include:
[0042] If a character from the first subset of characters actually appears in the current text fragment, the editor adds it to the first subset of characters in the text fragment through the character editing interface in the text editor;
[0043] If a character from the first subset of characters does not appear in the current text fragment, it indicates an error in the character analysis results. In this case, the editor can remove the character from the first subset of characters through the character editing interface in the text editor.
[0044] The roles in the first role difference set include: if a role in the first role difference set is a missing role in the global role set, the editor adds it to the global role set through the role editing interface, and at the same time adds it to the first role subset;
[0045] If a character in the first character difference set does not appear in the clip, it indicates an error in the character analysis results, and the editor chooses not to add it to the global character set.
[0046] In one embodiment, the text analyzer uses a rule-based pattern matching method to separate narration and dialogue; wherein the rule-based pattern matching method includes regular expressions;
[0047] For texts where it is difficult to separate narration and dialogue using rule-based pattern matching methods, the text analyzer uses a machine learning model to separate narration and dialogue.
[0048] The text analyzer uses rule-based pattern matching to match the text patterns of the narration paragraphs in the context of the dialogue paragraphs, thereby identifying the text segment characters corresponding to the dialogue paragraphs; the rule-based pattern matching method includes regular expressions.
[0049] In one embodiment, the text analyzer uses a machine learning model to establish a correspondence between characters and dialogue content in dialogue segments, with narration content near the dialogue content serving as the context of that dialogue content.
[0050] For each dialogue segment, the text analyzer uses a machine learning model to obtain the probability of the corresponding characters appearing in the text segment and determines the corresponding relationship between the dialogue segment and the characters based on the obtained probability.
[0051] In one embodiment, when there are N dialogue segments and M characters, the text analyzer constructs a character probability matrix of dimension N×M, where M and N are both integers greater than 0; the text analyzer uses a dynamic programming algorithm to decode the character probability matrix to obtain the corresponding relationship between each dialogue segment and character in the text segment; wherein, the dynamic programming algorithm includes Viterbi decoding.
[0052] Implementing the embodiments of the present invention will have the following beneficial effects:
[0053] The technical solution of this invention utilizes a human-machine collaborative working mode, which greatly saves the editor's energy, improves the efficiency of text adaptation, and enhances the quality of text adaptation during the process of adapting existing written works. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] in:
[0056] Figure 1This is a flowchart illustrating the text analysis and editing method of the present invention;
[0057] Figure 2 This is a schematic diagram of the text analysis and editing system of the present invention. Detailed Implementation
[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] This invention discloses a text analysis and editing method, including:
[0060] Step 1: The text analysis and editing system acquires and analyzes the text to determine the set of local roles appearing in each text segment from the global role set of the text; the text analysis and editing system includes a text analyzer and a text editor;
[0061] For example, if the text is a book, then all the characters appearing in the book constitute the global character set; if the text fragments of the book are chapters, then the characters appearing in each chapter constitute the local character set.
[0062] Step 1.1: The text analyzer performs role analysis on the text and generates role analysis results, which include a local set of roles of the characters appearing in each text segment.
[0063] Specifically, the local set of roles includes a first subset of roles and a second subset of roles;
[0064] The text analyzer uses pattern matching to discover and obtain the characters that appear in each text segment and form a first character subset, which is a subset of the global character set;
[0065] Alternatively, the text analyzer uses named entity recognition methods to discover and obtain the characters appearing in each text fragment and form a second subset of characters;
[0066] The difference between the second subset of roles and the global set of roles is the difference between the first set of roles.
[0067] The difference set of the first character set may be non-empty, meaning that the second character set may contain characters that have not appeared in the global character set.
[0068] Step 1.2: The editor verifies the character analysis results in the text editor; the text editor includes a character editing interface and a script editing interface;
[0069] Specifically, the roles in the first subset of roles obtained by the text analyzer through role analysis include:
[0070] If a character from the first subset of characters actually appears in the current text fragment, the editor adds it to the first subset of characters in the text fragment through the character editing interface in the text editor;
[0071] If a character from the first subset of characters does not appear in the current text fragment, it indicates an error in the character analysis results. In this case, the editor can remove the character from the first subset of characters through the character editing interface in the text editor.
[0072] The roles in the first role difference set include: if a role in the first role difference set is a missing role in the global role set, the editor adds it to the global role set through the role editing interface, and at the same time adds it to the first role subset;
[0073] If a character in the first character difference set does not appear in the clip, it indicates an error in the character analysis results, and the editor chooses not to add it to the global character set.
[0074] Step 2: The text analyzer analyzes and determines the corresponding relationships between characters and text fragments;
[0075] Step 2.1: The text analyzer divides the text into different paragraphs according to narration and dialogue, generating paragraph division results; the paragraph division results include narration paragraphs and dialogue paragraphs;
[0076] Specifically, in step 2.1, the text analyzer uses a rule-based pattern matching method to separate narration and dialogue; wherein, the rule-based pattern matching method includes regular expressions;
[0077] For texts where it is difficult to separate narration and dialogue using rule-based pattern matching methods, the text analyzer uses a machine learning model to separate narration and dialogue.
[0078] The machine learning model includes a narration / dialogue classification model, which classifies paragraphs into narration paragraphs and dialogue paragraphs. The input of the narration / dialogue classification model is the paragraph to be classified and its context, and the output of the narration / dialogue classification model is the probability that the paragraph to be classified belongs to the narration type or the dialogue type. The model structure of the narration / dialogue classification model adopts a machine learning model for handling text classification problems, including but not limited to neural network models and boost models.
[0079] For example, a narration-dialogue classification model can be used to judge and classify paragraphs that are ambiguous among multiple rules or that conform to a specific rule;
[0080] Step 2.2: The editor verifies the paragraph division results in the text editor through the script editing interface and adjusts any incorrect paragraph division results.
[0081] Step 2.3: The text analyzer analyzes and determines the corresponding relationships between dialogue paragraphs and text fragment characters;
[0082] Specifically, in step 2.3, the text analyzer uses a rule-based pattern matching method to match the text patterns of the narration paragraphs in the context of the dialogue paragraphs, thereby identifying the text segment roles corresponding to the dialogue paragraphs; wherein, the rule-based pattern matching method includes regular expressions;
[0083] For example, the example of Zhang San saying "Hello" matches the text pattern of [character name] saying "[any text]";
[0084] Specifically, the text analyzer uses machine learning models to establish a correspondence between characters and dialogue content in dialogue segments, with the narration content near the dialogue content serving as the context of that dialogue content.
[0085] For each dialogue segment, the text analyzer uses a machine learning model to obtain the probability of the dialogue segment corresponding to each character appearing in the text segment it belongs to, and judges the corresponding relationship between the dialogue segment and the character based on the obtained probability.
[0086] Specifically, when there are N dialogue segments and M characters, the text analyzer constructs a character probability matrix of dimension N×M, where M and N are both integers greater than 0; the text analyzer uses a dynamic programming algorithm to decode the character probability matrix to obtain the corresponding relationship between each dialogue segment and character in the text segment; the dynamic programming algorithm includes Viterbi decoding;
[0087] The formula for calculating the character probability matrix is as follows:
[0088] p m x n =fx n ,y m |θ
[0089] Where, p m x n Let x be the character probability, that is, the probability that dialogue segment n belongs to character m. n For the representation of dialogue segment n, y m Let f be the representation of the character m, f be the machine learning model, and θ be the parameters of the machine learning model.
[0090] Step 2.4: The editor verifies the correspondence between dialogue paragraphs and text fragment characters in the script editing interface of the text editor and adjusts any incorrect correspondences.
[0091] In addition, the present invention also discloses a text analysis and editing system, including a text analyzer and a text editor;
[0092] The text analysis and editing system acquires and analyzes the text to determine the set of local roles that appear in each text segment within the global role set of the text;
[0093] For example, if the text is a book, then all the characters appearing in the book constitute the global character set; if the text fragments of the book are chapters, then the characters appearing in each chapter constitute the local character set.
[0094] The text analyzer performs role analysis on the text and generates role analysis results, which include a local set of roles of the characters appearing in each text segment.
[0095] Specifically, the local set of roles includes a first subset of roles and a second subset of roles;
[0096] The text analyzer uses pattern matching to discover and obtain the characters that appear in each text segment and form a first character subset, which is a subset of the global character set;
[0097] Alternatively, the text analyzer uses named entity recognition methods to discover and obtain the characters appearing in each text fragment and form a second subset of characters;
[0098] The difference between the second subset of roles and the global set of roles is the difference between the first set of roles.
[0099] The difference set of the first character set may be non-empty, meaning that the second character set may contain characters that have not appeared in the global character set.
[0100] The editor verifies the character analysis results in a text editor; the text editor includes a character editing interface and a script editing interface.
[0101] Specifically, the roles in the first subset of roles obtained by the text analyzer through role analysis include:
[0102] If a character from the first subset of characters actually appears in the current text fragment, the editor adds it to the first subset of characters in the text fragment through the character editing interface in the text editor;
[0103] If a character from the first subset of characters does not appear in the current text fragment, it indicates an error in the character analysis results. In this case, the editor can remove the character from the first subset of characters through the character editing interface in the text editor.
[0104] The roles in the first role difference set include: if a role in the first role difference set is a missing role in the global role set, the editor adds it to the global role set through the role editing interface, and at the same time adds it to the first role subset;
[0105] If a character in the first character difference set does not appear in the clip, it indicates an error in the character analysis results, and the editor chooses not to add it to the global character set.
[0106] The text analyzer analyzes and determines the corresponding relationships between characters and text fragments;
[0107] The text analyzer divides the text into different paragraphs based on narration and dialogue, generating paragraph segmentation results; the paragraph segmentation results include narration paragraphs and dialogue paragraphs.
[0108] Specifically, the text analyzer uses a rule-based pattern matching method to separate narration from dialogue; the rule-based pattern matching method includes regular expressions.
[0109] For texts where it is difficult to separate narration and dialogue using rule-based pattern matching methods, the text analyzer uses a machine learning model to separate narration and dialogue.
[0110] The machine learning model includes a narration / dialogue classification model, which classifies paragraphs into narration paragraphs and dialogue paragraphs. The input of the narration / dialogue classification model is the paragraph to be classified and its context, and the output of the narration / dialogue classification model is the probability that the paragraph to be classified belongs to the narration type or the dialogue type. The model structure of the narration / dialogue classification model adopts a machine learning model for handling text classification problems, including but not limited to neural network models and boost models.
[0111] For example, a narration-dialogue classification model can be used to judge and classify paragraphs that are ambiguous among multiple rules or that conform to a specific rule;
[0112] In this process, the editor verifies the paragraph division results through the script editing interface in the text editor and adjusts any incorrect paragraph division results.
[0113] Among them, the text analyzer analyzes and determines the corresponding relationships between dialogue paragraphs and text fragment characters;
[0114] Specifically, the text analyzer uses rule-based pattern matching methods to match the text patterns of the narration paragraphs in the context of the dialogue paragraphs, thereby identifying the text segment roles corresponding to the dialogue paragraphs; where the rule-based pattern matching methods include regular expressions.
[0115] For example, the example of Zhang San saying "Hello" matches the text pattern of [character name] saying "[any text]";
[0116] Specifically, the text analyzer uses machine learning models to establish a correspondence between characters and dialogue content in dialogue segments, with the narration content near the dialogue content serving as the context of that dialogue content.
[0117] For each dialogue segment, the text analyzer uses a machine learning model to obtain the probability of the dialogue segment corresponding to each character appearing in the text segment it belongs to, and judges the corresponding relationship between the dialogue segment and the character based on the obtained probability.
[0118] Specifically, when there are N dialogue segments and M characters, the text analyzer constructs a character probability matrix of dimension N×M, where M and N are both integers greater than 0; the text analyzer uses a dynamic programming algorithm to decode the character probability matrix to obtain the corresponding relationship between each dialogue segment and character in the text segment; the dynamic programming algorithm includes Viterbi decoding;
[0119] The formula for calculating the character probability matrix is as follows:
[0120] p m x n =fx n ,y m |θ
[0121] Where, p m x n Let x be the character probability, that is, the probability that dialogue segment n belongs to character m. n For the representation of dialogue segment n, y m Let f be the representation of the character m, f be the machine learning model, and θ be the parameters of the machine learning model.
[0122] In this process, the editor uses the script editing interface in the text editor to verify the correspondence between dialogue paragraphs and text fragments and characters, and adjusts any incorrect correspondences.
[0123] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A text analysis and editing method, characterized in that, include: Step 1: The text analysis and editing system acquires and analyzes the text to determine the set of local roles appearing in each text segment from the global role set of the text; the text analysis and editing system includes a text analyzer and a text editor; Step 1.1: The text analyzer performs role analysis on the text and generates role analysis results, which include a local set of roles of the characters appearing in each text segment. Step 1.2: The editor verifies the character analysis results in the text editor; the text editor includes a character editing interface and a script editing interface; Step 2: The text analyzer analyzes and determines the corresponding relationships between characters and text fragments; Step 2.1: The text analyzer divides the text into different paragraphs according to narration and dialogue, generating paragraph division results; the paragraph division results include narration paragraphs and dialogue paragraphs; Step 2.2: The editor verifies the paragraph division results in the text editor through the script editing interface and adjusts any incorrect paragraph division results. Step 2.3: The text analyzer analyzes and determines the corresponding relationships between dialogue paragraphs and text fragment characters; Step 2.4: The editor verifies the correspondence between dialogue paragraphs and text fragments and characters in the script editing interface of the text editor, and adjusts any incorrect correspondences. The local role set includes a first role subset and a second role subset; The text analyzer uses pattern matching to discover and obtain the characters that appear in each text segment and form a first character subset, which is a subset of the global character set; Alternatively, the text analyzer uses named entity recognition methods to discover and obtain the characters appearing in each text fragment and form a second subset of characters; The difference between the second subset of roles and the global set of roles is the difference between the first set of roles. The roles in the first subset of roles obtained by the text analyzer include: If a character from the first subset of characters actually appears in the current text fragment, the editor adds it to the first subset of characters in the text fragment through the character editing interface in the text editor; If a character from the first subset of characters does not appear in the current text fragment, it indicates an error in the character analysis results. In this case, the editor can remove the character from the first subset of characters through the character editing interface in the text editor. The roles in the first role difference set include: when a role in the first role difference set is a missing role in the global role set, the editor adds it to the global role set through the role editing interface, and at the same time adds it to the first role subset; If a character in the first character difference set does not appear in the clip, it indicates an error in the character analysis results, and the editor chooses not to add it to the global character set.
2. The text analysis and editing method according to claim 1, characterized in that, In step 2.1, the text analyzer uses a rule-based pattern matching method to separate narration and dialogue; wherein, the rule-based pattern matching method includes regular expressions; For texts where it is difficult to separate narration and dialogue using rule-based pattern matching methods, the text analyzer uses a machine learning model to separate narration and dialogue. In step 2.3, the text analyzer uses a rule-based pattern matching method to match the text patterns of the narration paragraphs in the context of the dialogue paragraphs, thereby identifying the text segment roles corresponding to the dialogue paragraphs; wherein, the rule-based pattern matching method includes regular expressions.
3. The text analysis and editing method according to claim 1, characterized in that, in, The text analyzer uses a machine learning model to establish a correspondence between characters and dialogue content in dialogue segments, with the surrounding narration serving as the context of the dialogue content. For each dialogue segment, the text analyzer uses a machine learning model to obtain the probability of the corresponding characters appearing in the text segment and determines the corresponding relationship between the dialogue segment and the characters based on the obtained probability.
4. A text analysis and editing system, characterized in that, Includes text analyzers and text editors; The text analysis and editing system acquires and analyzes the text to determine the set of local roles that appear in each text segment within the global role set of the text; The text analyzer performs role analysis on the text and generates role analysis results, which include a local set of roles of the characters appearing in each text segment. The editor verifies the character analysis results in a text editor; the text editor includes a character editing interface and a script editing interface. The text analyzer divides the text into different paragraphs based on narration and dialogue, generating paragraph segmentation results; the paragraph segmentation results include narration paragraphs and dialogue paragraphs. In this process, the editor verifies the paragraph division results through the script editing interface in the text editor and adjusts any incorrect paragraph division results. Among them, the text analyzer analyzes and determines the corresponding relationships between dialogue paragraphs and text fragment characters; In this process, the editor verifies the correspondence between dialogue paragraphs and text fragments and characters through the script editing interface in the text editor, and adjusts any incorrect correspondences. The local role set includes a first role subset and a second role subset; The text analyzer uses pattern matching to discover and obtain the characters that appear in each text segment and form a first character subset, which is a subset of the global character set; Alternatively, the text analyzer uses named entity recognition methods to discover and obtain the characters appearing in each text fragment and form a second subset of characters; The difference between the second subset of roles and the global set of roles is the difference between the first set of roles. The roles in the first subset of roles obtained by the text analyzer include: If a character from the first subset of characters actually appears in the current text fragment, the editor adds it to the first subset of characters in the text fragment through the character editing interface in the text editor; If a character from the first subset of characters does not appear in the current text fragment, it indicates an error in the character analysis results. In this case, the editor can remove the character from the first subset of characters through the character editing interface in the text editor. The roles in the first role difference set include: when a role in the first role difference set is a missing role in the global role set, the editor adds it to the global role set through the role editing interface, and at the same time adds it to the first role subset; If a character in the first character difference set does not appear in the clip, it indicates an error in the character analysis results, and the editor chooses not to add it to the global character set.
5. The text analysis and editing system according to claim 4, characterized in that, in, The text analyzer uses rule-based pattern matching methods to separate narration and dialogue; the rule-based pattern matching methods include regular expressions. For texts where it is difficult to separate narration and dialogue using rule-based pattern matching methods, the text analyzer uses a machine learning model to separate narration and dialogue. The text analyzer uses rule-based pattern matching to match the text patterns of the narration paragraphs in the context of the dialogue paragraphs, thereby identifying the text segment characters corresponding to the dialogue paragraphs; the rule-based pattern matching method includes regular expressions.
6. The text analysis and editing system according to claim 4, characterized in that, in, The text analyzer uses a machine learning model to establish a correspondence between characters and dialogue content in dialogue segments, with the surrounding narration serving as the context of the dialogue content. For each dialogue segment, the text analyzer uses a machine learning model to obtain the probability of the corresponding characters appearing in the text segment and determines the corresponding relationship between the dialogue segment and the characters based on the obtained probability.
Citation Information
Patent Citations
Text-to-voice work method for carrying out intelligent character matching
CN110364139A
Role determination method and device, electronic equipment and storage medium
CN112270198A