Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Using the rule_config/{scope}/{field_name} endpoint and this payload:

Code Block
{
  "type": "document_type",
  "rules": [
    {
      "confidence": 100,
      "rule_type": [
        "first", # other options: next, last
      ],
      "+rule": [
        "L:THIS RULE MATCHES ONLY FOR EXAMPLE DOCTYPE"
      ]
    }
  ]
}

This should look like this:

...

Here is what the end result should look like, once present in the predictor settings:

Code Block
{
  "scope": "Overall",
  "key_value_pairs": {
    "rule_config": {
      "EXAMPLE_DOCUMENT_TYPE": {
        "type": "document_type",
        "rules": [
          {
            "confidence": 100,
            "rule_type": [
              "first", # other options: next, last
            ],
            "+rule": [
              "L:THIS RULE MATCHES ONLY FOR EXAMPLE DOCTYPE"
            ]
          }
        ]
      }
    }
  }
}

Another example, from document type:

Code Block
{
  "type": "document_type",
  "rules": [
    {
      "gen_id": "Bat&BallHotel",
      "confidence": 100,
      "rule_type": [
        "first"
      ],
      "+and": [
        {
          "+rule": [
            "L:(?i)The Bat & Ball Hotel"
          ]
        },
        {
          "+rule": [
            "L:(?i)Order"
          ]
        }
      ]
    }
  ]
}

...