Text editing method and system

By parsing and editing structured chapter data, the problem of unsystematic audiobook production process has been solved, achieving efficient text conversion and audiobook production.

CN114580356BActive Publication Date: 2026-04-21DALIAN INSTANT INTELLIGENCE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DALIAN INSTANT INTELLIGENCE TECH CO LTD
Filing Date
2022-01-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The production process of audiobooks in the current technology is not systematic or streamlined, resulting in low production efficiency and poor flexibility.

Method used

By receiving long text and parsing chapter titles, structured chapter data is generated, editing operations are performed, the chapter structure is reconstructed according to word count criteria, and the edited text is exported.

Benefits of technology

It improves the editing efficiency of converting existing text into audio scripts, thereby enhancing the production efficiency and flexibility of audiobooks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580356B_ABST
    Figure CN114580356B_ABST
Patent Text Reader

Abstract

This invention discloses a text editing method, comprising: receiving a long text and parsing its chapter titles; obtaining a chapter list after parsing, and generating chapter structured data in units of chapters; after generating the chapter structured data, using the chapter structured data to perform editing operations on the chapters; and exporting the edited long text. Furthermore, this invention also discloses a text editing system. This invention obtains structured data by parsing long text and edits chapter information based on the structured data, removes non-text content from chapter names, monitors abnormal chapter word counts to ensure normal operation even under abnormal word count conditions, and can reconstruct the chapter structure based on the structured data to generate text in units of sets. This improves the editing efficiency of converting existing texts, such as novels or scripts, into audio scripts, further enhancing the production efficiency and flexibility of audiobooks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of text processing technology, and in particular to a text editing method and system. Background Technology

[0002] In the current technological landscape, with the development of technology and the diversification of information access channels, digital media is constantly impacting traditional media, and the public's reading habits are continuously changing, thus giving rise to audiobooks as a reading format. Audiobooks are electronic publications that use sound as a medium, including audio news, audio novels, and so on. Audiobooks overlap with both digital and traditional media, yet they also have distinct characteristics, possessing unique advantages that can meet the needs of various users.

[0003] However, the inventors discovered through research that the production of audiobooks in the existing technology is not systematic or procedural. In particular, the process of converting existing texts, such as novels or scripts, into audio scripts requires a lot of manpower and time, resulting in low production efficiency and poor flexibility in the production of audiobooks. Summary of the Invention

[0004] Based on this, and to address the technical problems in the existing technology, a text editing method is proposed, including:

[0005] Step 1: Receive the long text and parse the chapter titles within it;

[0006] Step 2: After completing the parsing, obtain the parsing results and the list of chapters, and generate chapter-based structured data based on the parsing results;

[0007] Step 3: After generating the chapter structured data, use the chapter structured data to edit the chapters;

[0008] Step 4: After completing the editing operation, export the edited long text.

[0009] In one embodiment, in step 1, the original text of the long text is traversed, the chapter titles of the original text are matched, and the chapter numbers and chapter names are parsed.

[0010] Among them, a chapter title format template is selected from the chapter title format template library, and the chapter number and chapter name of the long text are parsed according to the selected chapter title format template;

[0011] Determine if there is any non-text content in the chapter title, and select to remove the non-text content.

[0012] In one embodiment, a syntax-based matching method or a machine learning model classification method is used to determine whether the text in the original text is a chapter title; wherein, the syntax-based matching method includes regular expressions;

[0013] The chapter number and chapter name are extracted from the chapter titles using syntax-based parsing methods or machine learning model prediction methods; among which, syntax-based parsing methods include regular expressions;

[0014] If no matching chapter title format template is found in the chapter title format template library, a custom regular expression will be used for parsing.

[0015] Among them, syntax-based matching methods or machine learning model classification methods are used to match non-text content; among them, syntax-based matching methods include regular expressions;

[0016] Use syntax-based replacement methods or machine learning model prediction methods to remove non-text content; among them, syntax-based replacement methods include regular expressions.

[0017] In one embodiment, in step 2, the chapter structured data includes the original text number, sorting number, order difference, chapter name, chapter content, and chapter word count;

