Run reports on regular expressions results
Instead of populating a specific field in your workspace, you can generate a report where Contracts creates new fields to store information regarding all regular expression results across a data set.
If one of your regular expressions has 10 results per document across 20 documents, running a regular expression report will place the 10 values, each separated by a horizontal line, into one field on each of the 20 documents. You can now filter for specific results across all 20 documents.
In addition to storing all the values for you to filter, Contracts stores information on the number of results per document, error messages during analysis, location coordinates for the start of each result, and length of each result.
To generate a regular expression report:
- Go to the Contracts Models tab.
- Click New Contracts Model.
- Name your model.
- For Model Type, select Regular Expression.
- Add a description.
- On the Regular Expression card, select your regular expression.
- On the Action card, select Generate Report.
- On the Generate Report card, select the Value Field Type where Contracts will store all regular expression values.
For example, if you are using the Date regular expression, you may want this field to be a Date field type. If your regular expression is finding a block of text, you'll want this field type to be long text. - Click Save.
To run analysis on your regular expression report:
- Go to the Contracts Analysis Profiles tab.
- Click New Contracts Analysis Profile.
- Name your analysis profile.
- Add a description.
- On the Extraction tab, add the model you created
- Save.
- Go to the Contracts Analysis Sets tab.
- Click New Contracts Analysis Set.
- Name your analysis set.
- Choose the analysis profile you created.
- Select a saved search to run the analysis on.
- Click Save.
- 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.
Reporting fields Contracts creates and auto-populates
The names of the fields that Contracts creates will depend on the name of your regular expression and the IDs for your analysis set and model.
- When you delete an analysis set with a regular expression model that is generating a report, Contracts will auto delete any objects & fields that it auto generated to keep your workspace clean.
- When you re-run a regular expression model that is generating a report, it's important to note that Contracts will replace the field values instead of appending them.
- When you run a regular expression model that is generating a report, Contracts will now populate section documents with all reporting fields in addition to the main agreement.
Following is a list of all fields that Contracts will create and auto-populate when you run regular expression reporting.
We based these field names on the example of a regular expression called Date, a model ID of 1040099, and an Analysis Set ID of 1040101. The actual names of your fields will depend on the name of your regular expression and the IDs for your analysis set and model.
Example field name | Field type | Field auto population |
---|---|---|
Date Analysis _1040099_1040101 | Multiple Object |
Auto-populated with a unique ID for each result that will look like "cddc9d22-abd0-4680-b94c-997d32390593" so that other data about your regular expression can be stored. You will likely not need to use this field. |
Date Analysis _1040099_1040101::Value | The field type you selected in Step 8 on how to generate a regular expression report. |
Auto-populated with every result of your regular expression for the document, each separated by a horizontal line. Note: The field type you choose will drive the filtering capability you have on the document list in Relativity. For example, if you choose a date field type, you will be able to filter on this value field with a date selector. |
Date Analysis Count_1040099_1040101 | Whole number |
Auto-populated with total number of regular expression results found in the document. Note: Be aware that the naming convention for the count field varies slightly from the other reporting fields. |
Date Analysis _1040099_1040101::Start | Whole number | Auto-populated with the location coordinates for the start of the result in the document. |
Date Analysis _1040099_1040101::Length | Whole number | Auto-populated with the total length of the result i the document. |
Date Analysis _1040099_1040101::Error Message | Fixed-length text |
Auto-populated with any error messages, per result. For example, if you've chosen a fixed-length text field for the Value field type but the result is too many characters to fit, an error message will appear. |