A non-transitory computer-readable medium having a plurality of computer-executable instructions which, when executed by a processor, perform a method for efficiently learning new forms in an electronic document preparation system, the instructions comprising:
- an interface module configured to receive form data representing to a new form having a plurality of data fields;
- a data acquisition module configured to gather training set data related to previously filled forms, each previously filled form having completed data fields that each correspond to a respective data field of the new form;
- a grouping module configured to generate, for each selected data field of the new form, grouping data by forming a plurality of groups from the training set data based on respective categories and assigning each of a plurality of the previously filled forms to a respective one of the groups;
- a sampling module configured to generate, for each selected data field of the new form, sampling data by selecting one or more previously filled forms from each group of the grouping data associated with the selected data field;
- a machine learning module configured to generate, for each selected data field, candidate function data relating to a plurality of candidate functions, to generate, for each selected data field, test data by applying the candidate functions to the training set data in accordance with the sampling data, and to identify, for each selected data field, an acceptable function from the plurality of candidate functions based on a how closely the test data matches the candidate function data.