Document template generation
Techniques are disclosed for using a machine learning model to generate document templates from input templates. For example, a computing system receives an input document. A machine learning model of the computing system processes the input document to identify one or more text items corresponding to respective variable field types of the plurality of variable field types. The computing system creates, for each text item of the one or more text items, a variable field for the variable field type of the plurality of variable field types corresponding to the text item and creates, for each variable field of the one or more created variable fields, a mapping for the variable field to a corresponding data source. The computing system generates, based on the input document, a document template comprising the one or more created variable fields and the respective one or more mappings.
1 . A computing system comprising processing circuitry having access to a memory, the processing circuitry configured to:
receive an electronic input document;
process, with a machine learning model, the electronic input document to identify one or more first text items corresponding to respective variable field types of a plurality of variable field types, wherein the machine learning model is trained, with a plurality of labeled electronic documents, to identify, in document text, text that corresponds to any of the plurality of variable field types, wherein each of the plurality of labeled electronic documents includes one or more second text items labeled with a corresponding variable field type of the plurality of variable field types;
for each text item of the one or more first text items identified within the electronic input document, create a variable field for the variable field type of the plurality of variable field types corresponding to the text item;
for each variable field of the one or more created variable fields, create a mapping for the variable field to a corresponding electronic data source;
generate, based on the electronic input document, an electronic document template comprising at least a portion of document text of the electronic input document, the one or more created variable fields and, for each variable field of the one or more created variable fields, the mapping for the variable field to the corresponding electronic data source, wherein the mapping comprises data identifying the corresponding electronic data source; and
parameterize, based on the corresponding mapping, each variable field of the one or more created variable fields of the electronic document template with data from the corresponding electronic data source to generate an electronic output document.
2 . The computing system of claim 1 , wherein the electronic output document comprises the at least a portion of document text of the electronic input document.
3 . The computing system of claim 2 , wherein the data from the corresponding electronic data source comprises text.
4 . The computing system of claim 1 , wherein to generate, based on the electronic input document, the electronic document template, the processing circuitry is configured to:
for each text item of the one or more first text items identified within the electronic input document, replace the text item within the electronic input document with the corresponding variable field of the one or more created variable fields.
5 . The computing system of claim 1 , wherein the at least a portion of document text of the electronic input document does not correspond to any of the plurality of variable field types.
6 . The computing system of claim 1 , wherein the plurality of variable field types comprise one or more of an agreement field, a clause, or an obligation.
7 . The computing system of claim 1 ,
wherein the plurality of variable field types comprise one or more of a name, an address, a state of governing law, a payment term, an effective date, or a termination date.
8 . The computing system of claim 1 ,
wherein a variable field type of the plurality of variable field types comprises an entity name,
wherein to identify the one or more first text items, the machine learning model is configured to identify a text item of the one or more first text items corresponding to the entity name, the text item comprising a first name of an entity, and
wherein the processing circuitry is configured to create a mapping, for the variable field of the one or more variable fields corresponding to the first name of the entity, comprising data identifying a column of the corresponding electronic data source, the column comprising entity names for a set of entities.
9 . The computing system of claim 1 , wherein the processing circuitry is further configured to store the electronic document template in a database comprising a plurality of electronic document templates.
10 . The computing system of claim 1 , wherein each variable field of the one or more created variable fields comprises a text string descriptive of the corresponding variable field type of the plurality of variable field types.
11 . A method comprising:
receiving, by processing circuitry of a computing system, an electronic input document;
processing, with a machine learning model executed by the processing circuitry, the electronic input document to identify one or more first text items corresponding to respective variable field types of a plurality of variable field types, wherein the machine learning model is trained, with a plurality of labeled electronic documents, to identify, in document text, text that corresponds to any of the plurality of variable field types, wherein each of the plurality of labeled electronic documents includes one or more second text items labeled with a corresponding variable field type of the plurality of variable field types;
for each text item of the one or more first text items identified within the electronic input document, creating, by the processing circuitry, a variable field for the variable field type of the plurality of variable field types corresponding to the text item;
for each variable field of the one or more created variable fields, creating, by the processing circuitry, a mapping for the variable field to a corresponding electronic data source;
generating, by the processing circuitry and based on the electronic input document, an electronic document template comprising at least a portion of document text of the electronic input document, the one or more created variable fields and, for each variable field of the one or more created variable fields, the mapping for the variable field to the corresponding electronic data source, wherein the mapping comprises data identifying the corresponding electronic data source; and
parameterize, by the processing circuitry and based on the corresponding mapping, each variable field of the one or more created variable fields of the electronic document template with data from the corresponding electronic data source to generate an electronic output document.
12 . The method of claim 11 , wherein the electronic output document comprises the at least a portion of document text of the electronic input document.
13 . The method of claim 11 , wherein the data from the corresponding electronic data source comprises text.
14 . The method of claim 11 , wherein generating, based on the electronic input document, the electronic document template comprises:
for each text item of the one or more first text items identified within the electronic input document, replacing the text item within the electronic input document with the corresponding variable field of the one or more created variable fields.
15 . The method of claim 11 , wherein the at least a portion of document text of the electronic input document does not correspond to any of the plurality of variable field types.
16 . The method of claim 11 , wherein the plurality of variable field types comprise one or more of an agreement field, a clause, or an obligation.
17 . The method of claim 11 ,
wherein the plurality of variable field types comprise one or more of a name, an address, a state of governing law, a payment term, an effective date, or a termination date.
18 . The method of claim 11 ,
wherein a variable field type of the plurality of variable field types comprises an entity name,
wherein identifying the one or more first text items comprises identifying a text item of the one or more first text items corresponding to the entity name, the text item comprising a first name of an entity, and
wherein the method further comprises creating, by the processing circuitry, a mapping, for the variable field of the one or more variable fields corresponding to the first name of the entity, comprising data identifying a column of the corresponding electronic data source, the column comprising entity names for a set of entities.
19 . The method of claim 11 , wherein each variable field of the one or more created variable fields comprises a text string descriptive of the corresponding variable field type of the plurality of variable field types.
20 . A non-transitory, computer-readable medium comprising instructions that, when executed, are configured to cause processing circuitry of a computing system to:
receive an electronic input document;
process, with a machine learning model, the electronic input document to identify one or more first text items corresponding to respective variable field types of a plurality of variable field types, wherein the machine learning model is trained, with a plurality of labeled electronic documents, to identify, in document text, text that corresponds to any of the plurality of variable field types, wherein each of the plurality of labeled electronic documents includes one or more second text items labeled with a corresponding variable field type of the plurality of variable field types;
for each text item of the one or more first text items identified within the electronic input document, create a variable field for the variable field type of the plurality of variable field types corresponding to the text item;
for each variable field of the one or more created variable fields, create a mapping for the variable field to a corresponding electronic data source;
generate, based on the electronic input document, an electronic document template comprising at least a portion of document text of the electronic input document, the one or more created variable fields and, for each variable field of the one or more created variable fields, the mapping for the variable field to the corresponding electronic data source, wherein the mapping comprises data identifying the corresponding electronic data source; and
parameterize, based on the corresponding mapping, each variable field of the one or more created variable fields of the electronic document template with data from the corresponding electronic data source to generate an electronic output document.