Open soldni opened 1 year ago
ACTUALLY @josephcc hates the meh face operation ._.
; so instead we are going to have three different to look for things based on type of lookup:
sg.context
: does the current symbols-based intersection (e.g., you now do sg.context.tokens
instead of sg.tokens
)sg.intersection
: does visual intersection (this is new and will have to be implemented)sg.relations
: looks up relations between objects (was going to be ._.
face)
Desired API functionality
given span group/box group
sg
, we define the following syntax:Data structures need
An index that maps
Annotation.id
to the annotation itselfFor key, we are going to use
<field_type, Annotation.id>
; a user is no longer allowed to defineid
, those are internally computedA RelationGroup class
This is a subclass of
Annotation
, can have metadata about the relation, links strictly two annotations together.Indexer, but for relations
This is a mapping from
<Annotation, relation_type>
to a list ofRelationGroup
.Maybe we want to rename the current indexer to
intersection_indexer
and then have arelations_indexer
.Clean up
uuid
s in favor of simpler, integer basedid
sOptional nice to have
Consider being able to overload dot notations to bet able to fast track dot-underscore-dot without accessing relations.
In order to do that, we would need to have a table that keeps track of the preferred mode of relations between fields. So for example,
page.tokes
might be an intersection, butcitation.bib
might be a relations.