Skip to main content
Text files include formats such as .txt, .md, .rst, .xml, .html, .json, and more. However, HTML files are categorized slightly differently from other text file types. As a result, this documentation is divided into separate Text and HTML sections.
To learn how to import text and HTML see our documentation here.
The following types of labels can be applied to all text files, and at least one must be present in your project’s ontology to enable text labeling:
  • Text Region: Object labels applied to a specific region within the text file.
  • Classifications: Classification labels applied to the entire file.

Label Text and HTML Files

Text

Text

Text Region objects must be selected at the top of the editor. Only classifications are visible in the left side bar
  1. Highlight the text to label.
  2. Click a Text Region label type at the top of the Editor (or use the hotkey) to apply the label.
Label text files with Text Region

JSON

Text Region objects must be selected at the top of the editor. Only classifications are visible in the left side bar
  1. Highlight the text to label.
  2. Click a Text Region label type at the top of the Editor (or use the hotkey) to apply the label.
Label JSON files with Text Region

XML

Text Region objects must be selected at the top of the editor. Only classifications are visible in the left side bar
  1. Highlight the text to label.
  2. Click a Text Region label type at the top of the Editor (or use the hotkey) to apply the label.
Label XML files with Text Region

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.

HTML - Single Extension

  1. Click a Text Region label type (or use the hotkey)
  2. Highlight the text you want to apply the label to.
Label HTML files with Text Region

HTML - Raw

  1. Click a Text Region label type (or use the hotkey)
  2. Highlight the text you want to apply the label to.
Label HTML files with Text Region

Using Relation Text Attributes - Text and HTML

Relation text attributes link an object to another object. In images or videos this could be linking a chicken’s body to its wing. In PDFs or text documents (text or HTML files) this could be linking words with measurements, or linking words with other words.
Your Ontology must MUST contain text attributes with the Relation feature enabled if you want to use relation text attributes.
Add Relation Text Attribute
While annotating, you can create a relationship between any object with a relation text attribute and any other object. After you create a relation between objects a workflow arrow points from the object with the relation text attribute to the other object.
Link objects
⌘I