CN114281927A - Text processing method, device, equipment and computer readable storage medium - Google Patents

Text processing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN114281927A
CN114281927A CN202011030736.5A CN202011030736A CN114281927A CN 114281927 A CN114281927 A CN 114281927A CN 202011030736 A CN202011030736 A CN 202011030736A CN 114281927 A CN114281927 A CN 114281927A
Authority
CN
China
Prior art keywords
original text
keywords
processing result
text
sentence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011030736.5A
Other languages
Chinese (zh)
Inventor
郭垿宏
关雅卓
刘巍
李安新
陈岚
中村一成
藤本拓
池田大志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Docomo Inc
Original Assignee
NTT Docomo Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT Docomo Inc filed Critical NTT Docomo Inc
Priority to CN202011030736.5A priority Critical patent/CN114281927A/en
Priority to JP2021156713A priority patent/JP2022055353A/en
Publication of CN114281927A publication Critical patent/CN114281927A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to the field of text processing, and in particular, to a text processing method, apparatus, device, and computer-readable storage medium. The text processing method comprises the following steps: receiving an original text, one or more keywords contained in the original text and a first processing result, wherein the first processing result is obtained by simplifying the original text; judging whether the first processing result contains all keywords or not; and deleting one or more sentences in the original text under the condition that the first processing result does not contain all keywords until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of the sentences in the original text after deletion is minimum, and taking the combination as a final processing result. The text processing method disclosed by the invention can reduce the processing complexity under the condition of covering all keywords without considering the grammar problem.

Description

