W3C home > Mailing lists > Public > www-multimodal@w3.org > October 2004

Very basic unipen to inkml converter

From: Max Froumentin <mf@w3.org>
Date: Sat, 16 Oct 2004 18:39:28 +0100
To: www-multimodal@w3.org
Message-ID: <87ekjypnov.fsf@w3.org>


I've written a very simple converter, available at


- It's written in Ruby. See http://www.ruby-lang.org/en/ for more information.
  it takes a unipen file on the standard input and writes the inkml result on
  the standard output (e.g. "unipen2inkml.rb < in.unipen > out.inkml")

- I've only run it on the BSE example 
    http://www.w3.org/2004/10/ex1.unipen (http://www.w3.org/2004/10/ex1.inkml)
    which is simple enough that the conversion can be done by simple string
    manipulation. More complex examples will require more complex code. Feel 
    free to write it...
Notes on conversion:

The Unipen definition is taken from http://hwr.nici.kun.nl/unipen/unipen.def
The InkML definition is taken from http://www.w3.org/TR/2004/WD-InkML-20040928

- resolution: the inkml spec doesn't specify possible values for units, so
  the units found in the input are copied as is
- a lot of metadata in the unipen file (like .PAD) doesn't map to inkml
  structures. So they are ignored for now.
- Segment information found in the source inkml file is converted using
  traceRef, e.g:

.SEGMENT WORD 0:0-10:100 OK Britain 

<traceRef unipen:type='WORD' unipen:quality='OK' unipen:label='Britain' 
 from='0:0' to='10:100'/>

- the unipen namespace is introduced to qualify the attributes
- href is omitted from traceRef, assuming that the traceRef thus applies
  to the whole document. This is a bug in the current inkml spec, in my 

Feedback welcome,

Received on Saturday, 16 October 2004 17:39:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:42:39 UTC