Open jonathanrobie opened 7 years ago
I do like having an extensibility mechanism but I think we may want to distinguish when it's:
I like the approach of extensions being keyword/value pairs.
We could use a scope keyword in extensions. "The scope of the constituent this line starts" is probably the most important one, and might be default. Something like:
( scope=constituent, dg=topic ) ( scope=word, dg=focus )
Treedown currently has two extensibility mechanisms:
The set of labels will be configurable. Ideally, we want related projects to use the same labels for the sake of interoperable queries and building communities of understanding, but some projects will need to use their own labels or add new labels that have not yet been adopted into core.
Extension expressions allow keyword / value pairs in parentheses. Keywords can be prefixed, e.g. extensions that indicate the semantic function of an adjunct might be use a prefix to indicate a set of semantics associated with a project. An adjunct might also be used to indicate the status of an analysis - proposed, approved, etc. Multiple extensions can occur in a single extension expression.
Example: