On Sun, February 22, 2009 1:02 pm, Christoph LANGE wrote:
> On Sunday 22 February 2009 04:52:44 Professor James Davenport wrote:
>> > More naturally from my point of view is treating [the unit
>> abbreviation]
>> > problem as a problem of rendering OpenMath to presentation markup.
>> For
>> > that, our (admittedly,
>>
>> No - it's a bi-directional problem, I think. If not, then your
>> suggestion is at least plausible.
>
> I see.  You're right, so far I've only touched the "content ->
> presentation"
> direction.  When would the other direction apply?  Are you talking about
> parsing?  (E.g. parsing the input given to Jonathan's converter?)  Then,
Parsing (as in that example) orpossibly re-parsing, hybrid markup etc.
> an explicit markup for abbreviated units would make sense, as it would
> facilitate
> parsing.  On the other hand, one could argue that this is a subproblem of
> the
> larger problem of parsing presentation markup back to content markup -- a
> problem that has not yet been solved sufficiently.
AGREED (but why make it harder by adding this). Our (Davenport/Naylor)
reasoning went roughtly like this (as far as I can reconstruct it).
(a) Somehow, we need to connect the bizarre strings mph (and to a lesser
extent kmph) with their semantic content.
(*) I say bizarre in that 'm' is normally the abbreviation for metres, not
miles, and only crops up here (and, though we hadn't coded it, in 'mpg'=
"miles per gallon", for fuel efficiency). The point is that these strings
are not partof a general pattern: one can't use 'p' as a symbol for
division in general.
(b) Therefore there needs to be a semantic concept on which to hook this
parse.
(c) It would be better if this were a well-defined concept (an OMS in this
case), rather than a compound object.
Of course, you're welcome to disagree with any step of this reasoning.
>> > not-yet-standard) approach is defining notations, and we do that by
>> > mapping content markup patterns to presentation markup templates.
>> That
>> > said, we could easily define a "presentation context" "abbreviated"
>> > and then map
>> >
>> > units_imperial1#mile to "mi"
>> > units_time1#hour to "hr"
>> > (arith1#divide units_imperial1#mile units_time1#hour) to "mph".
>>
>> Sorry - I don'tseehow this one works.
>
> Let me give you a concrete example for the latter, in our notation
> definition syntax (see the MKM 2008 paper or
> http://kwarc.info/publications/papers/KLMMR_NfAD.pdf for details):
<snip>
> Now assume the content markup (abbreviated in Lisp style)
>
> (arith1#times
>   1
>   (arith1#divide
>     units_imperial1#mile
>     units_time1#hour))
>
> Suppose "times" renders to the "invisible times" symbol.  Suppose there is
> a general notation definition for "divide" (rendering as a/b): This one
> would be
> ignored here, as the more specific one given above applies.  Then, the
> content
> markup would render to "1 invisible-times mph", which is what we want.
OK - I see how it works in this direction now.
> The additional benefit of this approach is, as I believe, the one can use
> context-dependent presentation.  Think of kilometres per hour, which are
> rendered as "kph" in English but as "km/h" in other languages.  (Is that
> right?)
I normally use 'kmph', but I'm not sure how general that is. Next time I
wander outside here (i.e. Canada) I'll look more carefully at the road
signs.


James Davenport
Visiting Full Professor, University of Waterloo
Otherwise:
Hebron & Medlock Professor of Information Technology and
Chairman, Powerful Computing WP, University of Bath
OpenMath Content Dictionary Editor
IMU Committee on Electronic Information and Communication

_______________________________________________
Om mailing list
[email protected]
http://openmath.org/mailman/listinfo/om

Reply via email to