Sequenced Across Sentences In Document
- Last Updated: May 29, 2026
- 5 minute read
- Semaphore
- Documentation
Summary
The Sequenced Across Sentences In Document Context looks for sentences in order in the same document.
They look for facts (and anchors) that are separated by specific gaps, called skips. How many skips can exist between the anchors and / or facts can be very precisely controlled at each point in the sequence.
The skips count in the same punctuation type as the rest of the sequence. That is, if the sequence type is sentences, then specifying a skip of 5 on such a sequence will result in a skip of up to or, at most 5 paragraphs being allowed between the preceding and succeeding elements.
Elements appearing in the same paragraph will not fire the context unless the Loose metadata attribute is set to On for the sequence.
- Sequenced Across Sentences in Paragraph(s) contexts are a subset of Sequenced Across Sentence(s) Contexts
Usage Notes
Use this context when the anchors and facts you are interested in are contained in sentences within a document. Note that the elements of this context must be listed in the correct sequence using the ORDERED LIST in the Narrower Concepts section.
Sequenced Across Sentences In Document Properties
The following table is common to all of the Sequenced Across Sentences In Document Contexts.
Hierarchical relationships
| Label | Range | Require/Optional | Constraints |
|---|---|---|---|
| anchor | Context Elements | At least one of these is Required |
one or more allowed |
| captured fact | Captured Fact | ::: | |
| fact | Context Elements | ::: | one or more allowed |
| not anchor | Context Elements | ::: | one or more allowed |
| not fact | Context Elements | ::: | one or more allowed |
| optional anchor | Context Elements | Optional | one or more allowed |
| optional fact | Context Elements | Optional | one or more allowed |
| skip | Skip | Optional | one or more allowed |
Associative relationships
| Label | Range | Require/Optional | Constraints |
|---|---|---|---|
| depended on by context | Contexts | Optional | only one allowed |
| depends on context | Contexts | Optional | only one allowed |
| extract fact as | Fact Name | Optional | only one allowed |
| group fact as | Fact Name | Optional | only one allowed |
| location | Locations | Optional | only one allowed |
| precluded by context | Contexts | Optional | only one allowed |
| precludes_context | Contexts | Optional | only one allowed |
| Punctuation | Punctuation rules | Optional | only one allowed |
Alternative labels
None
Metadata
| Label | Range | Require/Optional | Constraints |
|---|---|---|---|
| context position from document end | Integer | Optional | only one allowed |
| context position from document start | Integer | Optional | only one allowed |
| fact position from context end | Integer | Optional | only one allowed |
| fact position from context start | Integer | Optional | only one allowed |
| field | String | Optional | only one allowed |
| loose | Boolean | Optional | only one allowed |
| return group fact ID | Boolean | Optional | only one allowed |
| return raw text also | Boolean | Optional | only one allowed |
| return value using regex | String | Optional | only one allowed |
| {1-10} greedy repeat | Integer | Optional | one or more allowed |
| {1-10} non-greedy repeat | Integer | Optional | one or more allowed |
Example model and tests
The example we will use from the “FactExtraction-Example” model is the Document Fact DF22 - Facts as anchors that contains a sequenced extractor (DF22 - Facts as anchors::sequenced sentences)

The Sequenced Across Sentences extractor is looking for:
- A Taxonomy Fact used as an anchor (concepts from the Action Taxonomy)
- A non-greedy skip of 5 (NOTE: Because the context is Sequenced Across Sentences in Document, the skip for up to 5 sentences.)
- A Taxonomy Fact (concepts from the Noise Taxonomy)
Positive test content - Example 1

* The Action Taxonomy concept “release” appears in the first sentence. It is the required anchor that is also returned as a fact.
- The Noise Taxonomy concept “grinding” is returned as a fact.
- Note that release and grinding are in separate sentences and there is one sentence between them.
- Even though the Noise Taxonomy concept squeek appears in the sentence after grinding - well within the allowed skip of 5 sentences - it is not returned because the “context position from document start” is set to 1; meaning that only the first occurrence will fire.
Positive test content - Example 2

- The Action Taxonomy concept “apply” appears in the first sentence. It is the required anchor that is also returned as a fact.
- The Noise Taxonomy concepts “rumble”, “grinding”, and “squeek” are all returned as facts because they all appear in the same sentence.
- Note that the Action Taxonomy concept and Noise Taxonomy concepts are in different sentences, but there is no sentence between them.
Negative test content - Example
“If I apply a little oil to the door hinges, the squeek goes away.”
- Although it fires for other extractors, the DF22 - Facts as anchors::sequenced sentences extractor will not fire since it is looking for the facts in separate sentences, whereas this content has the concepts apply and squeek appearing in the same sentence.
- For this example to fire, you would need to add the “loose” metadata attribute to the extractor