[0018] Among them, the original text number is the chapter number parsed from the original text; the sorting number is the chapter number obtained by sorting the original text; when the sorting number and the original text number are inconsistent, there is a difference between the number and the original number. The difference between the number and the original number is called the order difference, which is used to determine whether there are missing or redundant chapters.

[0019] The chapter content includes one or more paragraphs of text; the chapter word count is a statistical result of the number of words in the text within the chapter.

[0020] In one embodiment, a statistical model is used to model and analyze the word count of chapters. The statistical model is used to determine whether the word count of a chapter is too high or too low. When the word count of a chapter is too high or too low, it is determined that the chapter has an abnormal word count. Chapters determined to have an abnormal word count are highlighted to facilitate chapter list filtering and text editing based on this abnormal information.

[0021] In one embodiment, step 3 includes editing operations for chapters, such as adding, deleting, modifying, moving, and retrieving; wherein, after adding, deleting, modifying, or moving a chapter, the chapter's sorting number is recalculated.

[0022] The operation of adding chapters includes dividing the current chapter content into different parts to form a new chapter, or creating a new chapter and adding new content to it.

[0023] In one embodiment, the editing operation further includes a reconstruction operation, which reconstructs the chapter using chapter structured data;

[0024] Among them, the structure of the chapter is reconstructed according to the chapter word count criterion, and the structural unit of the reconstructed chapter is a set;

[0025] Among them, the chapter word count guidelines include setting a word count range for each episode, which includes a minimum and a maximum word count.

[0026] Starting from the end of the current last episode, search backwards for the starting and ending positions of the text within the specified word count range, and highlight the text within the searched word count range on the interface;

[0027] Within the searched text range, the end position of the current set is selected according to the content requirements, thereby dividing the text into a new set. This end position is then used as the starting point of the new set, and the text continues to be divided from there.

[0028] When the text of a re-divided set includes multiple chapter titles, select one of the chapter titles as the set name; sort the re-divided sets, and obtain a corresponding set number for each set.

[0029] In one embodiment, in step 4, the exported chapter number is the original text number or the sorting number; the file format of the exported text includes a file consisting of multiple chapters, or a file consisting of a single chapter.

[0030] The exported text is formatted with the chapter number and title as the first line; the filename of the exported text is determined based on the chapter number and chapter name.

[0031] In one embodiment, when the chapter structure is reconstructed using sets as structural units, the text using sets as structural units is exported, and the range of sets to be exported is selected before exporting; when exporting, the starting sort number of the first set in the range of sets is specified;

[0032] The file format for exporting text in sets includes files consisting of multiple sets or a single set; the exported text sets begin with the set number and set name; the filename of the exported file is determined by the set number and set name.

[0033] In addition, to solve the technical problems in the prior art, a text editing system is proposed, including a parsing device, a data processor, an editor, and an exporting device connected in sequence.

[0034] The parsing device receives long text and parses the chapter titles therein;

[0035] The parsing device obtains the parsing result and a list of chapters after completing the parsing, and sends the parsing result to the data processor connected to it; the data processor generates chapter-based structured data based on the parsing result.

[0036] The data processor sends the generated chapter structured data to the editor connected to it, and the editor uses the chapter structured data to edit the chapters.

[0037] After the editor completes the editing operation, it exports the edited long text through the export device connected to it.

[0038] In one embodiment, the parsing device traverses the original text of the long text, matches the chapter titles of the original text, and parses the chapter numbers and chapter names therein;

[0039] The parsing device includes a chapter title format template library; the editing user selects a chapter title format template from the chapter title format template library, and the parsing device parses the chapter number and chapter name of the long text according to the chapter title format template selected by the editing user;

[0040] The parsing device determines whether there is non-text content in the chapter title, and the editing user selects to remove the non-text content.

[0041] In one embodiment, the parsing device uses a syntax-based matching method or a machine learning model classification method to determine whether the text in the original text is a chapter title; wherein, the syntax-based matching method includes regular expressions;

[0042] The parsing device extracts the chapter number and chapter name from the chapter title using a syntax-based parsing method or a machine learning model prediction method; wherein, the syntax-based parsing method includes regular expressions;

[0043] If no matching chapter title format template is found in the chapter title format template library, a custom regular expression will be used for parsing.

