# Thot Thesauri

> Look up the Egyptological vocabulary published by Thot (Thesauri & Ontology for documenting Ancient Egyptian Resources), the University of Liège project whose thesauri give projects working on ancient Egyptian texts and monuments a shared set of terms for scripts, languages, genres, object types and dates. Turn a 'thot-' identifier into a term in English, French or German, read a reign's date range as text and as numbers you can sort on, pull a whole thesaurus back as rows, search one for the term someone typed, or take a concept's SKOS record as RDF. No account or API key is required.

App · Research & Academia · 5 actions. Web page: https://docs.lodol.com/docs/integrations/thot-thesauri

## Actions

### Get a concept

Read everything Thot publishes about one concept: its name in English, French and German, the other names it goes by, where it sits among the broader and narrower terms, the XML value attached to it, and (for a concept in the date thesaurus) the range it covers, both as Thot writes it and as numbers you can sort on. This is the one step behind a catalogue record that stores nothing but 'thot-374' and has to show a king's name and his dates.

**Inputs**

- Concept (`concept`, text, required): The Thot concept to read, as its identifier: 'thot-374'. The number on its own works, and so does the address of a concept page copied out of the browser. Use Search a thesaurus to find the identifier for a term you can only name.
- Language (`language`, text): Which language to show the concept's name in. Every language Thot has for it comes back as well, so this only picks the one shown as the name; a concept with no name in this language falls back to one it does have, and says which. One of: `en` (English), `fr` (French), `de` (German). Default: `en`.

**Outputs**

- `alternative_labels` (list): Other names the same concept is known by.
- `attribution` (object): Credit for the project whose data this is.
- `broader` (list): Thot identifiers, ready to pass to another step.
- `concept` (text): The identifier, normalised to 'thot-374'.
- `date_end` (number): The latest year as a number, negative for BC.
- `date_range` (text): The range as Thot writes it, such as '450-400 BC'.
- `date_span_years` (number): How many years the range covers.
- `date_start` (number): The earliest year as a number, negative for BC, so it can be sorted and compared without being parsed.
- `definition` (text)
- `found` (true/false): False when Thot publishes nothing under this identifier. The rest of the record is then empty rather than wrong.
- `is_dated` (true/false): True for a concept in the date thesaurus, which is the only kind that carries a range.
- `label` (text): The name, in the language asked for where there is one.
- `label_language` (text): Which language the name above is actually in, which differs from the one asked for when Thot has no name in it.
- `labels` (object): The concept's name in each language Thot publishes. A language it has no name in is empty.
- `narrower` (list): Thot identifiers, ready to pass to another step.
- `notation` (text): The project's own code for the concept, where it has one.
- `note` (text)
- `rdf_url` (text): The same concept as RDF/XML.
- `related` (list): Thot identifiers, ready to pass to another step.
- `requested_language` (text): The language this step asked for.
- `scheme` (text): The thesaurus the concept belongs to.
- `scope_note` (text): Guidance on when the term applies.
- `url` (text): The concept's page, for a person to read.
- `xml_value` (text): The XML value Thot attaches to the concept, for the project's TEI interchange format. Empty when it has none.

**Example output**

```json
{
  "alternative_labels": [
    {
      "label": "Amenophis II",
      "language": "en"
    }
  ],
  "attribution": {
    "text": "Data from Thot - Thesauri & Ontology for documenting Ancient Egyptian Resources (University of Liege)",
    "url": "https://thot.philo.ulg.ac.be"
  },
  "broader": [
    "thot-360"
  ],
  "concept": "thot-374",
  "date_end": -1401,
  "date_range": "1427-1401 BC",
  "date_span_years": 26,
  "date_start": -1427,
  "definition": null,
  "found": true,
  "is_dated": true,
  "label": "Amenophis II.",
  "label_language": "de",
  "labels": {
    "de": "Amenophis II.",
    "en": "Amenhotep II",
    "fr": "Amenhotep II"
  },
  "narrower": [],
  "notation": null,
  "note": null,
  "rdf_url": "https://thot.philo.ulg.ac.be/api/rdf/concept/thot-374",
  "related": [],
  "requested_language": "de",
  "scheme": "dates",
  "scope_note": null,
  "url": "https://thot.philo.ulg.ac.be/concept/thot-374",
  "xml_value": null
}
```

### Get a concept as RDF

Get a concept's SKOS record as RDF/XML, exactly as Thot serves it, for loading into a triple store or handing to something that reads linked data. Get a concept reads the same document and reports what it says instead, so use this one when the document itself is what you need.

**Inputs**

- Concept (`concept`, text, required): The Thot concept to read, as its identifier: 'thot-374'. The number on its own works, and so does the address of a concept page copied out of the browser. Use Search a thesaurus to find the identifier for a term you can only name.

**Outputs**

- `attribution` (object): Credit for the project whose data this is.
- `byte_count` (number)
- `concept` (text)
- `concept_url` (text)
- `format` (text)
- `found` (true/false): False when Thot serves no RDF for this identifier.
- `rdf_xml` (text): The RDF/XML document itself.
- `url` (text)

**Example output**

