Graph

One of the seven tools of Topsoil Commons. This is Layer 4, shared truth.

Graph shows what a text actually says: the names it uses and the links it states between them.

You get a map of the names and links in a text, one you can search and check for yourself.

First step: read the measured result below. It says in plain words how much Graph found and how much it missed.

Written in Python. Its main work needs no added code libraries.

View on GitHub

Measured result

Graph was checked on 22 documents that people had labeled by hand. Those documents held 148 named things, such as people, groups, places, and dates, and 75 links stated between them.

Of every 100 named things in the documents, Graph found 100 and missed 0. Of every 100 links stated in the documents, Graph found 85 and missed 15.

Of every 100 named things Graph returned, 96 were right. Of every 100 links Graph returned, 51 were right.

What was looked forFound rightMissedExtra and wrong
Named things in the text14806
Links stated in the text641162

Key: Found right is how many Graph found that were truly there. Missed is how many were there and Graph did not find. Extra and wrong is how many Graph returned that were not there.

The misses are named, not hidden: Graph misses names its word lists do not know, such as Warsaw and Neil Armstrong, and it cannot follow pronouns across sentences.

About

You give Graph a piece of text. It finds the people, groups, places, dates, and tools the text names. It also finds links the text states, such as who founded a group, where a group is based, and who works for it. It puts the names and links in a map you can search and check.

It works by fixed rules and word lists. It does not use a large language model. It was built to learn how far plain rules can go on their own.

For agents and builders

Precision means the share of what the extractor returned that was right. Recall means the share of the hand labeled set that the extractor found. F1 means the single score that balances precision and recall.

What was pulled from the textPrecisionRecallF1RightWrongMissed
Entities0.96101.00000.980114860
Relations0.50790.85330.6368646211

Method: the extractor was run on the hand labeled set named in the artifact, 22 documents with 148 gold entities and 75 gold relations. The artifact is results/eval_results.json in this repository. Right, wrong, and missed count items in that set.

For agents: the eval results stand as data in results/eval_results.json in this repository, the same file the table above is generated from.

The research under this layer: Foundations, Truth and shared knowledge

Built on Cohort: belonging.

Unlocks the ability to discern.