Text processing method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of text processing, and in particular, to a text processing method, apparatus, device, and computer-readable storage medium.
Background
Text abstract extraction refers to highly summarizing and abstracting text content with definite meanings to generate an abstract of the text. In the case where the user wants the summary to include all the desired keywords, and the generated summary does not include all the desired keywords, it is common practice to: for each keyword, a sentence containing the keyword is iteratively picked from the original text and then merged with the already generated summary as a new summary. However, this approach makes the complexity greater as the number of desired keywords increases.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a text processing method, apparatus, device, and computer-readable storage medium.
According to an aspect of the present disclosure, there is provided a text processing method including: receiving an original text, one or more keywords contained in the original text and a first processing result, wherein the first processing result is obtained by simplifying the original text; judging whether the first processing result contains all keywords or not; and deleting one or more sentences in the original text under the condition that the first processing result does not contain all keywords until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of the sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
According to an example of the present disclosure, in a case where the first processing result does not contain all keywords, deleting the sentences in the original text until a combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of sentences in the original text after deletion is minimum includes: in the case where the first processing result does not contain all keywords, deleting the sentences in the original text based on the degree of correlation of each sentence of the original text with all the keywords until the combination of the first processing result and the sentences in the deleted original text contains all the keywords and the number of sentences in the deleted original text is minimum.
According to an example of the present disclosure, the deleting of the sentences in the original text based on the degree of relevance of each sentence of the original text to all the keywords comprises: based on the correlation degree of each sentence of the original text and all the keywords, sequencing each sentence of the original text from small to large according to the correlation degree; and deleting each sentence in the original text based on the ranking.
According to an example of the present disclosure, the deleting each sentence in the original text in the order of the degree of relevance from small to large includes: after a first sentence of each sentence in the original text is deleted, judging whether a combination of the first processing result and the deleted sentence in the original text contains all keywords; determining a deletion operation and continuing to process a next sentence of the original text under the condition that the combination of the first processing result and the sentence in the deleted original text contains all keywords; and under the condition that the combination of the first processing result and the sentence in the deleted original text does not contain all keywords, canceling the deletion operation, retaining the first sentence, and continuously processing the next sentence of the original text.
According to an example of the present disclosure, after a sentence in the original text is deleted, before determining whether a combination of the first processing result and the sentence in the original text after deletion contains all keywords, the method further includes: and deleting sentences which do not contain any keyword in the original text in the order of the degree of correlation from small to large.
According to an example of the present disclosure, the degree of relevance of each sentence of the original text to all the keywords is determined based on the number of the one or more keywords contained in each sentence of the original text.
According to another aspect of the present disclosure, there is provided a text processing apparatus including: a receiving unit, configured to receive an original text, one or more keywords included in the original text, and a first processing result, where the first processing result is obtained by simplifying the original text; the judging unit is used for judging whether the first processing result contains all keywords or not; and a deleting unit, configured to delete one or more sentences in the original text when the first processing result does not include all keywords, until a combination of the first processing result and the sentences in the original text after deletion includes all keywords and the number of sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
According to an example of the present disclosure, the deletion unit deletes a sentence in the original text based on a degree of correlation of each sentence of the original text with all keywords in a case where the first processing result does not contain all keywords until a combination of the first processing result and the sentence in the deleted original text contains all keywords and the number of sentences in the deleted original text is minimum.
According to an example of the present disclosure, the deleting unit sorts each sentence of the original text in an order of small relevance to large relevance based on the relevance of each sentence of the original text to all the keywords; and deleting each sentence in the original text based on the ranking.
According to an example of the present disclosure, the deletion unit determines whether a combination of the first processing result and the sentence in the original text after deletion contains all keywords after a first sentence of respective sentences in the original text is deleted; determining a deletion operation and continuing to process a next sentence of the original text under the condition that the combination of the first processing result and the sentence in the deleted original text contains all keywords; and under the condition that the combination of the first processing result and the sentence in the deleted original text does not contain all keywords, canceling the deletion operation, retaining the first sentence, and continuously processing the next sentence of the original text.
According to an example of the present disclosure, the deleting unit is further configured to, after a sentence in the original text is deleted, determine whether a combination of the first processing result and the deleted sentence in the original text contains all keywords, before: and deleting sentences which do not contain any keyword in the original text in the order of the degree of correlation from small to large.
According to still another aspect of the present disclosure, there is provided a text processing apparatus including: a processor; and a memory having computer-readable instructions stored therein, wherein the computer-readable instructions, when executed by the processor, perform a text processing method, the method comprising: receiving an original text, one or more keywords contained in the original text and a first processing result, wherein the first processing result is obtained by simplifying the original text; judging whether the first processing result contains all keywords or not; and deleting one or more sentences in the original text under the condition that the first processing result does not contain all keywords until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of the sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
According to still another aspect of the present disclosure, there is provided a computer-readable storage medium storing a computer-readable program for causing a computer to execute the text processing method according to any one of the above aspects.
In the above-described aspect of the present disclosure, by referring to the first processing result, one or more sentences in the original text are deleted based on the degree of correlation of each sentence of the original text with all keywords until the combination of the first processing result and the sentences in the deleted original text contains all keywords and the number of sentences in the deleted original text is minimum, with the combination as the final processing result, the processing complexity is reduced without considering syntax problems.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
FIG. 1 is a flow diagram of a text processing method according to an embodiment of the present disclosure;
FIG. 2 is a flow diagram of a method of deleting sentences in original text in accordance with an embodiment of the present disclosure;
FIG. 3 is another flow diagram of a method of deleting sentences in original text in accordance with an embodiment of the present disclosure;
FIG. 4 is a block diagram of a text processing method according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an example of a text processing method according to an embodiment of the present disclosure;
FIG. 6 is a functional block diagram of a text processing apparatus according to an embodiment of the present disclosure;
FIG. 7 is a functional block diagram of a text processing device according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present disclosure;
fig. 9 is a diagram illustrating an example of a hardware configuration of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without any creative effort, shall fall within the protection scope of the present disclosure.
Flow charts are used herein to illustrate steps of methods according to embodiments of the present application. It should be understood that the preceding and following steps are not necessarily performed in the exact order in which they are performed. Rather, various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or a certain step or steps may be removed from the processes.
First, a text processing method 100 for implementing an embodiment of the present disclosure is described with reference to fig. 1. The present disclosure reduces processing complexity without considering a syntax problem by referring to a first processing result (e.g., a text digest), deleting one or more sentences in an original text based on the degree of correlation of each sentence of the original text with all keywords until a combination of the first processing result and a sentence in the deleted original text contains all keywords and the number of sentences in the deleted original text is minimum, with the combination as a final processing result.
Embodiments of the present disclosure and examples thereof are described in detail below with reference to the accompanying drawings.
At least one embodiment of the present disclosure provides a text processing method, apparatus, device, and computer-readable storage medium. In the following, the text processing provided according to at least one embodiment of the present disclosure is illustrated in a non-limiting manner by several examples and embodiments, and as described below, different features of these specific examples and embodiments may be combined with each other without mutual conflict, so as to obtain new examples and embodiments, which also belong to the protection scope of the present disclosure.
A text processing method according to an embodiment of the present disclosure is described below with reference to fig. 1 to 5.
First, a text processing method according to an embodiment of the present disclosure is described with reference to fig. 1. The method can be automatically completed by a computer and the like. For example, the method may be applied to text summarization, and the like. For example, the text processing and acquiring method may be implemented in software, hardware, firmware, or any combination thereof, and loaded and executed by a processor in a device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a network server, or the like.
As shown in fig. 1, the text processing method includes the following steps S101 to S103.
In step S101, an original text, one or more keywords contained in the original text, and a first processing result are received.
In step S102, it is determined whether the first processing result includes all keywords.
In step S103, in the case that the first processing result does not contain all keywords, deleting one or more sentences in the original text until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
For step S101, for example, the original text may be text in any language form (such as chinese, english, japanese, etc.), which is not limited herein. For example, a keyword may be one or more words, words or phrases that the user deems important.
For example, the first processing result is one or more sentences obtained by simplifying the original text. As one example, the first processing result may be a text excerpt. For example, the first processing result may be obtained by a text extraction model based on a neural network, for example. The method of obtaining the first processing result may be any suitable method, and is not limited herein.
With respect to step S102, for example, it may be determined whether the first processing result contains all keywords by traversing all sentences of the first processing result for each of one or more keywords. For example, it is possible to decompose all sentences of the first processing result into respective word vectors and convert all keywords into the form of word vectors, and determine whether the first processing result contains all keywords by a neural network-based method. It should be appreciated that the above method for determining whether the first processing result contains all the keywords is not limited thereto, and other suitable methods may be adopted to determine whether the first processing result contains all the keywords, which is not limited herein.
With step S103, for example, in a case where the first processing result does not contain all keywords, the sentence in the original text may be deleted based on the degree of correlation of each sentence of the original text with all the keywords until the combination of the first processing result and the sentence in the deleted original text contains all the keywords and the number of sentences in the deleted original text is minimum.
For example, the degree of relevance of each sentence of the original text to all the keywords is determined based on the number of the one or more keywords included in each sentence of the original text. For example, in the case where sentence a of the original text contains 1 keyword and sentence B contains 3 keywords, it can be considered that sentence B of the original text is more related to all the keywords than sentence a of the original text.
A method of deleting a sentence in an original text according to an embodiment of the present disclosure is described below with reference to fig. 2 to 3.
Fig. 2 shows a flow diagram of a method 200 of deleting sentences in original text according to an embodiment of the present disclosure. For example, as shown in fig. 2, deleting sentences in the original text based on the degree of relevance of each sentence of the original text to all the keywords may include: based on the correlation degree of each sentence of the original text and all the keywords, sequencing each sentence of the original text from small to large in correlation degree (S201); and deleting each sentence in the original text based on the ranking (S202).
For example, in the case of sorting the original text based on the degree of correlation, since sentences of the original text are directly sorted, it is possible to eliminate the consideration of the grammar problem.
Fig. 3 shows another flow diagram of a method 300 of deleting sentences in original text in accordance with an embodiment of the present disclosure. For example, as shown in fig. 3, the deleting the sentences in the original text in the order of the degree of relevance from small to large may include: after a first sentence of each sentence in the original text is deleted, judging whether a combination of the first processing result and the sentence in the original text after deletion contains all keywords (S301); in a case where the combination of the first processing result and the sentence in the original text after deletion contains all the keywords, determining a deletion operation, and continuing to process a next sentence of the original text (S302); and under the condition that the combination of the first processing result and the sentence in the original text after deletion does not contain all the keywords, canceling the deletion operation, retaining the first sentence, and continuously processing the next sentence of the original text (S303).
For example, assuming that the received set of keywords is { m, n, p, q }, the received first processing result is G (G may comprise one or more sentences), and the original text sorted from small to large according to the degree of relevance of each sentence (A, B, C, D, E, F) of the original text to all the keywords is BDFACE, the text processing method according to fig. 3 may include: after the sentence B is deleted, judging whether the combined GDFACE of the G and the sentence DFACE of the deleted original text contains all keywords { m, n, p, q }; in the case where the GDFACE contains all the keywords { m, n, p, q }, an operation of deleting the sentence B (i.e., deleting the sentence B from the original text) is determined, and the next sentence D of the original text is continuously processed according to step S301 until the combination of the first processing result G and the sentence in the original text after deletion contains all the keywords { m, n, p, q }, and the number of sentences in the original text after deletion is minimum, and the combination is taken as a final processing result. On the other hand, in the case where the GDFACE does not contain all the keywords { m, n, p, q }, the operation of deleting the sentence B is cancelled, and the sentence B is retained in the original text, and the next sentence D of the original text is continuously processed according to step S301 until the combination of the first processing result G and the sentence in the original text after deletion contains all the keywords { m, n, p, q }, and the number of sentences in the original text after deletion is minimum, and the combination is taken as the final processing result.
Alternatively, after the first sentence in the original text is deleted, before determining whether the combination of the first processing result and the deleted sentence in the original text contains all keywords, the method may further include: and deleting sentences which do not contain any keyword in the original text in the order of the degree of correlation from small to large. In this process, the sentence that does not include any keyword in the original text is deleted, and then the remaining sentences that include one or more keywords in the original text are subjected to the processes of steps S301 to S303, so that the complexity of the process can be reduced.
Fig. 4 shows a block diagram 400 of a text processing method of an embodiment of the disclosure. As shown in fig. 4, the text processing method of the present disclosure mainly includes the following steps: receiving an original text, one or more keywords contained in the original text, and a first processing result (S401); judging whether the first processing result contains all keywords (S402); if the first processing result includes all keywords, taking the first processing result as a final processing result (S403); and in the case that the first processing result does not contain all keywords, sorting each sentence of the original text in the order of small to large degrees of relevance based on the degrees of relevance of each sentence of the original text and all keywords, and deleting each sentence in the original text based on the sorting (S404). Next, after the first sentence of each sentence in the original text is deleted, it is determined whether or not the combination of the first processing result and the sentence in the original text after deletion contains all keywords (S405). In the case where the combination of the first processing result and the sentence in the original text after deletion contains all the keywords, the deletion operation is determined, and the next sentence of the original text is continued to be processed in accordance with the steps of S404-S405 (S406) until the combination of the first processing result and the sentence in the original text after deletion contains all the keywords and the number of sentences in the original text after deletion is minimum (S408), and the combination is taken as the final processing result (S409). On the other hand, in the case where the combination of the first processing result and the sentence in the original text after deletion does not contain all the keywords, the deletion operation is cancelled and the first sentence is retained, and the next sentence in the original text is continued to be processed in accordance with the steps of S404 to S405 (S406) until the combination of the first processing result and the sentence in the original text after deletion contains all the keywords and the number of sentences in the original text after deletion is minimum (S408), and the combination is taken as the final processing result (S409).
An example of a text processing method according to an embodiment of the present disclosure is described below with reference to fig. 5. As shown in fig. 5, an original text 50, a plurality of keywords 52, and a first processing result (e.g., a summary 51 generated from the original text 50 using an existing text extraction model or the like) are first received. As can be seen from fig. 5, in the case where the model-generated digest 51 does not contain all keywords (the lack of keywords "what is considered), a new digest 53 containing all keywords 52 and the model-generated digest 51 can be obtained by the method of the present disclosure as a final processing result. It can be seen that the final processing result is based on the model-generated abstract 51 as a reference, gradually deleting sentences in the original text 50 based on the idea of "reduction", and combining the deleted sentences in the original text (for example, after 1500 years of the ancient olympic sports meeting in fig. 5, a french man has given a proposal for holding the modern olympic sports meeting at the end of 19 th century) with the model-generated abstract 51 as the final processing result (the processed abstract 53 in fig. 5), so that the final processing result contains all keywords, there is no repetition between each sentence of the final processing result, and the number of contained sentences is minimal compared with the combination of the model-generated abstract 51 and other sentences of the original text. In addition, the above method of the present disclosure does not consider the number of keywords and the syntax problem between sentences, thereby reducing the computational complexity.
The method and the device are based on the idea of 'reduction', the abstract and the original text are combined integrally, and then the sentences in the original text are deleted by referring to the abstract until a sentence set which is minimum in number and contains all keywords is generated, so that the calculation complexity is reduced.
In the above, the text processing method according to the embodiment of the present disclosure is described with reference to the drawings. Hereinafter, a text processing apparatus according to an embodiment of the present disclosure will be described.
Fig. 6 is a functional block diagram illustrating a text processing apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the text processing apparatus 1000 according to the embodiment of the present disclosure includes a receiving unit 1010, a judging unit 1020, and a deleting unit 1030. The above-described modules may respectively perform the steps of the text processing method according to the embodiment of the present disclosure as described above with reference to fig. 1 to 5. Those skilled in the art understand that: these unit modules may be implemented in various ways by hardware alone, by software alone, or by a combination thereof, and the present disclosure is not limited to any one of them. These units may be implemented, for example, by a Central Processing Unit (CPU), a text processor (GPU), a Tensor Processor (TPU), a Field Programmable Gate Array (FPGA) or other form of processing unit having data processing and/or instruction execution capabilities and corresponding computer instructions.
For example, the receiving unit 1010 may be configured to receive an original text, one or more keywords included in the original text, and a first processing result, where the first processing result is obtained by simplifying the original text.
For example, the first processing result is one or more sentences obtained by simplifying the original text. As one example, the first processing result may be a text excerpt. For example, the first processing result may be obtained by a text extraction model based on a neural network, for example. The method of obtaining the first processing result may be any suitable method, and is not limited herein.
For example, the judging unit 1020 may be configured to judge whether the first processing result contains all keywords.
For example, the determining unit 1020 may determine whether the first processing result contains all keywords by traversing all sentences of the first processing result for each of the one or more keywords. For example, whether the first processing result contains all keywords may be determined by a neural network-based method. It should be appreciated that the method for the above-mentioned judging unit 1020 to judge whether the first processing result contains all the keywords is not limited thereto, and the judging unit 1020 may adopt other suitable methods to judge whether the first processing result contains all the keywords, which is not limited herein.
For example, the deleting unit 1030 may be configured to delete one or more sentences in the original text in a case where the first processing result does not include all keywords, until a combination of the first processing result and the sentences in the original text after deletion includes all keywords and the number of sentences in the original text after deletion is minimum, and take the combination as a final processing result.
For example, in a case where the first processing result does not contain all keywords, the deletion unit 1030 may delete a sentence in the original text based on the degree of correlation of each sentence of the original text with all the keywords until the combination of the first processing result and the sentence in the deleted original text contains all the keywords and the number of sentences in the deleted original text is minimum.
For example, the degree of relevance of each sentence of the original text to all the keywords is determined based on the number of the one or more keywords included in each sentence of the original text.
For example, the deleting unit 1030 may sort each sentence of the original text in an order of small to large degrees of relevance based on the degrees of relevance of each sentence of the original text to all the keywords; and deleting each sentence in the original text based on the ranking.
For example, the deleting unit 1030 may determine whether a combination of the first processing result and the sentence in the original text after deletion contains all keywords after a first sentence of each sentence in the original text is deleted; determining a deletion operation and continuing to process a next sentence of the original text under the condition that the combination of the first processing result and the sentence in the deleted original text contains all keywords; and under the condition that the combination of the first processing result and the sentence in the deleted original text does not contain all keywords, canceling the deletion operation, retaining the first sentence, and continuously processing the next sentence of the original text.
Alternatively, the deleting unit 1030 may delete the sentences not including any keyword in the original text in the order of the degree of correlation from small to large before determining whether the combination of the first processing result and the deleted sentences in the original text includes all keywords after a sentence in the original text is deleted. In this processing, the deleting unit 1030 deletes the sentence that does not include any keyword in the original text, and then performs the above processing on the remaining sentences that include one or more keywords in the original text, which can reduce the complexity of the processing.
Next, a text processing apparatus 1100 according to an embodiment of the present disclosure is described with reference to fig. 7. FIG. 7 is a schematic diagram of a text processing device according to an embodiment of the present disclosure. Since the function of the text processing apparatus of the present embodiment is the same as the details of the method described hereinabove with reference to fig. 1, a detailed description of the same is omitted here for the sake of simplicity.
The text processing apparatus of the present disclosure includes a processor 1102; and a memory 1101 in which computer readable instructions are stored, wherein when the computer readable instructions are executed by the processor, a text processing method is performed, the method comprising: receiving an original text, one or more keywords contained in the original text and a first processing result, wherein the first processing result is obtained by simplifying the original text; judging whether the first processing result contains all keywords or not; and deleting one or more sentences in the original text under the condition that the first processing result does not contain all keywords until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of the sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
For technical effects of the text processing apparatus 1000 and the text processing device 1100 in different embodiments, reference may be made to technical effects of the text processing method provided in the embodiments of the present disclosure, which are not described herein again.
The text processing apparatus 1000 and the text processing device 1100 may be used for various appropriate electronic devices.
Fig. 8 is a schematic diagram of a computer-readable storage medium 1200 according to an embodiment of the present disclosure.
As shown in fig. 8, the present disclosure also includes a computer-readable storage medium 1200 having stored thereon computer-readable instructions 1201 which, when executed by a computer, the computer performs a text processing method comprising: receiving an original text, one or more keywords contained in the original text and a first processing result, wherein the first processing result is obtained by simplifying the original text; judging whether the first processing result contains all keywords or not; and deleting one or more sentences in the original text under the condition that the first processing result does not contain all keywords until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of the sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
< hardware Structure >
The block diagrams used in the description of the above embodiments show blocks in units of functions. These functional blocks (structural units) are implemented by any combination of hardware and/or software. Note that the means for implementing each functional block is not particularly limited. That is, each functional block may be implemented by one apparatus which is physically and/or logically combined, or may be implemented by a plurality of apparatuses which are directly and/or indirectly (for example, by wire and/or wirelessly) connected by two or more apparatuses which are physically and/or logically separated.
For example, an electronic device in one embodiment of the present disclosure may function as a computer that executes processing of the attribute identification method of the present disclosure. Fig. 9 is a diagram showing an example of a hardware configuration of an electronic device according to an embodiment of the present disclosure. The electronic apparatus 10 described above may be configured as a computer device physically including a processor 1001, a memory 1002, a storage 1003, a communication device 1004, an input device 1005, an output device 1006, a bus 1007, and the like.
In the following description, the words "device" or the like may be replaced with circuits, devices, units, or the like. The hardware structure of the electronic device 10 may include one or more of the devices shown in the drawings, or may not include some of the devices.
For example, the processor 1001 is illustrated as only one, but may be a plurality of processors. The processing may be executed by one processor, or may be executed by one or more processors at the same time, sequentially, or by other methods. In addition, the processor 1001 may be mounted by one or more chips.
The functions in the electronic device 10 are realized, for example, as follows: by reading predetermined software (program) into hardware such as the processor 1001 and the memory 1002, the processor 1001 performs an operation to control communication by the communication device 1004 and to control reading and/or writing of data in the memory 1002 and the storage 1003.
The processor 1001 controls the entire computer by operating an operating system, for example. The processor 1001 may be configured by a Central Processing Unit (CPU) including an interface with a peripheral device, a control device, an arithmetic device, a register, and the like.
Further, the processor 1001 reads out a program (program code), a software module, data, and the like from the memory 1003 and/or the communication device 1004 to the memory 1002, and executes various processes according to them. As the program, a program that causes a computer to execute at least a part of the operations described in the above embodiments may be used. For example, the control unit 401 of the electronic device 10 may be realized by a control program stored in the memory 1002 and operated by the processor 1001, and may be similarly realized by other functional blocks.
The Memory 1002 is a computer-readable recording medium, and may be configured by at least one of a Read Only Memory (ROM), a Programmable Read Only Memory (EPROM), an Electrically Programmable Read Only Memory (EEPROM), a Random Access Memory (RAM), and other suitable storage media. Memory 1002 may also be referred to as registers, cache, main memory (primary storage), etc. The memory 1002 may store an executable program (program code), a software module, and the like for implementing the wireless communication method according to one embodiment of the present disclosure.
The memory 1003 is a computer-readable recording medium, and may be configured by at least one of a flexible disk (floppy disk), a floppy (registered trademark) disk (floppy disk), a magneto-optical disk (for example, a compact Disc read only memory (CD-rom), etc.), a digital versatile Disc, a Blu-ray (registered trademark) Disc), a removable disk, a hard disk drive, a smart card, a flash memory device (for example, a card, a stick, a key driver), a magnetic stripe, a database, a server, and other suitable storage media. The memory 1003 may also be referred to as a secondary storage device.
The communication device 1004 is hardware (transmission/reception device) for performing communication between computers via a wired and/or wireless network, and is also referred to as a network device, a network controller, a network card, a communication module, or the like.
The input device 1005 is an input device (for example, a keyboard, a mouse, a microphone, a switch, a button, a sensor, and the like) that accepts input from the outside. The output device 1006 is an output device (for example, a display, a speaker, a Light Emitting Diode (LED) lamp, or the like) that outputs to the outside. The input device 1005 and the output device 1006 may be integrated (e.g., a touch panel).
The respective devices such as the processor 1001 and the memory 1002 are connected by a bus 1007 for communicating information. The bus 1007 may be constituted by a single bus or may be constituted by buses different among devices.
In addition, the electronic Device 10 may include hardware such as a microprocessor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), and the like, and a part or all of each functional block may be implemented by the hardware. For example, the processor 1001 may be installed through at least one of these hardware.
Software, whether referred to as software, firmware, middleware, microcode, hardware description language, or by other names, is to be broadly construed to refer to commands, command sets, code segments, program code, programs, subroutines, software modules, applications, software packages, routines, subroutines, objects, executables, threads of execution, steps, functions, and the like.
Further, software, commands, information, and the like may be transmitted or received via a transmission medium. For example, when the software is transmitted from a website, server, or other remote source using a wired technology (e.g., coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL, microwave, etc.) and/or a wireless technology (e.g., infrared, microwave, etc.), the wired technology and/or wireless technology are included in the definition of transmission medium.
The embodiments and modes described in this specification may be used alone or in combination, or may be switched during execution. Note that, as long as there is no contradiction between the processing steps, sequences, flowcharts, and the like of the embodiments and the embodiments described in the present specification, the order may be changed. For example, with respect to the methods described in this specification, various elements of steps are presented in an exemplary order and are not limited to the particular order presented.
The term "according to" used in the present specification does not mean "according only" unless explicitly stated in other paragraphs. In other words, the statement "according to" means both "according to only" and "according to at least".
Any reference to elements using the designations "first", "second", etc. used in this specification is not intended to be a comprehensive limitation on the number or order of such elements. These names may be used in this specification as a convenient way to distinguish between two or more elements. Thus, references to a first unit and a second unit do not imply that only two units may be employed or that the first unit must precede the second unit in several ways.
When the terms "including", "including" and "comprising" and variations thereof are used in the present specification or claims, these terms are open-ended as in the term "including". Further, the term "or" as used in the specification or claims is not exclusive or.
Those skilled in the art will appreciate that aspects of the present application may be illustrated and described in terms of several patentable species or situations, including any new and useful combination of processes, machines, manufacture, or materials, or any new and useful improvement thereof. Accordingly, various aspects of the present application may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software. The above hardware or software may be referred to as "data block," module, "" engine, "" unit, "" component, "or" system. Furthermore, aspects of the present application may be represented as a computer product, including computer readable program code, embodied in one or more computer readable media.
This application uses specific words to describe embodiments of the application. Reference throughout this specification to "one embodiment," "an embodiment," and/or "some embodiments" means that a particular feature, structure, or characteristic described in connection with at least one embodiment of the present application is included in at least one embodiment of the present application. Therefore, it is emphasized and should be appreciated that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, some features, structures, or characteristics of one or more embodiments of the present application may be combined as appropriate.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
While the present disclosure has been described in detail above, it will be apparent to those skilled in the art that the present disclosure is not limited to the embodiments described in the present specification. The present disclosure can be implemented as modifications and variations without departing from the spirit and scope of the present disclosure defined by the claims. Accordingly, the description of the present specification is for the purpose of illustration and is not intended to be in any way limiting of the present disclosure.

