Unsequenced In Paragraph(s)
- Last Updated: May 29, 2026
- 2 minute read
- Semaphore
- Documentation
Summary of usage
The Unsequenced In Paragraph(s) Context looks for a fact and / or anchor in the same paragraph. If they are, then the extractor fires and will return the fact or facts.
This context is looking for the fact or anchor to be in the same paragraph. You can set the width count to say that that constraint can be spread outwards from the one paragraph to more paragraphs.
Negated and optional anchors / facts can be used with this context quite easily.
Exemplification
The TTL format of an example model can be found here: unsequencedinparagraph.wildcardanchor.startofdocument
This model has an anchor and a fact that should appear in the same paragraph, and where the the anchor must appear at the start of the paragraph.
Testing this model with:
this content:
wines and healthy ham.
gives this response:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<STRUCTUREDDOCUMENT>
<META name="Type" value="TEXT (4003)"/>
<SYSTEM name="DeterminedLanguage" value="english"/>
<SYSTEM name="LanguageGuessed" value="no"/>
<META name="DocumentType" value="Doc" score="1.00"/>
<META name="Mentioned food" value="Ham" score="1.00"/>
</STRUCTUREDDOCUMENT>
</response>
this content:
healthy ham and sparkling wines
gives this response:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<STRUCTUREDDOCUMENT>
<META name="Type" value="TEXT (4003)"/>
<SYSTEM name="DeterminedLanguage" value="english"/>
<SYSTEM name="LanguageGuessed" value="no"/>
</STRUCTUREDDOCUMENT>
</response>
this content:
wines. middle sentence. healthy ham.
gives this response:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<STRUCTUREDDOCUMENT>
<META name="Type" value="TEXT (4003)"/>
<SYSTEM name="DeterminedLanguage" value="english"/>
<SYSTEM name="LanguageGuessed" value="no"/>
<META name="DocumentType" value="Doc" score="1.00"/>
<META name="Mentioned food" value="Ham" score="1.00"/>
</STRUCTUREDDOCUMENT>
</response>
Unsequenced In Paragraph(s) Context Properties
Mandatory hierarchical relationships
| Label | Range | Constraints |
|---|---|---|
| fact | Context Elements | one or more allowed |
| or | ||
| not anchor | Context Elements | one or more allowed |
| or | ||
| anchor | Context Elements | one or more allowed |
| or | ||
| not fact | Context Elements | one or more allowed |
Optional hierarchical relationships
| Label | Range | Constraints |
|---|---|---|
| anchor | 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 | one or more allowed |
| optional fact | Context Elements | one or more allowed |
Mandatory associative relationships
| Label | Range | Constraints |
|---|---|---|
| (none) |
Optional associative relationships
| Label | Range | Constraints |
|---|---|---|
| depended on by context | Contexts | only one allowed |
| depends on context | Contexts | only one allowed |
| extract fact as | Fact Name | only one allowed |
| group fact as | Fact Name | only one allowed |
| location | Locations | only one allowed |
| precluded by context | Contexts | only one allowed |
| precludes_context | Contexts | only one allowed |
| punctuation | Punctuation rules | only one allowed |
Mandatory alternative labels
| Label | Range | Constraints |
|---|---|---|
| (none) |
Optional alternative labels
| Label | Range | Constraints |
|---|---|---|
| (none) |
Mandatory metadata
| Label | Range | Constraints |
|---|---|---|
| (none) |
Optional metadata
| Label | Range | Constraints |
|---|---|---|
| context position from document end | Integer | only one allowed |
| context position from document start | Integer | only one allowed |
| fact position from context end | Integer | only one allowed |
| fact position from context start | Integer | only one allowed |
| width for context | Integer | only one allowed |
| field | String | only one allowed |
| loose | Boolean | only one allowed |
| return group fact ID | Boolean | only one allowed |
| return raw text also | Boolean | only one allowed |
| return value using regex | String | only one allowed |
| {1-10} greedy repeat | Integer | one or more allowed |
| {1-10} non-greedy repeat | Integer | one or more allowed |
| debug | Boolean | only one allowed |