Archive for the ‘General’ Category

A Markup Language for Documenting BabelScript

Saturday, May 1st, 2010

So far the very small amount of documentation that I’ve written concerning BabelScript, aside from these blog posts, has been created using DocBook. I will shortly be adding the predicate definitions covering computer terminology, but rather than continue in the same manner this strikes me as an almost ideal candidate for a custom markup language that can be transformed using XSL:

  • The final result will be large but highly structured, consisting of many thousands of predicate descriptions that (with a few notable exceptions such as numbers) all follow broadly the same pattern.
  • I would strongly prefer not to commit to any particular layout at the present time.
  • It is quite conceivable that there will be a need to present the documentation in several ways, with different layout and perhaps also different content

The elements currently defined are:

  • babelscriptml, the root of the document
  • topic, corresponding to a top-level namespace
  • subtopic, corresponding to a second- or lower-level namespace
  • title, the title of a topic or subtopic
  • naming, specifying how predicates are named in a topic or subtopic if this is done systematically
  • predicate-def, the definition of a predicate containing (at least) the predicate defined and a description
  • predicate, the name of a predicate
  • description, a description of a predicate, topic or subtopic
  • compare, a predicate that it is instructive to compare with the one being described
  • note, an additional comment within a topic, subtopic or predicate definition

This is not intended to be a final list, but I won’t be adding anything that is not needed for the task in hand. The markup is strictly ad hoc in nature, and I do not intend to worry about forward or backward compatibility with anything outside the Project Babel source repository.

Letter Apostrophes

Saturday, March 21st, 2009

Attempting to process some Ukrainian text raised the problem that the apostrophe character - or to be more precise, the typewriter apostrophe (U+0027) that was inherited from ASCII - is not currently allowed to occur within BabelCode/BabelScript identifiers.

However, this turns out not to be a problem at all, because there is another character called ‘letter apostrophe’ (U+02BC) specifically intended for use when it has the function of a letter, as opposed to a separator or a delimeter. This is already allowed to occur within an identifier, therefore no change to the library has been necessary.

For use as a punctuation mark the preferred character is apparently U+2019. This too is already allowed to occur within an identifier, as will be necessary when (for example) forming possessives in English.

Demonstration of Cardinal Number Generation

Friday, March 20th, 2009

There are now twenty-two languages for which cardinal numbers can now be generated. You could already see this for yourself by downloading and compiling the source code, but not everyone will want or be able to do this. I’ve therefore created a small web application to demonstrate the capability. To try it, click here. You simply choose a language, a number to start from and a step size, and it will display up to twenty results in order.

The languages currently supported are Catalan (ca), Danish (da), German (de), English (en), Spanish (es), Estonian (et), Basque (eu), Finnish (fi), Faroese (fo), French (fr), Hungarian (hu), Italian (it), Icelandic (is), Lithuanian (lt), Latvian (lv), Norwegian (nb), Dutch (nl), Polish (pl), Portuguese (pt), Romanian (ro), Portuguese (pt) and Swedish (sv). Known limitations of the system as it stands are noted at the bottom of the page.