Truenumbers and how they work
Truenumbers is a higher-level data representation intelligible to humans and machines. It unifies the way users, developers and every part of a system talk about information, independent of implementation. Truenumbers is based on two principles:
- Treating data as a collection of independent, atomic data items
- Expressing them in a structured natural language that both humans and machines can use
A truenumber is an atom of data
A truenumber is a single value sealed in a secure, portable package together with its own description written in a simple language that's natural and easy to learn. We'll define that language in more detail later, but here's an example of making a truenumber. Using the TrueOffice Excel add-in, we write the following into a spreadsheet cell:
[estimated construction cost of the new data center = 35 USD millions].
It is sent to the cloud where it's compiled, stored, and returned to your spreadsheet cell as a truenumber. There, TrueOffice grabs the descriptive DNA inside and uses it to generate a cell comment automatically.
The truenumber looks like the number "35" to Excel, so the spreadsheet will work normally for any Excel users without Truenumbers. Copy it to Word or email and its DNA goes with it where TrueOffice can use it to generate a sentence or a footnote.
Having self-contained data like truenumbers opens up many new possibilities. Similar to email, each truenumber has a subject, author and creation date to help you organize and search them, so you could find all truenumbers that have "new data center" as their subject, or search for "costs" or "construction costs". Convert from USD to any other currency because our number knows it's in millions of dollars. Truenumbers can also be tagged, which is the way to organize truenumbers on the fly, and create business processes without programming that provide better governance than your best enterprise software.
Statements of measurement
Now let's take a deeper look at the Truenumbers language. Here's another example of a truenumber sentence:
“the antenna of the Chrysler building has nominal height = 71 feet“
This looks like human natural language, but is restricted to statements of a particular form, that state a value for a property of something. One of the allowed sentence forms is <subject> has <property> = <value>. In this example, the subject is "antenna of Chrysler building" (we ignore filler words like the and an) and the property is "nominal height".
To more completely structure the sentence, we encode the subject and property as strings called Structured Resource Descriptors (SRD). An SRD is a path-like sequence of words separated by colon ( : ) and forward-slash ( / ) operators. The colon operator separates an adjective-noun pair, basically an “IS-A” relationship. For example, building:Chrysler is the SRD for the phrase “Chrysler building”. Note that the noun is first in the SRD – the reverse of the English phrase.
The slash operator acts like the preposition “of” used in English to denote belonging to, or a “HAS-A” relationship. The phrase “antenna of Chrysler building” is equivalent to SRD building:Chrysler/antenna and is the subject of the sentence. The keyword has separates the property height:nominal from the subject. We represent properties as SRDs too. It’s OK to use SRD’s in sentences if you want, instead of equivalent phrases, so this fact could also be written:
"building:Chrysler/antenna has height:nominal = 71 ft"
So, a truenumber consists of the subject the fact is about, a property of that subject, and the value of that property. Truenumber sentences are convenient for people to read and write, and they correspond to a data structure in the computer. This structure can have different implementations for storing in different databases, but the most portable representation is JSON, the format used by the Truenumbers APIs. In simplified form, a JSON truenumber looks like the following (the actual format for the API is a bit more complex):
In the JSON above, we notice an array of SRDs labeled “tags”. A truenumber can be decorated with any number tags to enrich, qualify or classify it The tags shown tell us that the Chrysler building is located in New York, and is associated with a truenumber demo project. Tags allow us to aggregate facts or create relationships among them.
It’s SRD subjects, tags and properties that shape the knowledge in truenumbers. Given a bag of truenumbers, the SRDs tell us what subjects being talked about, what sort of properties are of interest, and so forth. SRDs read left to right, from the general to the specific, so they also make excellent keys for indexing or wildcard searches, and they naturally form trees, for example: These are useful tools for visualizing the vocabulary of a domain. As we gather more facts about New York, for example, we might find that the building tree has hundreds of branches if we’re talking about many buildings. But an SRD is computationally very light-weight, being only a string, so vocabularies can be dynamic, complex and large.