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

Should labels have a prefix? #9

Open jonathanrobie opened 7 years ago

jonathanrobie commented 7 years ago

Currently, labels do not have a prefix. This is convenient for Greek, but makes parsing more difficult for languages that use Latin characters. We might want to consider requiring a prefix when writing Treedown as text, but letting displays hide the prefix and use syntax highlighting to improve figure/ground.

If we add a prefix, then markup like this:

s χάρις io ὑμῖν s καὶ εἰρήνη v πληθυνθείη.

would have a prefix added to each alphabetic label, e.g. if the prefix is ':':

:s χάρις :io ὑμῖν :s καὶ εἰρήνη :v πληθυνθείη.

jtauber commented 7 years ago

When you say "parsing" do you mean by humans or by machine?

I don't think it makes a difference to humans (as you say, displays will hide it anyway, and syntax highlighting will make the distinction clear in editors).

Is your concern machine parsing in the cases where I line does NOT have any label but starts with a word that looks like a label?

jonathanrobie commented 7 years ago

I mean by machine, and especially across languages like English that use the Latin alphabet. And especially in the case of a line that does not have a label.

I noticed this creating Treedown for English sentences to illustrate concepts.

jtauber commented 7 years ago

Yeah, I can see why this would be helpful where a line doesn't have a label. Makes the regex for syntax highlighting in an editor more robust too.

jonathanrobie commented 7 years ago

I think we should either (1) require the label, or (2) prefix labels, but not both. I'm inclined to go with the prefix. To me, figure/ground issues and readability are the most important criteria for this choice.

jtauber commented 7 years ago

Does the lack of a label imply a particular label (or subset of labels) or is it possible for "incremental" treedown to involve doing the indentation without yet choosing labels. The latter would seem quite useful. In other words, support breaking the clause down into verb and arguments without yet labelling the argument roles.

rkjtan commented 7 years ago

I agree with James that "incremental" treedown that does indentation without yet choosing labels would be useful. So, could we add: (1) Make it optional for users to add the prefix or not (probably most users would omit it for convenience's sake); but (2) automatically convert any files to add the prefix everywhere it ought to be (even if there is no label, but the indentation/spacing indicates that a label could/should be added at some point? That way, for example, people who prefer to label conj or not would still have files that are compatible (those who have conj have extra conj labels while those who don't just have the prefix with no label, but the indentation & spacing would be the same for both camps).