Claims (9)

1. A method of text processing, the method comprising:
receiving an original text, one or more keywords contained in the original text and a first processing result, wherein the first processing result is obtained by simplifying the original text;
judging whether the first processing result contains all keywords or not; and
and deleting one or more sentences in the original text under the condition that the first processing result does not contain all keywords until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of the sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
2. The text processing method according to claim 1, wherein, in a case where the first processing result does not contain all keywords, deleting the sentences in the original text until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of sentences in the original text after deletion is minimum comprises:
in the case where the first processing result does not contain all keywords, deleting the sentences in the original text based on the degree of correlation of each sentence of the original text with all the keywords until the combination of the first processing result and the sentences in the deleted original text contains all the keywords and the number of sentences in the deleted original text is minimum.
3. The text processing method according to claim 2, wherein said deleting sentences in the original text based on the degree of correlation of each sentence of the original text with all the keywords comprises:
based on the correlation degree of each sentence of the original text and all the keywords, sequencing each sentence of the original text from small to large according to the correlation degree; and
based on the ranking, deleting each sentence in the original text.
4. The text processing method according to claim 3, wherein said deleting the respective sentences in the original text in order of the degree of correlation from small to large comprises:
after a first sentence of each sentence in the original text is deleted, judging whether a combination of the first processing result and the deleted sentence in the original text contains all keywords;
determining a deletion operation and continuing to process a next sentence of the original text under the condition that the combination of the first processing result and the sentence in the deleted original text contains all keywords; and
and under the condition that the combination of the first processing result and the sentence in the deleted original text does not contain all keywords, canceling the deletion operation, retaining the first sentence, and continuously processing the next sentence of the original text.
5. The text processing method according to claim 4, wherein, after a sentence in the original text is deleted, before determining whether a combination of the first processing result and the deleted sentence in the original text contains all keywords, further comprising:
and deleting sentences which do not contain any keyword in the original text in the order of the degree of correlation from small to large.
6. The text processing method according to any one of claims 2 to 5, wherein the degree of correlation of each sentence of the original text with the all keywords is determined based on the number of the one or more keywords included in each sentence of the original text.
7. A text processing apparatus comprising:
a receiving unit, configured to receive an original text, one or more keywords included in the original text, and a first processing result, where the first processing result is obtained by simplifying the original text;
the judging unit is used for judging whether the first processing result contains all keywords or not; and
and a deleting unit, configured to delete one or more sentences in the original text when the first processing result does not include all keywords, until a combination of the first processing result and the sentences in the deleted original text includes all keywords and the number of sentences in the deleted original text is minimum, and taking the combination as a final processing result.
8. A text processing apparatus comprising:
a processor; and
a memory having stored therein computer-readable instructions,
wherein the computer readable instructions, when executed by the processor, perform a text processing method, the method comprising:
receiving an original text, one or more keywords contained in the original text and a first processing result, wherein the first processing result is obtained by simplifying the original text;
judging whether the first processing result contains all keywords or not; and
and deleting one or more sentences in the original text under the condition that the first processing result does not contain all keywords until the combination of the first processing result and the sentences in the original text after deletion contains all keywords and the number of the sentences in the original text after deletion is minimum, and taking the combination as a final processing result.
9. A computer-readable storage medium storing a computer-readable program for causing a computer to execute the text processing method according to any one of claims 1 to 6.
CN202011030736.5A 2020-09-27 2020-09-27 Text processing method, device, equipment and computer readable storage medium Pending CN114281927A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011030736.5A CN114281927A (en) 2020-09-27 2020-09-27 Text processing method, device, equipment and computer readable storage medium
JP2021156713A JP2022055353A (en) 2020-09-27 2021-09-27 Text processing method, device, apparatus, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011030736.5A CN114281927A (en) 2020-09-27 2020-09-27 Text processing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114281927A true CN114281927A (en) 2022-04-05

