NO TITLE FOUND
- Last Updated: October 30, 2026
- 3 minute read
- Semaphore
- Documentation
In FACTS we can stop a fact from being extracted (returned) if it overlaps some other fact or anchor.
That is, we can essentially have a “blacklist” of anchors / facts that we do not want to return.
This can be very useful as it leads to more simple extractors - write the extractor for the general case and then just stop the edge cases from coming back.
Examples
We are looking for foods in a document. To extract those foods we need them to be in the same paragraph as two anchors “required1” and “required2”. However, we do not want any foods extracted if they occur in another range of text that begins with “required1” and ends with “required2”.
That is, these should return Beer:
Beer. Sentence with required1 and required2.
as we have the fact “Beer” and the two required anchors “required” and “reuired2” in the same paragraph.
This should return Beer:
Beer. Sentence with required1. Another sentence with required2.
as we have the fact “Beer” and the two required anchors “required1” and “required2” in the same paragraph.
This should return Beer:
Another paragraph with required2.
as we have the fact “Beer” and part of the “all” that required the two anchors “required1” and “reuired2” in the same paragraph.
This should return Beer:
Wine. Another paragraph with required2.
as we have the fact “Beer” and “Wine” and part of the “all” that required the two anchors “required1” and “reuired2” in the same paragraph.
This should return Beer:
window start Beer window end. Sentence with required1 and required2.
as we have the fact “Beer” and part of the “all” that required the two anchors “required1” and “reuired2” in the same paragraph - and the overlapping range of text that would stop our anchors from firing are not actually around them, it is aroudn the fact, which will not affect it.
But these should not return:
Next paragraph with required1 and required2.
Next paragraph with required2 and required1.
as we have the fact “Beer” and no part of the “all” that required the two anchors “required1” and “reuired2” in the same paragraph.
Beer. Sentence with required1 only.
as we have the fact “Beer” and only one anchor of the “all” that required the two anchors “required1” and “reuired2” in the same paragraph.
Beer. Sentence with required2 only.
as we have the fact “Beer” and only one anchor of the “all” that required the two anchors “required1” and “reuired2” in the same paragraph.
Beer. Sentence with window start required1 and required2 window end.
as we have the fact “Beer” and the anchors of the “all” that required the two anchors “required1” and “reuired2” both inside the overlapping window which excludes them.
Beer. Sentence with window start required1 window end and required2.
as we have the fact “Beer” and one of the anchors of the “all” that required the two anchors “required1” and “reuired2” inside the overlapping window which excludes it and the “all” rule.
window start Beer. Sentence with required1 window end and required2.
as we have the fact “Beer” and one of the anchors of the “all” that required the two anchors “required1” and “reuired2” inside the overlapping window which excludes it and the “all” rule.