[0044] The parsing device uses a syntax-based matching method or a machine learning model classification method to match non-text content; wherein, the syntax-based matching method includes regular expressions;

[0045] The parsing device uses a syntax-based replacement method or a machine learning model prediction method to remove non-text content; wherein, the syntax-based replacement method includes regular expressions.

[0046] In one embodiment, the chapter structured data includes the original text number, sort number, order difference, chapter name, chapter content, and chapter word count;

[0047] Among them, the original text number is the chapter number parsed from the original text; the sorting number is the chapter number obtained by sorting the original text; when the sorting number and the original text number are inconsistent, there is a difference between the number and the original number. The difference between the number and the original number is called the order difference, which is used to determine whether there are missing or redundant chapters.

[0048] The chapter content includes one or more paragraphs of text; the chapter word count is a statistical result of the number of words in the text within the chapter.

[0049] In one embodiment, the data processor uses a statistical model to model and analyze the word count of chapters. The statistical model is used to determine whether the word count of a chapter is too high or too low. When the word count of a chapter is too high or too low, it is determined that the chapter has an abnormal word count. Chapters determined to have an abnormal word count are highlighted to facilitate chapter list filtering and text editing based on this abnormal information.

[0050] In one embodiment, the editing operation of a chapter includes adding, deleting, modifying, moving, and retrieving operations; wherein, after the editor performs the adding, deleting, modifying, and moving operations on the chapter, the sorting number of the chapter is recalculated;

[0051] The operation of adding chapters includes dividing the current chapter content into different parts to form a new chapter, or creating a new chapter and adding new content to it.

[0052] In one embodiment, the editing operation of the editor includes reconstruction, and the chapter editor uses chapter structured data to reconstruct the chapter;

[0053] The editor restructures the chapters according to the chapter word count criteria, and the restructured chapter structure unit is a set;

[0054] Among them, the chapter word count guidelines include setting a word count range for each episode, which includes a minimum and a maximum word count.

[0055] Starting from the end of the current last episode, search backwards for the starting and ending positions of the text within the specified word count range, and highlight the text within the searched word count range on the interface;

[0056] The editor can select the end position of the current set in the text within the word range of the search, according to the content requirements, thereby dividing it into a new set and using the end position as the starting position of the text in the new set to continue dividing it.

[0057] When the text of a re-divided set includes multiple chapter titles, the editor selects one of the chapter names as the set name; the editor sorts the re-divided sets, and each set obtains a corresponding set number.

[0058] In one embodiment, the chapter number exported by the exporting device is the original text number or the sorting number; the file format of the text exported by the exporting device includes a file consisting of multiple chapters, or a file consisting of a single chapter.

[0059] The exported text is formatted with the chapter number and title as the first line; the filename of the exported text is determined based on the chapter number and chapter name.

[0060] In one embodiment, when the chapter structure is reconstructed using sets as structural units, the exporting device exports the text using sets as structural units, and selects the range of sets to be exported before exporting.

[0061] When the exporting device exports, it specifies the starting sorting number of the first set within the range of the specified set;

[0062] The export device exports text files in a set-based format, including files composed of multiple sets or a single set; the exported text sets begin with the set number and set name; the filename of the exported file is determined based on the set number and set name.

[0063] Implementing the embodiments of the present invention will have the following beneficial effects:

[0064] This invention parses long text to obtain structured data and edits chapter information based on the structured data, removing non-text content from chapter titles. It also monitors abnormal word counts in chapters to ensure normal operation even under such conditions. Furthermore, it can reconstruct the chapter structure based on the structured data to generate text in sets as structural units, thereby greatly improving the editing efficiency of converting existing texts, such as novels or scripts, into audio scripts, and further enhancing the production efficiency and flexibility of audiobooks. Attached Figure Description

[0065] 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.

[0066] in:

[0067] Figure 1 This is a flowchart illustrating the text editing method of the present invention;

[0068] Figure 2 This is a schematic diagram of the text editing system of the present invention. Detailed Implementation

[0069] 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.

[0070] This invention discloses a text editing method, comprising:

[0071] Step 1: Receive the long text and parse the chapter titles within it;

