Extracting an entire sentence’s / paragraph’s text as a fact
- Last Updated: July 8, 2026
- 2 minute read
- Semaphore
- Documentation
This use case allows you to extract all text in a grammatical unit that contains all of the requisite anchors.
An example might be:
This is a deadly serious sentence that talks about cream cakes!
Where we are looking to extract the whole sentence when it contain the anchor phrase “deadly serious” so that our fact called “Important Sentence” looks like:
Important Sentence :: This is a deadly serious sentence that talks about cream cakes!
To do that, we can actually set “extract fact as” on the context itself - usually, we would use “group facts as” on a context, and it would be the child fact types which would have the “extract fact as”.
It should be noted that when we set the metadata “return raw text also” on a context, that is in effect all we are doing - setting an extraction point on the context itself, albeit with the reserved fact name of “return raw text also”. If you wish to use your own fact name, then you must use this strategy outlined here.
A model design that does this would be:
A document type
A document fact
A sentence context :: SOME SENTENCE / PARAGRAPH CONTEXT
extract fact as :: SOME FACT NAME
anchor :: SOME ANCHOR
Such a FACTS model would look for the anchor and then return the entire sentence. It will return all sentences in the document that contain the matching anchor.
If you import the attached model TTL Model to Extract the Context you will see a model design like this.
