Schema templates are generalized sets of event types, roles, role types, and extractors that can be used across multiple projects. Once a project is created using a schema template, that schema can be further modified on a project level without changing the template. We will use this template for the project we create later in the tutorial.
-
Select Events Schema Template from the global navigation bar.
-
Expand General Information.
-
Give the template a unique name such as “tutorial_schema_template.”
-
Select Save and then Confirm to save the template.
Note
The Category dropdown menu allows you to organize schemas and can make it easier to locate a particular schema. The Profile ID dropdown menu allows you to use a custom profile for your schema, such as one with a custom entity extraction model. The Language dropdown menu refers to the language of the model being trained; each model can only support one language. Leave these settings as they are for this tutorial.
Role types are sets of extractors that define which words might fit a given role. We will create three different role types as part of the schema template. Later in the tutorial, we will assign each role type to a role that is specific to the project.
Our first new role type, person_or_org, will combine two different extractors. The PERSON entity extractor uses the Rosette entities endpoint to extract person entities from the sample. Similarly, the ORGANIZATION entity extractor uses the entities endpoint to extract organization entities. Once we create this role type, any role it is assigned to will use both extractors to find words that fit the role. This will be useful for the investor role, since investors can be people or organizations.
-
Expand Role Types.
Note
If there are any existing role types, you can delete them by selecting the x icon to the right of each.
-
Select Add Role Type.
-
Name the role type “person_or_org” and select Ok. Now that you have created the role type, you will create a new extractor for it.
-
Select the checkbox next to Entity.
-
Type “person_or_org” in the Extractor Name field.
-
Select PERSON using the Items dropdown menu.
-
Select the plus icon to the right to add another entity extractor.
-
Select ORGANIZATION using the new dropdown menu.
-
Select the plus icon to the right.
-
Select Save. We have just created a role type that extracts both person entities and organization entities.
Next, we will make a money role type that uses an entity extractor to find words that fit the money role in our schema.
-
Select Add Role Type.
-
Name the role type “money” and select Ok. Now that you have created the role type, you will create a new extractor for it.
-
Select the checkbox next to Entity.
-
Type "money" in the Extractor Name field.
-
Select IDENTIFIER:MONEY using the Items dropdown menu and select the plus icon to the right.
-
Select Save. We have just created a role type that extracts money entities.
Finally, we will make an asset role type that uses an entity extractor to find words that fit the asset role in our schema. In our schema, the asset role applies only to organization entities. While we already have a role type that extracts organization entities, person_or_org, that role type also extracts person entities. We need to make a separate role type that only extracts organization entities.
-
Create a new role type called “asset”.
-
Create an extractor called “organization” that extracts the ORGANIZATION entity.
-
Assign the organization extractor to the asset role type.
Each event type requires at least one key phrase and one role.
We will add one of each now.
-
Expand Event Types.
-
Select Add Event Type.
-
Name the event type “investment” and select Ok.
-
Type “investment” in the Enter New Key Phrase field and select the plus icon.
-
Type “money” in the Enter New Role field beneath Roles for this Event.
-
Select the money role type using the Role Type dropdown menu.
-
Select the plus sign next to the required checkbox. Make sure the Required checkbox is not selected.
Note
If the Required checkbox is selected, Adaptation Studio will only extract events that contain a match for that role.
-
Save the template.
When you add a new event type to a project, Adaptation Studio automatically creates a role type containing morphological extractors for all key phrases. For example, adding “investment” as key phrases causes Adaptation Studio to identify all forms of the noun investment (investments, etc.).
We have just created a schema template. While it does not yet include all of the key phrases and roles we need for this project, we will add more when we turn it into a project schema.