[0072] This involves iterating through the original text of a long text, matching the chapter titles, and parsing the chapter numbers and names.

[0073] For example, if the original chapter title is "Chapter 200" or "200, Chapter Title", then the parsed chapter number will be 200;

[0074] Specifically, a chapter title format template is selected from the chapter title format template library, and the chapter number and chapter name of the long text are parsed based on the selected chapter title format template;

[0075] Specifically, syntax-based matching methods or machine learning model classification methods are used to determine whether the text in the original document is a chapter title; among them, syntax-based matching methods include regular expressions;

[0076] The chapter number and chapter name are extracted from the chapter titles using syntax-based parsing methods or machine learning model prediction methods; among which, syntax-based parsing methods include regular expressions;

[0077] If no matching chapter title format template is found in the chapter title format template library, a custom regular expression will be used for parsing.

[0078] Specifically, determine whether there is any non-text content in the chapter title, and select to remove the non-text content in the chapter title;

[0079] For example, non-text content may be messages or notes to readers, such as a message to readers saying "Happy Chinese New Year"; non-text content usually follows a specific pattern, such as starting and ending with parentheses, or having certain content-level characteristics.

[0080] Among them, syntax-based matching methods or machine learning model classification methods are used to match non-text content; among them, syntax-based matching methods include regular expressions;

[0081] Use syntax-based replacement methods or machine learning model prediction methods to remove non-text content; among them, syntax-based replacement methods include regular expressions;

[0082] Step 2: After completing the parsing, obtain the parsing results and the list of chapters, and generate chapter-based structured data based on the parsing results;

[0083] The structured data for each chapter includes the original text number, sort number, order difference, chapter name, chapter content, and chapter word count.

[0084] The chapter list includes jump buttons for previous and next chapters; after obtaining the chapter list, clicking on a chapter in the chapter list will jump to the beginning of that chapter;

[0085] Among them, the original text number is the chapter number parsed from the original text; the sorting number is the chapter number obtained by sorting the original text; when the sorting number and the original text number are inconsistent, there is a difference between the number and the original number. The difference between the number and the original number is called the order difference, which is used to determine whether there are missing or redundant chapters.

[0086] The parsed chapter name may be empty, meaning the chapter does not have a corresponding chapter name;

[0087] The chapter content includes one or more paragraphs of text; the chapter word count is a statistical result of the word count of the text within the chapter.

[0088] Specifically, a statistical model is used to model and analyze the word count of chapters. The statistical model is used to determine whether the word count of a chapter is too high or too low. When the word count of a chapter is too high or too low, it is determined that the chapter has an abnormal word count.

[0089] Specifically, the statistical model is a Gaussian model; the Gaussian model is used to model the number of words in a chapter, and the model parameters of the Gaussian model are the mean and variance.

[0090] The Gaussian model is shown below:

[0091]

[0092] Where μ is the model mean and σ is the standard deviation; the three-sigma rule is used to identify outliers.

[0093] In particular, other models can be used to model and analyze the word count of chapters, rather than being limited to the Gaussian model;

[0094] The likelihood or probability density value of the model is used to evaluate whether the word count of a chapter is abnormal. If the likelihood or probability density value is lower than a set threshold, the chapter is determined to have an abnormal word count.

[0095] Alternatively, the distance between the chapter word count and the model mean can be used to assess whether the chapter word count is abnormal. If the distance is higher than a set threshold, the chapter is determined to have an abnormal word count. The set threshold can be an absolute value or a relative value related to the model parameters.

[0096] Chapters identified as having abnormal word counts are highlighted to facilitate chapter list filtering and text editing based on this abnormality information;

[0097] Step 3: After generating the chapter structured data, use the chapter structured data to edit the chapters;

[0098] The editing operations for chapters include adding, deleting, modifying, moving, and searching; and the chapter sorting sequence is recalculated after adding, deleting, modifying, or moving a chapter.

[0099] The operation of adding a chapter includes dividing the current chapter into different parts to form a new chapter, or creating a new chapter and adding new content to it;

[0100] The chapter titles can be modified.

[0101] In particular, the editing operations also include restructuring operations, which use chapter structured data to restructure chapters;