```json
{
  "attribution": {
    "text": "Data from Thot - Thesauri & Ontology for documenting Ancient Egyptian Resources (University of Liege)",
    "url": "https://thot.philo.ulg.ac.be"
  },
  "byte_count": 545,
  "concept": "thot-23",
  "concept_url": "https://thot.philo.ulg.ac.be/concept/thot-23",
  "format": "RDF/XML",
  "found": true,
  "rdf_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:skos=\"http://www.w3.org/2004/02/skos/core#\">\n  <skos:Concept rdf:about=\"https://thot.philo.ulg.ac.be/concept/thot-23\">\n    <skos:prefLabel xml:lang=\"en\">Fayyumic Coptic</skos:prefLabel>\n    <skos:prefLabel xml:lang=\"fr\">Copte fayoumique</skos:prefLabel>\n    <skos:prefLabel xml:lang=\"de\">Fayumisches Koptisch</skos:prefLabel>\n    <skos:broader rdf:resource=\"https://thot.philo.ulg.ac.be/concept/thot-18\"/>\n  </skos:Concept>\n</rdf:RDF>\n",
  "url": "https://thot.philo.ulg.ac.be/api/rdf/concept/thot-23"
}
```

### Get a thesaurus

Read a whole Thot thesaurus: every term in it, in the language you choose. The API serves a thesaurus as the nested source of a tree widget; this brings it back as rows, each carrying its identifier, the term above it, how deep it sits and the whole path down to it, so a workflow can filter and join it without walking a tree.

**Inputs**

- Thesaurus (`thesaurus`, text, required): Which of Thot's thesauri to read, by the short name the project uses in its own addresses, such as 'scripts' or 'languages'. The project's site lists them all.
- Language (`language`, text): Which language to read the thesaurus in. The terms come back in this language; the identifiers are the same whichever you choose. One of: `en` (English), `fr` (French), `de` (German). Default: `en`.
- Most terms to return (`limit`, number): How many terms to bring back. The full count is always reported, so a thesaurus longer than this says so rather than looking complete. From 1 to 5000. Default: `500`.

**Outputs**

- `attribution` (object): Credit for the project whose data this is.
- `concept_count` (number): How many terms the thesaurus holds, whether or not they all fitted in this step.
- `concepts` (list): Every term, in the order the thesaurus lists them: a parent immediately before what sits under it.
- `language` (text)
- `max_depth` (number)
- `returned_count` (number)
- `thesaurus` (text)
- `top_level` (list): The terms at the top of the tree, always complete.
- `top_level_count` (number)
- `truncated` (true/false): True when the thesaurus holds more terms than this step asked for.
- `url` (text)

**Example output**

```json
{
  "attribution": {
    "text": "Data from Thot - Thesauri & Ontology for documenting Ancient Egyptian Resources (University of Liege)",
    "url": "https://thot.philo.ulg.ac.be"
  },
  "concept_count": 3,
  "concepts": [
    {
      "child_count": 2,
      "concept": "thot-1",
      "depth": 0,
      "has_children": true,
      "label": "Scripts",
      "parent_concept": null,
      "parent_label": null,
      "path": "Scripts",
      "url": "https://thot.philo.ulg.ac.be/concept/thot-1"
    },
    {
      "child_count": 0,
      "concept": "thot-4",
      "depth": 1,
      "has_children": false,
      "label": "Hieroglyphic",
      "parent_concept": "thot-1",
      "parent_label": "Scripts",
      "path": "Scripts > Hieroglyphic",
      "url": "https://thot.philo.ulg.ac.be/concept/thot-4"
    },
    {
      "child_count": 0,
      "concept": "thot-9",
      "depth": 1,
      "has_children": false,
      "label": "Demotic",
      "parent_concept": "thot-1",
      "parent_label": "Scripts",
      "path": "Scripts > Demotic",
      "url": "https://thot.philo.ulg.ac.be/concept/thot-9"
    }
  ],
  "language": "en",
  "max_depth": 1,
  "returned_count": 3,
  "thesaurus": "scripts",
  "top_level": [
    {
      "child_count": 2,
      "concept": "thot-1",
      "depth": 0,
      "has_children": true,
      "label": "Scripts",
      "parent_concept": null,
      "parent_label": null,
      "path": "Scripts",
      "url": "https://thot.philo.ulg.ac.be/concept/thot-1"
    }
  ],
  "top_level_count": 1,
  "truncated": false,
  "url": "https://thot.philo.ulg.ac.be/api/json/thesaurus/scripts"
}
```

### Get several concepts

Read the same full record for a list of concepts at once. A catalogue record names its script, its language, its genre and its date as four Thot identifiers; this turns all of them into readable terms in one step rather than four that each do the same thing. Comes back with a name-by-identifier map beside the records, so a workflow can read one straight off.

**Inputs**

- Concepts (`concepts`, list, required): The Thot concepts to read, as their identifiers. Add a row for each one, or point this at a list from an earlier step. Each concept is a few small requests of its own, so keep the list to the identifiers a record actually holds. Up to 20 concepts.
- Language (`language`, text): Which language to show the concept's name in. Every language Thot has for it comes back as well, so this only picks the one shown as the name; a concept with no name in this language falls back to one it does have, and says which. One of: `en` (English), `fr` (French), `de` (German). Default: `en`.