Family

ID=80867620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011030736.5A Pending CN114281927A (en) 2020-09-27 2020-09-27 Text processing method, device, equipment and computer readable storage medium

Country Status (2)

Country Link
JP (1) JP2022055353A (en)
CN (1) CN114281927A (en)

Also Published As

Publication number Publication date
JP2022055353A (en) 2022-04-07

Similar Documents

Publication Publication Date Title
CN108549538B (en) Code detection method and device, storage medium and test terminal
US20210286949A1 (en) Dialogue system
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
US12026604B2 (en) Memory pre-allocation for forward calculation in a neural network
US20210312919A1 (en) Conversation device
TW201716987A (en) Audio input of field entries
CN108628911A (en) It is predicted for expression input by user
JP6976448B2 (en) Machine translation controller
US20200004784A1 (en) Index generation method, data retrieval method, apparatus of index generation
CN114281927A (en) Text processing method, device, equipment and computer readable storage medium
CN115983262A (en) Text sensitive information identification method and device, storage medium and electronic equipment
JP7216199B2 (en) dialogue system
JP7477359B2 (en) Writing device
JP7320058B2 (en) dialogue system
JP6911191B2 (en) Function execution instruction system
JP2022055334A (en) Text processing method, apparatus, device and computer-readable storage medium
US11468106B2 (en) Conversation system
JP6976447B2 (en) Machine translation controller
JP7339148B2 (en) Search support device
JPWO2019187463A1 (en) Dialogue server
US20230015324A1 (en) Retrieval device
CN108733814B (en) Search engine preloading method and device, storage medium and terminal
US20230047337A1 (en) Analysis device
US20230214394A1 (en) Data search method and apparatus, electronic device and storage medium
KR20070097660A (en) Method for managing multimedia files though using the structured query language in a mobile communication terminal

Legal Events

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