Builds upon the Ddot.it Parse Specification and Ddot.it Highlight Specification.
-
Last Modified: 2026-07-28
-
Version: 1.2.0
Autocompletion
Ddot.it has five completable slots. They use the same letters as the Information Model, so one vocabulary runs through all the specifications:
| Letter | Slot | Holds |
|---|---|---|
| Subject | an entity name |
| Relation | a relation name (named after RDF’s predicate) |
| Object | an entity name or a data value |
| MetaRelation | a relation name |
| MetaObject | an entity name or a data value |
There is no sixth completable slot. Meta text — the free text after a ,, that holds no triple — is prose, and autocompletion never fires inside it.
What is completed from what
The five slots fall into two families:
- Value-like (
s,o,mo) -
they name entities and data values.
- Relation-like (
p,mr) -
they name relations.
Completing a slot queries the values already seen in other slots. Each query lists its own slot first, then the rest of its own family, then the other family.
| Cursor in | Query slots, in ranking order |
|---|---|
Subject |
|
Relation |
|
Object |
|
MetaRelation |
|
MetaObject |
|
A relation-like cursor stays inside its own family: completing a relation from the set of objects would offer values where a relation name belongs, so the value-like slots are not offered there at all.
a …. b and a .. .. b carry the implicit relation links to, and have no relation slot in the text. With the caret between the two dot pairs, treat that gap as an empty Relation slot: offer the Relation query, and inserting a name rewrites the untyped form into the typed one, so a .. .. b becomes a ..name.. b. The untyped form is then a natural way to start a triple whose relation is not yet decided.
Ranking
Every candidate that the catalog admits and that prefix-matches is offered. Ranking decides the order of that list, and nothing else — see The catalog ranks; it does not filter.
Fit
Corpus:
Alice ..works at.. Acme
Acme ..has type.. Company
Globex ..has type.. Company
Carol ..has type.. PersonTyping an Object in `Dave ..works at.. `:
-
Acme,Globex— fit: objects ofworks atareCompanyinstances, and so are these. -
Company,Person— no fit; poolo(they appear as objects ofhas type). -
Alice,Carol— no fit; pools. -
has type,works at— no fit; poolp, last because a relation name in an object slot is the least likely of the admitted candidates. Alphabetical within the group (key 7).
Carol is a Person and does not fit works at — and is still offered, ranked below every Company. Had the author simply not typed Carol ..has type.. Person yet, filtering would have hidden a name they were about to need.
Knowing which slot the cursor is in
There is no separate grammar for autocompletion, and there should not be one. The slot at the cursor is read directly off the parse automaton that the Parse Specification already defines.
Where completion fires
Autocompletion and highlighting answer different questions, and deliberately use different rules for what counts as a slot.
Command completion
Typing any command prefix switches completion from values to commands, ranked above the value queries.
block is slot-appropriate in exactly the three positions block-as-field allows — Subject, Object and MetaObject. It is not ranked first in a Relation or MetaRelation, where it cannot open a block at all. |