Skip to content

Commit 52a7e03

Browse files
committed
corrections to annotation path article
1 parent cdb10dc commit 52a7e03

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

articles/search/cognitive-search-concept-annotations-syntax.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ ms.date: 09/16/2022
1111
---
1212
# Reference an annotation in an Azure Cognitive Search skillset
1313

14-
In this article, you'll learn how to reference *annotations* (or an enrichment node) in skill definitions, using examples to illustrate various scenarios. Skills read inputs and write outputs to nodes in an [enriched document](cognitive-search-working-with-skillsets.md#enrichment-tree) tree, building the tree as the enrichments progress. Any node can be used as an input for further downstream enrichment, or mapped to an output field in an index. This article introduces the syntax and provides examples for specifying a path. For the full syntax, see [Skill context and input annotation language language](cognitive-search-skill-annotation-language.md).
14+
In this article, you'll learn how to reference *annotations* (or an enrichment node) in skill definitions, using examples to illustrate various scenarios.
1515

16-
Paths to an annotation are specified in the "context" and "source" properties:
16+
Skills read inputs and write outputs to nodes in an [enriched document](cognitive-search-working-with-skillsets.md#enrichment-tree) tree, building the tree as the enrichments progress. Any node can be referenced in an input for further downstream enrichment, or mapped to an output field in an index. This article introduces the syntax and provides examples for specifying a path to a node. For the full syntax, see [Skill context and input annotation language language](cognitive-search-skill-annotation-language.md).
17+
18+
Paths to an annotation are specified in the "context" and "source" properties of a skillset, and in [output field mappings](cognitive-search-output-field-mapping.md) in an indexer. Here's an example of paths in a skillset:
1719

1820
:::image type="content" source="media/cognitive-search-annotations-syntax/content-source-annotation-path.png" alt-text="Screenshot of a skillset definition with context and source elements highlighted.":::
1921

20-
The example in the screenshot illustrates annotation syntax for an item in a Cosmos DB collection.
22+
The example in the screenshot illustrates the path for an item in a Cosmos DB collection.
2123

2224
+ "context" is `/document/HotelId` because the collection is partitioned into documents by the `/HotelId` field.
2325

@@ -33,19 +35,20 @@ Before reviewing the syntax, let's revisit a few important concepts to better un
3335
| "annotation" | Within an enriched document, a node that is created and populated by a skill, such as "text" and "layoutText" in the OCR skill, is called an annotation. An enriched document is populated with both annotations and unchanged field values or metadata copied from the source. |
3436
| "context" | The context in which the enrichment takes place, in terms of which element or component of the document is enriched. By default, the enrichment context is at the `"/document"` level, scoped to individual documents contained in the data source. When a skill runs, the outputs of that skill become [properties of the defined context](#example-2). |
3537

36-
## Root nodes and context
38+
## Common examples
3739

38-
An enriched document is created in the "document cracking" stage of indexer execution, when the indexer opens a document or reads in a row from the data source. Initially, the only node in an enriched document is the [root node (`/document`)](cognitive-search-skill-annotation-language.md#document-root), and it's the node from which all other enrichments occur.
40+
An enriched document is created in the "document cracking" stage of indexer execution, when the indexer opens a document or reads in a row from the data source. Initially, the only node in an enriched document is the [root node (`/document`)](cognitive-search-skill-annotation-language.md#document-root), and it's the node from which all other enrichments occur. All paths start with `/document`.
3941

4042
The following list identifies several well-known paths:
4143

4244
+ `/document` is the root node and indicates an entire blob in Azure Storage, or a row in a SQL table.
43-
+ `/document/{key}` is the syntax for a document or item in a Cosmos DB collection.
44-
+ `/document/content` is the "content" property of a JSON blob.
45+
+ `/document/{key}` is the syntax for a document or item in a Cosmos DB collection, where `{key}` is the actual key, such as "HotelId" in the previous example.
46+
+ `/document/content` is the "content" property of a JSON blob.
47+
+ `/document/{field}` is the syntax for an operation that's performed on a specific field, such as the "/document/Description" field in the previous example.
4548
+ `/document/pages/*` or `/document/sentences/*` become the context if you're breaking a large document into smaller chunks for processing.
4649
+ `/document/normalized_images/*` is created during document cracking if the document contains images. All paths to images start with normalized_images.
4750

48-
Examples in this article are based on the *content* field generated automatically by [Azure Blob indexers](search-howto-indexing-azure-blob-storage.md) as part of the [document cracking](search-indexer-overview.md#document-cracking) phase. When referring to documents from a Blob container, use a format such as `"/document/content"`, where the *content* field is part of the *document*.
51+
Examples in the remainder of this article are based on the "content" field generated automatically by [Azure Blob indexers](search-howto-indexing-azure-blob-storage.md) as part of the [document cracking](search-indexer-overview.md#document-cracking) phase. When referring to documents from a Blob container, use a format such as `"/document/content"`, where the "content" field is part of the "document".
4952

5053
<a name="example-1"></a>
5154

0 commit comments

Comments
 (0)