Method and system for motif extraction in electronic documents
First Claim
Patent Images
1. A method for extracting one or more text motifs from one or more electronic documents, the method comprising:
- receiving, by a processor, a first text block from a user, wherein the first text block corresponds to at least one of a largest-maximal repeat (LMR) or a super-maximal repeat (SMR);
receiving, by the processor via an input device coupled to the processor, an array of repeats, wherein the array of repeats comprises a list of repeats of one or more text blocks occurring at one or more positions in the one or more electronic documents;
detecting, by the processor, one or more occurrences of the first text block in the one or more electronic documents based on the array of repeats;
identifying, in the one or more electronic documents by the processor, a second text block in vicinity of an occurrence of the first text block based on a pre-defined set of parameters, such that the second text block and the first text block are repeated together at least two times in the one or more electronic documents, wherein the pre-defined set of parameters comprises a maximum number of text blocks in the one or more text motifs;
determining, by the processor, the one or more text motifs in the one or more electronic documents, wherein each of the one or more text motifs is a combination of the first text block and the second text block;
checking, by the processor, for extension of the one or more text motifs if a number of text blocks in the one or more text motifs is less than the maximum number of text blocks in the one or more text motifs, wherein the checking for extension further comprises using the one or more text motifs as a new text block and repeating the identifying and determining steps for the new text block until the maximum number of text blocks is reached;
extracting, by the processor, the one or more text motifs from each of the one or more electronic documents; and
creating, by the processor, a template by collating the one or more extracted text motifs.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, system, and computer program product for extracting text motifs from the electronic documents is disclosed. A user provides a largest-maximal repeat or a super-maximal repeat as a first text block. The occurrences of the first text block are detected to identify the second text blocks in the vicinity of the occurrences of the first text block on the basis of pre-defined parameters. The text motifs are determined by combining the first text block and the second text block. Finally, the text motifs are extracted from the electronic documents.
38 Citations
13 Claims
-
1. A method for extracting one or more text motifs from one or more electronic documents, the method comprising:
-
receiving, by a processor, a first text block from a user, wherein the first text block corresponds to at least one of a largest-maximal repeat (LMR) or a super-maximal repeat (SMR); receiving, by the processor via an input device coupled to the processor, an array of repeats, wherein the array of repeats comprises a list of repeats of one or more text blocks occurring at one or more positions in the one or more electronic documents; detecting, by the processor, one or more occurrences of the first text block in the one or more electronic documents based on the array of repeats; identifying, in the one or more electronic documents by the processor, a second text block in vicinity of an occurrence of the first text block based on a pre-defined set of parameters, such that the second text block and the first text block are repeated together at least two times in the one or more electronic documents, wherein the pre-defined set of parameters comprises a maximum number of text blocks in the one or more text motifs; determining, by the processor, the one or more text motifs in the one or more electronic documents, wherein each of the one or more text motifs is a combination of the first text block and the second text block; checking, by the processor, for extension of the one or more text motifs if a number of text blocks in the one or more text motifs is less than the maximum number of text blocks in the one or more text motifs, wherein the checking for extension further comprises using the one or more text motifs as a new text block and repeating the identifying and determining steps for the new text block until the maximum number of text blocks is reached; extracting, by the processor, the one or more text motifs from each of the one or more electronic documents; and creating, by the processor, a template by collating the one or more extracted text motifs. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for removing boilerplate text in one or more electronic documents, the method comprising:
-
receiving, by a processor via an input device coupled to the processor, a first text block from a user, wherein the first text block corresponds to at least one of a largest-maximal repeat (LMR) or a super-maximal repeat (SMR); receiving, by the processor, an array of repeats, wherein the array of repeats comprises a list of repeats of one or more text blocks occurring at one or more positions in the one or more electronic documents; detecting, by the processor, one or more occurrences of the first text block in the one or more electronic documents based on the array of repeats; identifying, in the one or more electronic documents by the processor, a second text block in vicinity of an occurrence of the first text block based on a maximum length of a gap between the first text block and the second text block, such that the second text block and the first text block are repeated together, at least two times in the one or more electronic documents; determining, by the processor, one or more text motifs in the one or more electronic documents, wherein each of the one or more text motifs is a combination of the first text block and the second text block; checking, by the processor, for extension of the one or more text motifs if a number of text blocks in the one or more text motifs is less than a maximum number of text blocks in the one or more text motifs, wherein the checking for extension further comprises using the one or more text motifs as a new text block and repeating the identifying, and determining steps for the new text block until the maximum number of text blocks is reached; removing, by the processor, the one or more text motifs from each of the one or more electronic documents; and creating, by the processor, a template by collating the one or more extracted text motifs. - View Dependent Claims (9)
-
-
10. A system for extracting one or more text motifs from one or more electronic documents, the system comprising:
-
a processor configured to; detect one or more occurrences of a first text block in the one or more electronic documents, wherein the first text block corresponds to at least one of a largest-maximal repeat (LMR) or a super-maximal repeat (SMR) based on an array of repeats, wherein the array of repeats comprises a list of repeats of one or more text blocks occurring at one or more positions in the one or more electronic documents, the list of repeats being received at the processor via an input device; identify, in the one or more electronic documents, a second text block in vicinity of an occurrence of the first text block based on a maximum length of a gap between the first text block and the second text block, such that the second text block and the first text block are repeated together, at least two times in the one or more electronic documents; determine one or more text motifs in the one or more electronic documents, wherein each of the one or more text motifs is a combination of the first text block and the second text block; check for extension of the one or more text motifs if a number of text blocks in the one or more text motifs is less than a maximum number of text blocks in the one or more text motifs, wherein the check further comprises using the one or more text motifs as a new text block and repeating the identifying, and determining steps for the new text block until the maximum number of text blocks is reached; extract the one or more text motifs from each of the one or more electronic documents; and create a template by collating the one or more extracted text motifs. - View Dependent Claims (11, 12)
-
-
13. A non-transitory computer program product for use with a computer, the non-transitory computer program product comprising a computer readable program code embodied therein for extracting one or more text motifs in a one or more electronic documents, the computer readable program code is executable by a processor to:
-
receive a first text block from a user via an input device, wherein the first text block corresponds to at least one of a largest-maximal repeat (LMR) or a super-maximal repeat (SMR); receive an array of repeats via the input device, wherein the array of repeats comprises a list of repeats of one or more text blocks occurring at one or more positions in the one or more electronic documents; detect one or more occurrences of the first text block in the one or more electronic documents based on the array of repeats; identify, in the one or more electronic documents, a second text block in vicinity of an occurrence of the first text block based on a pre-defined set of parameters, such that the second text block and the first text block are repeated together in the one or more electronic documents, wherein the pre-defined set of parameters comprises a maximum number of text blocks in the one or more text motifs; determine the one or more text motifs in the one or more electronic documents, wherein each of the one or more text motifs is a combination of the first text block and the second text block; check for extension of the one or more text motifs if a number of text blocks in the one or more text motifs is less than the maximum number of text blocks in the one or more text motifs, wherein the checking for extension further comprises using the one or more text motifs as a new text block and repeating the identifying and determining steps for the new text block until the maximum number of text blocks is reached; extract the one or more text motifs from each of the one or more electronic documents; and create a template by collating the one or more extracted text motifs.
-
Specification