#!/usr/local/bin/perl -w

# this is not actually used by the Duluth systems, since the
# data in LexSample has been preprocessed and all % in the
# WordNet senseid's have already been converted. However, if
# you do your own preprocessing you will want to take care
# of those tildes, as Weka views them as comments

# the senseval 2 data uses wordnet sense tags, which include
# an embedded %. Unfortunately weka treats those as comments.
# So we convert the # to ~ for weka, and thereafter convert
# the ~ back to % for reporting senseval results

# tilde.pl changes % to ~
# tilde-rem.pl changes ~ to %
                                 
# this format causes weka problems
# <answer instance="art.40030" senseid="art%1:09:00::"/> 

# this format causes is ok
# <answer instance="art.40030" senseid="art~1:09:00::"/> 

while (<>)
{
    s /%([0-9]+):([0-9]+):([0-9]+):/~$1:$2:$3:/g;
    print $_;
}
