Sem5 changes to Taxonomies

Replace "topics" with "elements" in the taxonomy object

In the taxonomy object replace "topics" with "elements".

Example:

{
    "name": "ROOT Node",
    "children": [{
            "name": "CHILD 1",
            "children": [],
            "topics": []
            }
            ],
    "topics": []
}

Becomes:

{
    "name": "ROOT Node",
    "children": [{
            "name": "CHILD 1",
            "children": [],
            "elements": []
            }
            ],
    "elements": []
}

New allowed types

Three additional allowed values in the target_type of the elements object:

  • AUTO_CATEGORY
  • NAMED_ENTITY
  • USER_ENTITY

AUTO_CATEGORY must have a target_id of any string this will match if any autocategories are returned matching that value.

NAMED_ENTITY must have a target_id of any string this will match in the taxonomy if any named entities are returned matching that value.

USER_ENTITY must have a target_id of an existing user entity in the configuration much like QUERY_TOPIC must have an existing query, and CONCEPT_TOPIC must have an existing concept topic.

These three additions are able to be used in conjunction with the already allowed values:

  • QUERY_TOPIC
  • CONCEPT_TOPIC

Example:

{
    "target_id": "test-user-entity-id",
    "target_type": "USER_ENTITY"
},
{
    "target_id": "Accounting_systems",
    "target_type": "AUTO_CATEGORY"
},
{
    "target_id": "Apple",
    "target_type": "NAMED_ENTITY"
}

Optional field for NAMED_ENTITY and USER_ENTITY types

There is an optional field target_entity_type for use with NAMED_ENTITY or USER_ENTITY

This is a way to limit the taxonomy node to match only on certain types of entities.

Example:

{
    "target_id": "Apple",
    "target_type": "NAMED_ENTITY",
    "target_entity_type": "Company"
}

The above will include the company "Apple" in the taxonomy whereas the below will include the entity "Apple" as a food.

{
    "target_id": "Apple",
    "target_type": "NAMED_ENTITY",
    "target_entity_type": "Food"
}