Auto populate fields with regular expressions

Contracts uses extraction to pinpoint key data points within contracts and auto populate fields of your choosing. Extraction works by taking a regular expression included with Contracts or custom regex and populating your desired fields based on the results of that regex. Contracts auto populates the following field types.

Group 1 field types Group 2 field types
Fixed-length text Yes/No
Long text Single choice
Whole number Multiple choice
Decimal  
Date  

Auto populate Group 1 field types

To auto populate fixed-length text, long text, whole number, decimal, and date field types:

Note: For these field types, Contracts will auto populate the field you choose with the first-found result of your regular expression.

  1. Go to the Contracts Models tab.
  2. Click New Contracts Model.
  3. Name your model.
  4. For Model Type, select Regular Expression.
  5. Add a description.
  6. On the Regular Expression card, select your regular expression.
  7. On the Action card, select Populate Existing Field.
  8. On the Populate Existing Field card, select the fixed-length text, long text, whole number, decimal, or date field that you want to populate.
  9. For field to store results, you can store all values found on a document as a delimited list in a long text field.
  10. For field to store section text, you can select a long text field to store the text of the section if segmented, in which the auto populating result is found.
  11. For existing value options, if there is already a value in the field you are auto populating, you can control whether you'd like Contracts to:
    • Prepend—put the new result before that text.
    • Append—put the new result after that text.
    • Replace—replace that text.
    • Do nothing—leave that text.
      For date fields, you can only replace or do nothing.
  12. Click Save.

To run the model:

  1. Go to the Contracts Analysis Profiles tab.
  2. Click New Contracts Analysis Profile.
  3. Name your analysis profile.
  4. Add a description.
  5. On the Extraction tab, add the model you created.
  6. Save.
  7. Go to the Contracts Analysis Sets tab.
  8. Click New Contracts Analysis Set.
  9. Name your analysis set.
  10. Choose the analysis profile you created.
  11. Select a saved search to run the analysis on.
  12. Click Analyze.

The status of the analysis will appear under the Status section. Once complete, click the Refresh button to refresh the page and view results

Auto populate Group 2 field types

To auto populate yes/no, single choice, and multiple choice field types:

Note: For these field types, Contracts will auto populate the field you choose based on your result-to-choice mapping.

  1. Go to the Contracts Models tab.
  2. Click New Contracts Model.
  3. Name your model.
  4. For Model Type, select Regular Expression.
  5. Add a description.
  6. On the Regular Expression card, select your regular expression.
    An image of the Select Regular Expression window.
  7. On the Action card, select Populate Existing Field.
  8. Select a Field to auto-populate. Choose a yes/no, single choice, or multiple choice field.
  9. Select a Field to store section text. Choose a long text field to store the text of the section, if segmented, in which the auto-populating result is found.

    If the document does not have sections, there are some advanced options for storing text around your regex result.
    An image of the Store Additional Text Around Result section.

    • You can tell Contracts to leave the field blank if there is no section.
    • You can tell Contracts to default to a certain number of words before or after the result if there is no section.
    • Even if the document does have sections, you can tell Contracts to ignore them and only look for a certain number of words before/after the result.
  10. For existing value options, if there is already a value in the field you are auto populating, you can control whether Contracts to replaces the existing value or does nothing and leaves the existing value. For multiple choice fields, you can choose to append onto existing choice values.
  11. Click Save.
  12. On the Result To Choice Mapping card, click Map Results To Choices.

Mapping results to choices

After auto populating Group 2 field types, you will click Map Results to Choices. Mapping results to choices is a 3-step process.

Step 1

  1. Get results to map by selecting a saved search. Contracts will generate results to map by running the regular expression on the first 1000 documents in the saved search. You can change this amount by going to the Instance Settings tab, filter for the RegexResultsDocLimit instance setting, and changing the 1000 value to a different number.
  2. Click Next.

Step 2

  1. Contracts will load the results of your regular expression in a table. To map a result to a choice, click on the checkbox to the left of a result and then select a choice from the Choices to auto-populate drop-down below the table of results.

    Note: For example, if your regular expression finds "epidemics" in a Force Majeure clause, you can select this result in the table and populate a "Has epidemics" yes/no field by selecting "yes" in the Choices to auto-populate drop-down. Contracts will then populate the Has epidemics field with a "yes" value if your regular expression finds "epidemics."

  2. You can add or remove choices from the Choices to auto-populate drop-down menu by clicking Manage.
  3. To clear your mappings, click Reset. If you have any results selected with their boxes checked, clicking Reset will only remove choice mappings for the selected rows.
  4. Click Next.

Step 3

  1. Contracts will display a helpful summary of how documents will be auto populated with your model, based on your result-to-choice mappings in Step 2.
  2. Review the summary and click Save.
  3. Go to the Contracts Analysis Profiles tab.
  4. Click New Contracts Analysis Profile.
  5. Name your analysis profile.
  6. Add a description.
  7. On the Extraction tab, add the model you created.
  8. Click Save.
  9. Go to the Contracts Analysis Sets tab.
  10. Click New Contracts Analysis Set.
  11. Name your analysis set.
  12. Choose the analysis profile you created.
  13. Select a saved search to run the analysis on.
  14. Click Analyze.