[VoxBo] automated conversion of token-based .ref file to numeric
Dongbo Hu
dongbo at mail.med.upenn.edu
Wed Sep 13 11:50:45 EDT 2006
Sorry, I found an error in my previous email about converting condition
function from string to numeric format. Here is the bloody details:
Suppose you have a condition function as simple as:
foo
bar
foo
bar
By default, before converting the keys to numeric format, vbcfx will
collect the unique keys from the original file and sort them
alphabetically. In the example above, the unique keys are "foo" and "bar".
After sorting, the order is "bar", "foo". So "bar" will be set to 0 and
"foo" to 1. But there is one exception: if one key is "0" or "baseline",
that key will always be ranked first and set to 0.
So the ref file listed above will be converted to:
1
0
1
0
If this is not the order you want, you can define your own in the header.
For example, if you change the original condition function to:
; condition: foo
; condition: bar
foo
bar
foo
bar
Note the two comment lines that define the order of the keys. That means
you want to set foo to 0 and bar to 1. These lines will overwrite the
default order.
Now vbcfx will give you a numeric condition function like:
0
1
0
1
I am sorry if my previous email caused any confusion. Let me know if you
need more help.
Dongbo
On Wed, 13 Sep 2006, Daniel Drucker wrote:
>_On 9/13/06, Dongbo Hu <dongbo at mail.med.upenn.edu> wrote:
>_> There is a program in voxbo called "vbcfx" that can convert the condition
>_> function from string to numeric format. By default it changes the first
>_> condition key to 0, the second unique key to 1, the third to 2, and so
>_> forth. You can define your own order of the key by adding a header in the
>_> original condition function's comments before running the program. vbcfx
>_> used to be called "txt2num", which is an alias to vbcfx now.
>_
More information about the voxbo-general
mailing list