Closed uogbuji closed 6 months ago
Oh, I would also say that all keys starting with _
are reserved for (possibly future) Word Loom-specced use.
Furthermore, alternate languages would be specified using _
followed by an IETF language code, e.g. _fr
.
Above commit implements changes discussed above (on a branch until agreed & ready 😊)
TOML table metadata would be a welcome addition for declarative prompt composition using Word Loom. Deprecating the text
and markers
keys in that way makes sense, given the proposal for indicating metadata and seems justified as a breaking change.
Having spent some time working with Word Loom lately, I have a few enhancements in mind. @chimezie, would love your thoughts.
First of all, I'd like to to formalize the name "language item" (just "item" for short) for each entity that's specified with a TOML table.
I'd like to add support for language item metadata. In effect, any other key/value pairs within the TOML table for an item would be passed in as metadata associated with that item to the Word Loom implementation. There is actually an example of this already in the Word Loom "spec" (
[i18n_context] / source
), but I completely omitted any discussion of that. I would just add the formalization that it would be preserved as item metadata. Such metadata would support e.g. control features for how language items are selected & processed for LLM prompts.Then probably the most controversial bit. In order to lower the footprint of English language in Word Loom, and also free up a couple of other metadata keys, I would deprecate the
text
key in favor of just_
(inspired by gettext) and deprecate themarkers
key in favor of_m
.