[0102] Among them, the structure of the chapter is reconstructed according to the chapter word count criterion, and the structural unit of the reconstructed chapter is a set;

[0103] The chapter word count guidelines include setting a word count range for each episode, which includes a minimum and a maximum value; for example, the word count range is set to 2000-2500 words, with a minimum of 2000 and a maximum of 2500.

[0104] Starting from the end of the current last episode, search backwards for the starting and ending positions of the text within the specified word count range, and highlight the text within the searched word count range on the interface;

[0105] Within the searched text range, the end position of the current set is selected according to the content requirements, thereby dividing the text into a new set. This end position is then used as the starting point of the new set, and the text continues to be divided from there.

[0106] When the text of a re-divided set includes multiple chapter titles, select one of the chapter titles as the set name; sort the re-divided sets and obtain a corresponding set number for each set;

[0107] Step 4: Export the edited long text;

[0108] The exported chapter numbers are either the original text numbers or the sorting numbers; the exported text file format includes files consisting of multiple chapters or files consisting of a single chapter.

[0109] The exported text is formatted with the chapter number and title as the first line; the filename of the exported text is determined based on the chapter number and chapter name.

[0110] In particular, when the chapter structure is restructured using sets as the structural unit, the text is exported using sets as the structural unit, and the range of sets to be exported is selected before exporting.

[0111] Specify the starting sort number of the first set in the range of sets to export; for example, if the starting sort number of the exported sets is set to 100, then the set numbering will start from set 100 when exported.

[0112] The file format for exporting text in sets includes files consisting of multiple sets or a single set; the exported text sets begin with the set number and set name; the filename of the exported file is determined by the set number and set name.

[0113] In addition, the present invention also discloses a text editing system, including a parsing device, a data processor, an editor, and an exporting device connected in sequence to each other;

[0114] The parsing device receives long text and parses the chapter titles therein;

[0115] Specifically, the parsing device traverses the original text of the long text, matches the chapter titles of the original text, and parses the chapter numbers and chapter names;

[0116] For example, if the original chapter title is "Chapter 200" or "200, Chapter Title", then the parsed chapter number will be 200;

[0117] Specifically, the parsing device includes a chapter title format template library; the editing user selects a chapter title format template from the chapter title format template library, and the parsing device parses the chapter number and chapter name of the long text according to the chapter title format template selected by the editing user;

[0118] Specifically, the parsing device uses a syntax-based matching method or a machine learning model classification method to determine whether the text in the original text is a chapter title; wherein, the syntax-based matching method includes regular expressions;

[0119] The parsing device extracts the chapter number and chapter name from the chapter title using a syntax-based parsing method or a machine learning model prediction method; wherein, the syntax-based parsing method includes regular expressions;

[0120] If no matching chapter title format template is found in the chapter title format template library, a custom regular expression will be used for parsing.

[0121] Specifically, the parsing device determines whether there is non-text content in the chapter title, and the editing user selects to remove the non-text content in the chapter title;

[0122] For example, non-text content may be messages or notes to readers, such as a message to readers saying "Happy Chinese New Year"; non-text content usually follows a specific pattern, such as starting and ending with parentheses, or having certain content-level characteristics.

[0123] The parsing device uses a syntax-based matching method or a machine learning model classification method to match non-text content; wherein, the syntax-based matching method includes regular expressions;

[0124] The parsing device uses a syntax-based replacement method or a machine learning model prediction method to remove non-text content; wherein, the syntax-based replacement method includes regular expressions;

[0125] The parsing device obtains the parsing result and a list of chapters after completing the parsing, and sends the parsing result to the data processor connected to it; the data processor generates chapter-based structured data based on the parsing result.

[0126] The structured data for each chapter includes the original text number, sort number, order difference, chapter name, chapter content, and chapter word count.

[0127] The chapter list includes jump buttons for previous and next chapters; after obtaining the chapter list, clicking on a chapter in the chapter list will jump to the beginning of that chapter;

[0128] Among them, the original text number is the chapter number parsed from the original text; the sorting number is the chapter number obtained by sorting the original text; when the sorting number and the original text number are inconsistent, there is a difference between the number and the original number. The difference between the number and the original number is called the order difference, which is used to determine whether there are missing or redundant chapters.

