Powered by Zoomin Software. For more details please contactZoomin

The Semaphore 5.12 Fact Extraction Framework (FACTS)

Facts as contextualized text

  • Last Updated: November 24, 2026
  • 7 minute read
    • Semaphore
    • Version 5.12
    • Documentation

We will now outline the FACTS methodology and the view it takes of fact extraction and classification.

1. What is a context?

A context is a range of text that has somehow been identified in the content and around which the fact we wish to extract occurs. However, as said before, if the fact we wish top extract has enough structure in and of itself, then we might be able to use simply that, without further contextualization.

A context can be defined in several ways. The most basic one is that a context has a starting point (e.g. word, document marker) and an ending point. Such a context can then be said to have a range of words that lie between those two points – we refer to that as the context’s phrase range or range. The fact that we are interested in extracting or classifying then lies within or next to that context’s range. For example, the following text contains two dates:

   Date of approval: 10th January 2018
   Publish date: 20th March 2018”

We could say, on a simple reading, that such content has two facts in it. However, our project’s requirements might only be interested in extracting a single date, the approval date. In that case, we need to be able to distinguish between the two dates, making only one a “fact”, as represented in our framework. To do that, we need to define its context, distinguishing it from the other date. Perhaps it is always the first date in the document type we are interested in. Perhaps it will always have the anchor “Date of approval” before it, and / or the anchor “Publish date” after it. All of those can be used as contexts for looking for an entity of type date. Should we find one, we can be very certain it is the date, the approval date, the fact, that we were looking for.

So, in this case, the inherent structure of a date is not in and of itself enough to choose the correct fact! We need some contextualization.

We can define contexts in many ways. Semaphore can bring its understanding of grammatical units and structures to the methodology. That is, we can identify a context as being a phrase, a sentence, a paragraph, or even the whole document, through using some feature they possess to identify them. That could be a word, or words, (that is, anchor or anchors), or even the fact itself, such as an entity (e.g. sentences with dates in them). For grammatical structures such as words, sentences, and paragraphs, that can also include their location in the document, e.g. does the context start or end the document, a paragraph, a sentence, etc. Out of the box, Semaphore will identify several grammatical units and structures, such as:

  1. Words
  2. Sentences
  3. Paragraphs
  4. Documents
  5. Fields (e.g. title, header, footer, body, etc.)
  6. Punctuation (e.g. ignore it or not within different units such as paragraphs and sentences, etc.)
  7. Start / end of units (e.g. of paragraphs, sentences, documents, fields, etc.)

The resulting contexts should also contain the fact or facts that we are interested in extracting. After all, identifying a context is just a means to an end – it is the fact or facts that we really want to get at! Sometimes we are interested in extracting the entire context’s words – as that is the “fact” we are trying to extract, the raw free-text. Other times, it is a more granular and / or normalising approach we need, where within our context, we wish to extract only very specific text such as an entity (e.g. a person or date) or concept (a concept from a taxonomy) that we interpret as a “fact”.

2. What is a fact?

A fact is a unit of information contained within content that has a very specific meaning – in that, the information was definitely found, usually in a definite position or context, and that therefore it can be considered a “fact” of the document, within the scope of your project’s requirements. A fact can be almost any information you wish, and facts come in many different flavours. We saw examples of dates above, where the document, to the lay reader, apparently contained two facts; but we were only interested in one, the “Date of approval”, and that is the fact we would model in the framework for extraction.

Often, a fact will be a contextualized entity such as a date, person, organization, location, amount, unit, measure, and so on (that is, they pass a test of being certainly found, typically in certain places in the document). Of course, sometimes some of those entities might also be modelled as concepts in a taxonomy. We will come later to which representation is the better. But these are all typically single facts.

