Found Entity Factuality

The factuality attribute of found entities specifies the factual status of the entity mention: ‘factual’, ‘hypothetical’, or ‘generic’.

Example NLP API result file:

Specifically, the following snippet from the file contains the new factuality field.

1"entities": {
2 "found": [
3 ...
4 {
5 "attributes": {
6 "experiencer": "patient",
7 "factuality": "factual",
8 "heading_status": "outside_heading",
9 "known_ambiguity": "unambiguous"
10 },
11 "concept_confidences": {},
12 "concept_links": [
13 "68099d0bf40b872656827ef8bf74bb608af1f9ffa0eac4acad45fc8ad02c5ef8"
14 ],
15 "entity_type": {
16 "snomed": "finding",
17 "umls": "Finding"
18 },
19 "label": "0c26ac2a6767945906b94f6b49b2b6791f2cb400c8ca16ffbb1f27ca0f7501a3",
20 "locations": [
21 "58ba61cab62b4d6e96fa61ab41dfb8079a58e5cf67bd2efcb0325c901b26059d",
22 "ef9ee4d9d548f80a0b6a7e16e286236ba709fe41894346860fdd0bd7a2581d82"
23 ],
24 "section_name": "INTRO",
25 "spans": [
26 {
27 "end": 284,
28 "start": 276
29 }
30 ],
31 "text": [
32 "vacation"
33 ]
34 },
35...

Changes

Python API

There is a new attribute: factuality. When returned by the NLP API this will be ‘factual’, ‘hypothetical’, or ‘generic’ (it may also be None if not returned by the NLP API).

Schema changes

The factuality attribute is stored in the foundentity table in a new column.

The schema of that table now looks like (for PostgreSQL):

Table "public.foundentity"
Column | Type | Collation | Nullable | Default
-----------------+------------------------+-----------+----------+-----------------------------------------
id | integer | | not null | nextval('foundentity_id_seq'::regclass)
polarity | character varying(255) | | |
section_name | text | | |
uncertainty | character varying(255) | | |
known_ambiguity | character varying(255) | | |
question_status | character varying(255) | | |
guidance | character varying(255) | | |
experiencer | character varying(255) | | |
factuality | character varying(255) | | |
heading_status | character varying(15) | | |
text | text | | |
start | integer | | |
document_id | integer | | not null |
Indexes:
"pk_foundentity" PRIMARY KEY, btree (id)
Foreign-key constraints:
"fk_foundentity_document_id_document" FOREIGN KEY (document_id) REFERENCES document(id)
Referenced by:
TABLE "foundentityconcept" CONSTRAINT "fk_foundentityconcept_found_entity_id_foundentity" FOREIGN KEY (found_entity_id) REFERENCES foundentity(id)
TABLE "foundentitylocation" CONSTRAINT "fk_foundentitylocation_found_entity_id_foundentity" FOREIGN KEY (found_entity_id) REFERENCES foundentity(id)
TABLE "foundentitymeasurementunit" CONSTRAINT "fk_foundentitymeasurementunit_found_entity_id_foundentity" FOREIGN KEY (found_entity_id) REFERENCES foundentity(id)
TABLE "foundentityspan" CONSTRAINT "fk_foundentityspan_found_entity_id_foundentity" FOREIGN KEY (found_entity_id) REFERENCES foundentity(id)
TABLE "foundentitytype" CONSTRAINT "fk_foundentitytype_found_entity_id_foundentity" FOREIGN KEY (found_entity_id) REFERENCES foundentity(id)