[0129] The parsed chapter name may be empty, meaning the chapter does not have a corresponding chapter name;

[0130] The chapter content includes one or more paragraphs of text; the chapter word count is a statistical result of the word count of the text within the chapter.

[0131] Specifically, the data processor uses a statistical model to model and analyze the word count of chapters. The statistical model is used to determine whether the word count of a chapter is too high or too low. When the word count of a chapter is too high or too low, the data processor determines that there is an abnormal word count in that chapter.

[0132] Specifically, the statistical model is a Gaussian model; the data processor uses a Gaussian model to model the chapter word count data statistics, and the model parameters of the Gaussian model are mean and variance.

[0133] The Gaussian model is shown below:

[0134]

[0135] Where μ is the model mean and σ is the standard deviation; the three-sigma rule is used to identify outliers.

[0136] In particular, other models can be used to model and analyze the word count of chapters, rather than being limited to the Gaussian model;

[0137] The data processor uses the likelihood value or probability density value of the model to evaluate whether the word count of a chapter is abnormal. When the likelihood value or probability density value is lower than a set threshold, it is determined that the chapter has an abnormal word count.

[0138] Alternatively, the data processor uses the distance between the chapter word count and the model mean to evaluate whether the chapter word count is abnormal. When the distance is higher than a set threshold, it is determined that the chapter has an abnormal word count. The set threshold is an absolute value or a relative value related to the model parameters.

[0139] The data processor highlights chapters that are determined to have abnormal word counts, so that chapter list filtering and text editing can be performed based on this abnormal information.

[0140] The data processor sends the generated chapter structured data to the editor connected to it, and the editor uses the chapter structured data to edit the chapters.

[0141] The editing operations for chapters include adding, deleting, modifying, moving, and searching; and the sorting sequence number of the chapters is recalculated after the editor performs the adding, deleting, modifying, or moving operations on the chapters.

[0142] The operation of adding a chapter includes dividing the current chapter into different parts to form a new chapter, or creating a new chapter and adding new content to it;

[0143] The chapter titles are editable.

[0144] Specifically, the editing operations of the editor include reconstruction, and the chapter editor uses chapter structured data to reconstruct the chapters;

[0145] The editor restructures the chapters according to the chapter word count criteria, and the restructured chapter structure unit is a set;

[0146] The chapter word count guidelines include setting a word count range for each episode, which includes a minimum and a maximum value; for example, the word count range is set to 2000-2500 words, with a minimum of 2000 and a maximum of 2500.

[0147] Starting from the end of the current last episode, search backwards for the starting and ending positions of the text within the specified word count range, and highlight the text within the searched word count range on the interface;

[0148] The editor can select the end position of the current set in the text within the word range of the search, according to the content requirements, thereby dividing it into a new set and using the end position as the starting position of the text in the new set to continue dividing it.

[0149] When the text of a re-divided set includes multiple chapter titles, the editor selects one of the chapter names as the set name; the editor sorts the re-divided sets, and each set obtains a corresponding set number;

[0150] After the editor completes the editing operation, it exports the edited long text through the export device connected to it.

[0151] The chapter numbers exported by the exporting device are either the original text numbers or the sorting numbers; the file format of the text exported by the exporting device includes files consisting of multiple chapters, or files consisting of a single chapter.

[0152] The exported text is formatted with the chapter number and title as the first line; the filename of the exported text is determined based on the chapter number and chapter name.

[0153] In particular, when the chapter structure is reconstructed using sets as structural units, the exporting device exports the text using sets as structural units, and selects the range of sets to be exported before exporting.

[0154] The exporting device exports the starting sorting number of the first set in the range of specified sets; for example, if the starting sorting number of the exported set is set to 100, then the set numbering will start from set 100 during export.

[0155] The export device exports text files in a set-based format, including files composed of multiple sets or a single set; the exported text sets begin with the set number and set name; the filename of the exported file is determined based on the set number and set name.

