L2 Hub
Pontus
analysis
Entity Resolver

L2 Construct: entity_resolver

entity duplicate resolver

Description

The entity resolver L2 analyzes a list of entities and groups them based on similarity. It uses natural language processing to determine which entities likely refer to the same real-world entity, even if they have slight differences in representation.

L2 Data

  1. Provider: pontus
  2. Module: analysis
  3. Action: entity_resolver

Example Step

{
  "name": "insert-your-step-name",
  "type": "l2",
  "l2_data": {
    "provider": "pontus",
    "module": "analysis",
    "action": "entity_resolver",
    "metadata": {}
  }
}
 

Input

Example

{
  "entities": [
    {
      "email": "john@example.com",
      "name": "John Doe"
    },
    {
      "email": "jane@example.com",
      "name": "Jane Doe"
    },
    {
      "email": "johnd@another.com",
      "name": "John Doe"
    }
  ],
  "rubric": null
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/pontus/analysis/entity-resolver-input",
  "$ref": "#/$defs/EntityResolverInput",
  "$defs": {
    "Entity": {
      "type": "object"
    },
    "EntityResolverInput": {
      "properties": {
        "entities": {
          "items": {
            "$ref": "#/$defs/Entity"
          },
          "type": "array"
        },
        "rubric": {
          "items": {
            "$ref": "#/$defs/RubricRules"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["entities", "rubric"]
    },
    "RubricRules": {
      "properties": {
        "rule_name": {
          "type": "string"
        },
        "rule_description": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["rule_name", "rule_description"]
    }
  }
}
 

Output

Example

{
  "groups": {
    "1": [
      {
        "id": "1",
        "value": {
          "email": "john@example.com",
          "name": "John Doe"
        }
      }
    ],
    "2": [
      {
        "id": "2",
        "value": {
          "email": "jane@example.com",
          "name": "Jane Doe"
        }
      }
    ]
  }
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/pontus/analysis/entity-resolver-output",
  "$ref": "#/$defs/EntityResolverOutput",
  "$defs": {
    "Entity": {
      "type": "object"
    },
    "EntityGroup": {
      "properties": {
        "id": {
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/Entity"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["id", "value"]
    },
    "EntityResolverOutput": {
      "properties": {
        "groups": {
          "patternProperties": {
            "^[0-9]+$": {
              "items": {
                "$ref": "#/$defs/EntityGroup"
              },
              "type": "array"
            }
          },
          "additionalProperties": false,
          "type": "object"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["groups"]
    }
  }
}