4. The computer implemented method according to claim 1 , further comprising: processing the electronic document to identify text rectangles therein; and generating a text rectangle dataset for the electronic document, the text rectangle dataset storing text rectangle details in respect of each identified text rectangle, the text rectangle details for a given text rectangle comprising positional details defining a position of the text rectangle in the electronic document; and wherein: determining whether the electronic document has one or more text rectangles in a potential position of the canonical feature comprises searching the text rectangle data set.
1. A computer implemented method for processing an electronic document, the method comprising: receiving the electronic document; generating an initial codification of the electronic document, the initial codification of the electronic document comprising a plurality of canonical feature codifications, each canonical feature codification comprising a plurality of attribute values describing attributes of the canonical feature as it appears in the electronic document; accessing a reference set of reference document codifications; for each reference document codification in the reference set, determining a similarity between the reference document codification and the initial codification of the electronic document; generating a comparison set of reference document codifications by including at most a threshold number of reference document codifications that are determined to be the most similar to the initial codification of the electronic document, each reference document codification in the comparison set comprising a plurality of canonical feature codifications, each canonical feature codification comprising a plurality of attribute values describing a position of the canonical feature in the reference document; processing each canonical feature codification in each reference document codification in the comparison set by: determining whether the electronic document has one or more text rectangles in a potential position of the canonical feature, the potential position of the canonical feature defined with reference to the attribute values of the canonical feature in the canonical feature codification; and in response determining that the electronic document has one or more text rectangles in a potential position of the canonical feature, recording a preliminary association between the text rectangle and the canonical feature; and for each text rectangle preliminarily associated with one or more canonical features, determining a final canonical feature assignment for the text rectangle, the final canonical feature assignment being determined based on the one or more canonical features preliminarily associated with the text rectangle.