> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/audience-and-activation/target-contextually/contextual-reference/semantic-targeting.md).

# Semantic targeting

What the semantic engine extracts from a page - entities, IAB categories, raw keywords - and how the three differ.

## What it is

Semantic targeting builds a list of URLs from criteria you name yourself: entities, IAB categories, raw keywords, URLs, and channels. It uses natural language processing to parse, analyse, and extract semantic information from your content, and the models behind it are continuously updated and retrained so that new products and newly famous people are recognised.

The solution supports English, French, Polish, Spanish, and many other languages.

## What is extracted from a page

Three things, and they are not interchangeable.

<table data-search="false"><thead><tr><th width="170">Extraction</th><th>What it produces</th><th width="150">Targeting breadth</th></tr></thead><tbody><tr><td><strong>Raw keywords</strong></td><td>The raw content, so exact words or expressions can be matched. <em>Currently in alpha.</em></td><td>Semi-narrow</td></tr><tr><td><strong>Entities</strong></td><td>Named-entity recognition locates and classifies named entities into real-world objects: person names, organisations, locations, medical codes, time expressions, quantities, monetary values, percentages.</td><td>Narrow</td></tr><tr><td><strong>Categories</strong></td><td>Zero to many categories, following IAB Taxonomy v2.</td><td>Broad</td></tr></tbody></table>

Combined with URL targeting, that gives you a spectrum:

* **Narrow** - target entities that refer precisely to what you want, or a given URL.
* **Semi-narrow** - target raw keywords, which may have several meanings, or a set of URLs such as `https://yoursite/news/politics`.
* **Broad** - target one or several categories, or a large set of URLs such as `https://yoursite/news`.

## Entities versus raw keywords

This is the distinction that decides which feature you reach for, and the difference is meaning.

{% hint style="info" %}
**Worked through, on the word "orange".**

* To target content containing occurrences of the **"Orange fruit"** - cooking recipes, for instance - use **Target Entities** and select *"Orange (fruit)"* in your targeting selection.
* To target content containing the word **"Orange"** irrespective of its meaning - the company, the fruit, the colour, the city in Vaucluse - use **Target Raw keywords** and add "Orange".
  {% endhint %}

Entity recognition is hard precisely because written language is ambiguous, and disambiguation is what the entity feature buys you. The engine draws on a knowledge base built from sources such as Wikipedia, DBPedia, Wikidata, social data, and billions of indexed web pages, and scores every extracted entity with several kinds of signal:

* **Shallow methods** - the presence of "kitchen" alongside "orange" suggests the fruit.
* **Graph-based approaches** - examining links from cooking-related pages to the entity.
* **Deeper linguistic analysis** - reading "orange" as the object of the verb "cut" to infer the fruit.

Where several entities remain plausible, a further disambiguation step runs - for example between Orange, France and Orange, USA, both places.

## Category classification

Classification assigns overarching categories to content. Doing it by hand does not scale, so the engine combines a large entity graph, a semantic understanding of the relationships between words in the document, and machine learning to assign the categories automatically.

{% hint style="info" %}
**Worked through.** "White wine, vinegar, and fresh citrus create layers of tangy flavor in this bright duck à l'orange recipe" intuitively falls under "Cooking and baking" - and note that a purely keyword-based reading of the same sentence would have surfaced "orange" the ambiguous token, not the topic.
{% endhint %}

## Raw keyword rules

Raw keywords let you define the exact words or expressions to match against ingested content.

### Providing them

Two input options: upload a file, which must be **UTF-8 encoded**, or paste keywords directly into the input field.

| Rule         | Value                                         |
| ------------ | --------------------------------------------- |
| Separator    | Commas                                        |
| Each keyword | A single word, or an expression               |
| Maximum      | **2,000 keywords**                            |
| Matching     | **Accent-sensitive** but **case-insensitive** |

### What matches what

| Content ingested      | Values that match                                                                                      | Values that do not match                                                          |
| --------------------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
| machine learning      | <p><code>machine learning</code><br><code>machine LEARNING</code><br><code>machine,learning</code></p> | <p><code>learning machine</code><br><code>machin</code><br><code>learn</code></p> |
| tâche ménagère        | <p><code>tâche ménagère</code><br><code>tâche</code><br><code>tâche,ménagère</code></p>                | `tache menagere`                                                                  |
| tache menagere        | <p><code>tache menagere</code><br><code>tache</code><br><code>tache,menagere</code></p>                | `tâche ménagère`                                                                  |
| machines              | `machines`                                                                                             | `machine`                                                                         |
| l'apnée               | <p><code>l'apnée</code><br><code>apnée</code></p>                                                      | `l'apnee`                                                                         |
| Love , Death & Robots | <p><code>Death & Robots,Love</code><br><code>Love,Death,Robots</code></p>                              |                                                                                   |

{% hint style="warning" %}
Read the table as three rules: word order does not matter, partial words do not match, and accents must be reproduced exactly. `machine` does not match the content `machines`, and `tache` does not match `tâche`.
{% endhint %}

## Two limits worth knowing before you plan

{% hint style="danger" %}

* **Raw keywords can only be used within targeting lists** - never as audience segment criteria.
* **Raw keywords cannot be used as an exclusion criterion.** Entities and categories can. See [Blacklists](/audience-and-activation/target-contextually/contextual-reference/targeting-lists.md#blacklist-management).
  {% endhint %}

## What you can build from it

Using these capabilities you can build either:

* **Targeting lists** - sets of URLs to be targeted. See [Targeting lists](/audience-and-activation/target-contextually/contextual-reference/targeting-lists.md).
* **Audience segments** - sets of users to be targeted, built in the [segment builders](/audience-and-activation/build-your-audiences/segment-reference/segment-builders.md). See [Use contextual targeting in segments](/audience-and-activation/target-contextually/use-contextual-targeting-in-segments.md).

## Its targeting key

A semantic list activates under the targeting key `ct_semantic_mics`, carrying the **targeting list ID** as the targeting value. See [Contextual activation](/audience-and-activation/target-contextually/contextual-reference/contextual-activation.md#the-targeting-keys).

## Related pages

<table data-view="cards" data-search="false"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Target content based on semantic criteria</strong></td><td>The procedure, step by step.</td><td><a href="/audience-and-activation/target-contextually/target-content-based-on-semantic-criteria.md">Target content based on semantic criteria</a></td></tr><tr><td><strong>Targeting lists</strong></td><td>The object these criteria produce.</td><td><a href="/audience-and-activation/target-contextually/contextual-reference/targeting-lists.md">Targeting lists</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/audience-and-activation/target-contextually/contextual-reference/semantic-targeting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