**Outputs**

- `attribution` (object): Credit for the project whose data this is.
- `concept_count` (number)
- `concepts` (list): Every concept, in the order given.
- `found_count` (number): How many of them Thot publishes.
- `labels` (object): Each identifier against its name, for reading one off without walking the list.
- `missing` (list): The identifiers Thot has nothing under.
- `missing_count` (number)
- `requested_language` (text)

**Example output**

```json
{
  "attribution": {
    "text": "Data from Thot - Thesauri & Ontology for documenting Ancient Egyptian Resources (University of Liege)",
    "url": "https://thot.philo.ulg.ac.be"
  },
  "concept_count": 2,
  "concepts": [
    {
      "alternative_labels": [
        {
          "label": "Fayumic",
          "language": "en"
        }
      ],
      "broader": [
        "thot-18"
      ],
      "concept": "thot-23",
      "date_end": null,
      "date_range": null,
      "date_span_years": null,
      "date_start": null,
      "definition": null,
      "found": true,
      "is_dated": false,
      "label": "Fayyumic Coptic",
      "label_language": "en",
      "labels": {
        "de": "Fayumisches Koptisch",
        "en": "Fayyumic Coptic",
        "fr": "Copte fayoumique"
      },
      "narrower": [],
      "notation": null,
      "note": null,
      "rdf_url": "https://thot.philo.ulg.ac.be/api/rdf/concept/thot-23",
      "related": [],
      "scheme": "languages",
      "scope_note": null,
      "url": "https://thot.philo.ulg.ac.be/concept/thot-23",
      "xml_value": "cop-fay"
    },
    {
      "alternative_labels": [
        {
          "label": "Amenophis II",
          "language": "en"
        }
      ],
      "broader": [
        "thot-360"
      ],
      "concept": "thot-374",
      "date_end": -1401,
      "date_range": "1427-1401 BC",
      "date_span_years": 26,
      "date_start": -1427,
      "definition": null,
      "found": true,
      "is_dated": true,
      "label": "Amenophis II.",
      "label_language": "de",
      "labels": {
        "de": "Amenophis II.",
        "en": "Amenhotep II",
        "fr": "Amenhotep II"
      },
      "narrower": [],
      "notation": null,
      "note": null,
      "rdf_url": "https://thot.philo.ulg.ac.be/api/rdf/concept/thot-374",
      "related": [],
      "scheme": "dates",
      "scope_note": null,
      "url": "https://thot.philo.ulg.ac.be/concept/thot-374",
      "xml_value": null
    }
  ],
  "found_count": 2,
  "labels": {
    "thot-23": "Fayyumic Coptic",
    "thot-374": "Amenhotep II"
  },
  "missing": [],
  "missing_count": 0,
  "requested_language": "en"
}
```

### Search a thesaurus

Find the concepts in a thesaurus whose term matches some text, closest match first. Every other step here needs a 'thot-' identifier and nothing in Thot turns a word into one, so this is where a workflow starts from a term someone typed. Case and accents are ignored, and each match comes back with the whole path down to it so a term that appears twice can be told apart.

**Inputs**

- Thesaurus (`thesaurus`, text, required): Which of Thot's thesauri to read, by the short name the project uses in its own addresses, such as 'scripts' or 'languages'. The project's site lists them all.
- Term (`query`, text, required): The term to look for, or part of one. Case and accents are ignored, so 'hieroglyphes' finds 'Hiéroglyphes'. A Thot identifier works too, if you want to check where one sits in the tree.
- Language (`language`, text): Which language to read the thesaurus in. The terms come back in this language; the identifiers are the same whichever you choose. One of: `en` (English), `fr` (French), `de` (German). Default: `en`.
- Most matches to return (`limit`, number): How many matches to bring back, closest first. The full count of matches is always reported. From 1 to 200. Default: `25`.

**Outputs**

- `attribution` (object): Credit for the project whose data this is.
- `language` (text)
- `match_count` (number)
- `matches` (list): The matching terms, closest first.
- `query` (text)
- `returned_count` (number)
- `searched_count` (number): How many terms the thesaurus holds.
- `thesaurus` (text)
- `truncated` (true/false)

**Example output**

```json
{
  "attribution": {
    "text": "Data from Thot - Thesauri & Ontology for documenting Ancient Egyptian Resources (University of Liege)",
    "url": "https://thot.philo.ulg.ac.be"
  },
  "language": "en",
  "match_count": 1,
  "matches": [
    {
      "child_count": 0,
      "concept": "thot-9",
      "depth": 1,
      "has_children": false,
      "label": "Demotic",
      "match": "exact",
      "parent_concept": "thot-1",
      "parent_label": "Scripts",
      "path": "Scripts > Demotic",
      "url": "https://thot.philo.ulg.ac.be/concept/thot-9"
    }
  ],
  "query": "demotic",
  "returned_count": 1,
  "searched_count": 3,
  "thesaurus": "scripts",
  "truncated": false
}
```
