9. A method for reformatting a set of target paragraphs with a format pattern of a set of sample paragraphs, the method comprising: generating a sample combination by dividing the set of sample paragraphs into sample groups according to their order and format pattern, each sample group includes adjacent sample paragraphs of the same format pattern; determining a plurality of all possible combinations of the set of target paragraphs and the sample groups, wherein each of the target paragraphs is assigned to only one sample group for each possible combination; calculating a degree of similarity between the sample combination and each of the possible combinations, the degree of similarity is the sum of the number of operations of removing a target paragraph from a sample group for each of the possible combinations and the number of operations of adding a target paragraph to a sample group for each of the possible combinations in order for each of the possible combination to match the sample combination; selecting two or more preferred combinations from the plurality of possible combinations based on the degree of similarity between the sample combination and each of the possible combinations, wherein the two or more preferred combinations comprises the smallest degree of similarity; selecting a matching combination from the two or more preferred candidate combinations, the single matching combination having the same combination of target paragraphs and sample groups as the sample combination; and applying the format pattern of the set of sample paragraphs to the set of target paragraphs based on the single matching combination.
9. A method for reformatting a set of target paragraphs with a format pattern of a set of sample paragraphs, the method comprising: generating a sample combination by dividing the set of sample paragraphs into sample groups according to their order and format pattern, each sample group includes adjacent sample paragraphs of the same format pattern; determining a plurality of all possible combinations of the set of target paragraphs and the sample groups, wherein each of the target paragraphs is assigned to only one sample group for each possible combination; calculating a degree of similarity between the sample combination and each of the possible combinations, the degree of similarity is the sum of the number of operations of removing a target paragraph from a sample group for each of the possible combinations and the number of operations of adding a target paragraph to a sample group for each of the possible combinations in order for each of the possible combination to match the sample combination; selecting two or more preferred combinations from the plurality of possible combinations based on the degree of similarity between the sample combination and each of the possible combinations, wherein the two or more preferred combinations comprises the smallest degree of similarity; selecting a matching combination from the two or more preferred candidate combinations, the single matching combination having the same combination of target paragraphs and sample groups as the sample combination; and applying the format pattern of the set of sample paragraphs to the set of target paragraphs based on the single matching combination. 12. The method of claim 9 , further comprising: comparing a positional relationship between the sample paragraphs to a positional relationship between the target paragraphs.