[0156] 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 editing method, characterized in that, include: Step 1: Receive the long text and parse the chapter titles within it; Step 2: After completing the parsing, obtain the parsing results and the list of chapters, and generate chapter-based structured data based on the parsing results; Step 3: After generating the chapter structured data, use the chapter structured data to edit the chapters; Step 4: After completing the editing operations, export the edited long text; In step 3, the editing operations for chapters include adding, deleting, modifying, moving, and searching; among them, the sorting sequence number of the chapters is recalculated after adding, deleting, modifying, or moving the chapters. The operation of adding a chapter includes dividing the current chapter into different parts to form a new chapter, or creating a new chapter and adding new content to it; Editing operations also include restructuring operations, which use chapter structured data to restructure chapters; Among them, the structure of the chapter is reconstructed according to the chapter word count criterion, and the structural unit of the reconstructed chapter is a set; Among them, the chapter word count guidelines include setting a word count range for each episode, which includes a minimum and a maximum word count. Starting from the end of the current last episode, search backwards for the starting and ending positions of the text within the specified word count range, and highlight the text within the searched word count range on the interface; Within the searched text range, the end position of the current set is selected according to the content requirements, thereby dividing the text into a new set. This end position is then used as the starting point of the new set, and the text continues to be divided from there. When the text of a re-divided set includes multiple chapter titles, select one of the chapter titles as the set name; sort the re-divided sets and obtain a corresponding set number for each set; In step 1, the original text of the long text is traversed, the chapter titles of the original text are matched, and the chapter numbers and chapter names are parsed. Among them, a chapter title format template is selected from the chapter title format template library, and the chapter number and chapter name of the long text are parsed according to the selected chapter title format template; Determine if there is any non-text content in the chapter title, and select to remove the non-text content; In step 2, the structured data for each chapter includes the original text number, sort number, order difference, chapter name, chapter content, and chapter word count. Among them, the original text number is the chapter number parsed from the original text; the sorting number is the chapter number obtained by sorting the original text; when the sorting number and the original text number are inconsistent, there is a difference between the number and the original number. The difference between the number and the original number is called the order difference, which is used to determine whether there are missing or redundant chapters. The chapter content includes one or more paragraphs of text; the chapter word count is a statistical result of the word count of the text within the chapter. In step 4, the exported chapter numbers are either the original text numbers or the sorting numbers; the exported text file format includes files consisting of multiple chapters, or files consisting of a single chapter. The exported text is formatted with the chapter number and title as the first line; the filename of the exported text is determined based on the chapter number and chapter name. Specifically, when the chapter structure is restructured using sets as the structural unit, the text using sets as the structural unit is exported, and the range of sets to be exported is selected before exporting; when exporting, the starting sort number of the first set in the range of sets is specified; The file format for exporting text in sets includes files consisting of multiple sets or a single set; the exported text sets begin with the set number and set name; the filename of the exported file is determined by the set number and set name.

2. The text editing method according to claim 1, Its features are, in, The method uses syntax-based matching or machine learning model classification to determine whether the text in the original document is a chapter title; among them, syntax-based matching methods include regular expressions. The chapter number and chapter name are extracted from the chapter titles using syntax-based parsing methods or machine learning model prediction methods; among which, syntax-based parsing methods include regular expressions; If no matching chapter title format template is found in the chapter title format template library, a custom regular expression will be used for parsing. Among them, syntax-based matching methods or machine learning model classification methods are used to match non-text content; among them, syntax-based matching methods include regular expressions; Use syntax-based replacement methods or machine learning model prediction methods to remove non-text content; among them, syntax-based replacement methods include regular expressions.

3. The text editing method according to claim 1, Its features are, in, A statistical model is used to model and analyze the word count of chapters. The statistical model is used to determine whether the word count of a chapter is too high or too low. When the word count of a chapter is too high or too low, it is determined that the chapter has an abnormal word count. Chapters identified as having abnormal word counts will be highlighted to facilitate chapter list filtering and text editing based on this abnormality information.