However, we can generalize what a fact is, and essentially create any custom fact we would like through the use of a very powerful technique called “Grouped facts”. We can group smaller facts into larger facts, or “grouped facts”. This grouping allows for the arbitrary creation of user-defined facts, which may be made up of any number of more basic, atomic, facts, arranged, hierarchically. For example, an address could be considered a “grouped fact” called “Address fact” which is itself made up of smaller facts, some of which might themselves be grouped facts, such as “Street fact”.

If we had the address text as below:

   Alan Flett
   Flat 25,
   1 Prince of Wales Road,
   London NW5 3LW

Then our fact might look like:

   ADDRESS:
        PERSON: Alan Flett 
        STREET ADDRESS:
             FLAT NUMBER: 25
             STREET:
                  STREET NUMBER: 1
                  STREET NAME: Acacia Avenue
             CITY: London
             POSTCODE: NW5 3LP

Here we have several facts, some of which only group others. The grouping ones are ADDRESS and STREET ADDRESS and STREET. The atonic facts are PERSON, STREET NUMBER, STREET NAME, CITY and POSTCODE.

In this way, we can build contextualised, or grouped, facts.

As we said, there are many different flavours of fact, but basically, you are typically looking for text that is either:

  1. Literally represented in the model; this will typically be matched using a concept (on its own or from a taxonomy), and its associated label evidence (as you would for any other classification strategy), e.g. the name of a city, such as “London” and its alternative labels such as “The Smoke”.
  2. Represented in the model as a matching wildcard pattern; this will typically be matched using a regex or wildcard pattern, where the variables bind to actual text values from the documents, e.g. the post code might be represented as “^^# #^^”.
  3. Represented in the model simply as an entity type; this will typically be matched using a trained entity zoner which has been trained to look for text that will likely be of that entity type (e.g. a date, organisation, person, etc.)

The idea of grouped facts leads naturally to the idea of grouped contexts; that is, you require a specific context to extract each fact in the correct context of the grouped fact. That way, you can start building up hierarchies of contexts and facts. This allows for very precise fact extraction. It also can be made to be robust as well (within limits), using certain strategies that we will come to later.

Using this method of hierarchies of contexts and facts, we can end up with very accurate, robust, flexible extraction

3. Some basic fact extraction strategies

Of course, as noted earlier, we have many different flavours of context extractors and facts that address many different fact extraction challenges. We will look at the contexts in more detail later. But, there are some general points we can make about the low level, or atomic (not grouped), facts.

It should go without saying, that the advice that follows depends to a large extent on your particular use case!

Typically, if querying the facts and unifying the same facts across the document corpus is something you wish to do, then it is best to extract facts using a taxonomy of concepts. This provides one very important advantage: identify. Identity is paramount if you wish to run semantic queries across your facts that describe your content. Concepts also allow for the precise matching of their textual labels (preferred and alternative) – as essentially a concept is a little zoner, where its ability to find text is dictated by the (alternative) labels you give it. It allows for greater accuracy in what we consider a fact to be, thereby allowing for very much looser contexts, that will consequently be more robust and flexible to variances in the content.

Entities that are discovered using trained approaches can be useful, especially for facts such as dates; however, other entities, whilst good, might not have the accuracy or recall percentages you might want for your fact extraction project. In such cases, then a taxonomy is the way to go; also, the extracted entity will not have an identity, simply being text (of a type). Depending on your requirements, a lack of identify might be a deal-breaker. Extracting raw text is perhaps the least beneficial from a semantic querying / integration point of view, but can be exactly what is required for certain use cases, where it is text that is required.

Lastly, for extracting numerical facts, wildcarded facts can be very useful, as, typically, the numbers will have a structure to them, as well as maybe a unit (where those units could come from a taxonomy, creating a grouped fact, using the wildcard fact and a taxonomy fact).

We can mix these facts up in context hierarchies, using the right one for the right job at the right time. Again, which is best for your particular fact extraction project will depend on your requirements for the extracted facts.


Next Section: FACTS: a fact extraction framework

Alert