Patent ID: 11934765
Assignee: ZHUHAI KINGSOFT OFFICE SOFTWARE CO., LTD
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A method for aligning elements in a document, the method comprising:
obtaining elements contained in the document;
assigning the elements into groups;
obtaining an inter-group alignment manner between the groups, and obtaining a respective intra-group alignment manner for elements in each of the groups; and
aligning the groups based on the inter-group alignment manner, and aligning the elements in each of the groups based on the corresponding intra-group alignment manner,
wherein, assigning the elements into groups comprises:
determining position regions, in which the elements are located, in the document; and
determining position regions overlapping in the determined position regions as one position region group,
wherein when a number of position regions in each of a plurality of position region groups is the same, the elements corresponding to the position regions in each of the plurality of position region groups are assigned into one group; when a number of position regions in a position region group is different from that in other position region groups of the plurality of position region groups, the elements corresponding to the position regions in the position region group are not assigned into one group,
wherein assigning the elements into groups further comprises:
determining an attribute of each of the elements;
obtaining distribution of the attributes of the elements based on distribution of the elements in the document, and determining a distribution rule for the attributes of the elements in the document based on the distribution of the attributes of the elements; and
assigning the elements based on the distribution rule,
wherein the distribution rule is obtained by performing calculation on the distribution of the attributes of the elements in the document based on a rule algorithm.