biblicalhumanities / treedown

Markdown for syntax trees - see http://jonathanrobie.biblicalhumanities.org/blog/2017/05/12/lowfat-treebanks-visualizing/
Apache License 2.0
7 stars 0 forks source link

Extensibility #13

Open jonathanrobie opened 7 years ago

jonathanrobie commented 7 years ago

Treedown currently has two extensibility mechanisms:

  1. 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.

  2. 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:

+ τότε          ( adj:class=time, ana:status=proposed )
    v λέγει
    io αὐτῷ
    s ὁ Ἰησοῦς
jtauber commented 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.

jonathanrobie commented 7 years ago

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 )