Text / HTML Annotation
This guide assumes your text files are stored in AWS. To learn how to create integrations with other cloud providers click here. To learn how to upload files locally click here.
STEP 1: Import Your Text Files
Set Up AWS
Before you can do anything with the Encord platform and cloud storage, you need to configure your cloud storage to work with Encord. Once the integration between Encord and your cloud storage is complete, you can then use your data in Encord.
In order to integrate with AWS S3, you need to:
- Create a permission policy for your resources that allows appropriate access to Encord.
- Create a role for Encord and attach the policy so that Encord can access those resources.
- Activate Cross-origin resource sharing which allows Encord to access those resources from a web browser.
- Test the integration to make sure it works.
You have the following options to integrate AWS and Encord:
Create AWS Integration in Encord
In the Integrations section of the Encord platform, click +New integration to create a new integration.
Select AWS S3 at the top of the chooser.
Create JSON file for import
Create a JSON file based on the templates provided below.
The title
field is optional. If omitted, the file path and file name are used as the default title. For example, if the file is located at https://encord-solutions-bucket.s3.eu-west-2.amazonaws.com/path/to/my/bucket/website.html
, the title defaults to /path/to/my/bucket/website.html
.
Key or Flag | Required? | Default value |
---|---|---|
”objectUrl” | Yes | |
”title” | No | The file’s path + title |
”clientMetadata” | No |
Create a Folder to Store Your Audio Files
All files in Encord must be stored within folders. Therefore, you need to create a folder before uploading any data to Encord. To create a folder:
- Navigate to Files under the Index heading in the Encord platform.
- Click the + New folder button to create a new folder. A dialog to create a new folder appears.
-
Give the folder a meaningful name and description.
-
Click Create to create the folder. The folder is listed in Files.
Upload Your Text files to Encord
- Navigate to Files section of Index in the Encord platform.
- Click into a Folder.
- Click + Upload files. A dialog appears.
- Click Import from cloud data.
STEP 2: Set Up Your Project
Create a Dataset
- Click the New dataset button in the Datasets section in Annotate.
- Give your Dataset a meaningful title and description. A clear title and description keeps your data organized.
- Click Create dataset to create the Dataset.
Attach files
- Navigate to the Datasets section under the Annotate heading.
- Click the Dataset you want to attach data to.
- Click +Attach existing files.
-
Select the folders containing the files you want to attach to the Dataset. To select individual files, double-click a folder to see its contents, and select the files you want to add to the Dataset.
-
Click Attach data to attach the selected files to the Dataset.
Create an Ontology
- Click the New ontology button in the Ontologies section to create a new Ontology.
-
Give your Ontology a meaningful title and description. A clear title and description keeps your Ontologies organized.
-
Click Next to continue.
- Define your Ontology structure. Text files are labeled using the Text Region object type and Classifications.
To add a Text Region object:
- Click + Add object to create a new object.
- Give the object a name, for example “Region of Interest”.
- Select the Text Region object type.
- Optionally, configure the object to add any attributes.
- Optionally, enable the Required toggle to mark the object as Required.
- Repeat these steps for as many Text Region objects as necessary.
Configure Objects:
Objects can be configured to add attributes.
- Click the arrow button next to the object to start configuring.
- Click + Add attribute to add an attribute.
- Select the attribute type: Text, radio button, or checklist.
- Give the attribute a name, for example “Why is this region of interest?” could be a text attribute.
- If your attribute is a radio button or a checklist click Add option and add options.
-
Click the Back to parent button to return the Ontology creation view.
To add a Classification:
- Click + Add classification to create a new classification.
- Give the classification a name. For example, “HTML Type”.
- Optionally, configure the classification to change the classification type. The default classification type is a text field.
- Optionally, enable the Required toggle to mark the classification as Required.
- Repeat these steps for as many classifications as necessary.
Configure classifications:
Classifications can be configured to change the classification type, and to add classification options to radio buttons and check lists.
- Click the arrow icon next to an object to configure the classification.
- Click the classification type to change the classification type. The default classification type is a text field.
- Click Add option to add an option if you have selected a radio button or check list classification.
- Enter a name for the classification option. For example, the classification “HTML Type” can have the options “Raw”, and “Single Extension”.
- Click the Back to parent button to return the Ontology creation view.
Create a Project
- In the Encord platform, select Projects under Annotate.
- Click the + New annotation project button to create a new Project.
- Give the Project a meaningful title and description.
If you are part of an Organization, an optional Project tags drop-down is visible. Project tags are useful for categorizing and finding your Projects. Select as many tags as are relevant for your Project.
-
Click the Attach ontology button.
-
Select the Ontology you created previously from the list using the Select button.
-
Click OK to attach the Ontology to the Project.
-
Click the Attach datasets button.
-
Select the Dataset you created previously from the list using the Attach button.
- Click OK to attach the Dataset(s) to the Project.
- Click the Load from template button to use a Workflow template.
-
Select the template you want to use and click Load template.
-
Click Create project to finish creating the Project.
STEP 3: Label Your Text Files
Text
HTML
Encord supports both raw HTML files and single-extension HTML files. The key difference is that single-extension HTML files include all the necessary elements to render the webpage, such as CSS and JavaScript.
Was this page helpful?