4. A text editing system, characterized in that, It includes a parsing device, a data processor, an editor, and an exporting device that are connected in sequence. The parsing device receives long text and parses the chapter titles therein; The parsing device obtains the parsing result and a list of chapters after completing the parsing, and sends the parsing result to the data processor connected to it; the data processor generates chapter-based structured data based on the parsing result. The data processor sends the generated chapter structured data to the editor connected to it, and the editor uses the chapter structured data to edit the chapters. After the editor completes the editing operation, it exports the edited long text through the export device connected to it. The editing operations for chapters include adding, deleting, modifying, moving, and searching; among them, the sorting sequence of chapters is recalculated after adding, deleting, modifying, or moving chapters. The operation of adding a chapter includes dividing the current chapter into different parts to form a new chapter, or creating a new chapter and adding new content to it; Editing operations also include restructuring operations, which use chapter structured data to restructure chapters; Among them, the structure of the chapter is reconstructed according to the chapter word count criterion, and the structural unit of the reconstructed chapter is a set; Among them, the chapter word count guidelines include setting a word count range for each episode, which includes a minimum and a maximum word count. Starting from the end of the current last episode, search backwards for the starting and ending positions of the text within the specified word count range, and highlight the text within the searched word count range on the interface; Within the searched text range, the end position of the current set is selected according to the content requirements, thereby dividing the text into a new set. This end position is then used as the starting point of the new set, and the text continues to be divided from there. When the text of the re-divided set includes multiple chapter titles, one of the chapter titles is selected as the set name; the re-divided sets are sorted, and each set obtains a corresponding set number; wherein, the parsing device traverses the original text of the long text, matches the chapter titles of the original text and parses the chapter numbers and chapter names therein. The parsing device includes a chapter title format template library; the editing user selects a chapter title format template from the chapter title format template library, and the parsing device parses the chapter number and chapter name of the long text according to the chapter title format template selected by the editing user; The parsing device determines whether there is non-text content in the chapter title, and the editing user selects to remove the non-text content; The structured data for each chapter includes the original text number, sort number, order difference, chapter name, chapter content, and chapter word count. Among them, the original text number is the chapter number parsed from the original text; the sorting number is the chapter number obtained by sorting the original text; when the sorting number and the original text number are inconsistent, there is a difference between the number and the original number. The difference between the number and the original number is called the order difference, which is used to determine whether there are missing or redundant chapters. The chapter content includes one or more paragraphs of text; the chapter word count is a statistical result of the word count of the text within the chapter. The chapter numbers exported by the exporting device are either the original text numbers or the sorting numbers; the file format of the text exported by the exporting device includes files consisting of multiple chapters, or files consisting of a single chapter. The exported text is formatted with the chapter number and title as the first line; the filename of the exported text is determined based on the chapter number and chapter name. When the chapter structure is reconstructed using sets as structural units, the exporting device exports the text using sets as structural units, and selects the range of sets to be exported before exporting. When the exporting device exports, it specifies the starting sorting number of the first set within the range of the specified set; The export device exports text files in a set-based format, including files composed of multiple sets or a single set; the exported text sets begin with the set number and set name; the filename of the exported file is determined based on the set number and set name.

5. A text editing system according to claim 4, wherein the parsing device uses a syntax-based matching method or a machine learning model classification method to determine whether the text in the original text is a chapter title; wherein, Syntax-based matching methods include regular expressions; The parsing device extracts the chapter number and chapter name from the chapter title using a syntax-based parsing method or a machine learning model prediction method; wherein, the syntax-based parsing method includes regular expressions; If no matching chapter title format template is found in the chapter title format template library, a custom regular expression will be used for parsing. The parsing device uses a syntax-based matching method or a machine learning model classification method to match non-text content; wherein, the syntax-based matching method includes regular expressions; The parsing device uses a syntax-based replacement method or a machine learning model prediction method to remove non-text content; wherein, the syntax-based replacement method includes regular expressions.

6. In a text editing system according to claim 4, the data processor uses a statistical model to model and analyze the number of words in a chapter. The statistical model is used to determine whether the number of words in a chapter is too many or too few. When the number of words in a chapter is too many or too few, it is determined that the chapter has an abnormal number of words. Chapters determined to have an abnormal number of words are highlighted to facilitate chapter list filtering and text editing based on this abnormal information.

Citation Information

Patent Citations

  • Document structuring method and device

    CN110175322A

  • Text editing method and system based on structuralization

    CN110852044A

  • Document processing method and device, storage medium and computer equipment

    CN113204951A