So I guess, that puts me at a three and a half-day weekend. Today was mostly spent improving sematiser. Don't really remember why. Just sort of felt like it. I really hope this is what 'work' is like after the PhD... doing stuff because you feel like it.
Writing it in Perl is a pain. There's times I'm tempted to rewrite the whole thing in Haskell. Mind you, it's not a language chauvanism thing or what have you, it's just that one of the tasks that sematiser has is parsing the lexConverter's .lex format. Today, I discovered that one of the bugs was due to me not ignoring comments, so I had to throw in this little piece of stackly code before my chomp()
$in_comment++ if (s/(.*)\/\*/$1/);
$in_comment-- if ($in_comment > 0 and s/\*\/(.*)/$1/);
next if ($in_comment > 0);
If I had Parsec -- hell, I could use Yannick's lexConverter Parsec code -- I wouldn't have to deal with crap like this. But then again, I don't know. Today, I kinda had fun playing around in Perl. Kinda of refreshing to take a break, to just do things the messy, ugly, horrible unsafe way. Not useful, but sorta amusing at times, assuming you don't get ticked off dealing with stupid runtime errors that your compiler should have picked up.
Besides that, Claire had noticed that the sematiser would printing out lots of blank entries when dealing with questions. It was because I had my regular expressions wrong when feeding stuff to tree-tagger. I wasn't dealing with question marks or exclamation points. Simple fix:
sed -e 's/[^\.\?!] *$/ ./' -e 's/\$//' |\
tree-tagger-french -o "-eos-tag eos -token -lemma"
Other than that, I've been trying to plug holes in sematiser's Tree-Tagger to TSNLP lexicon mapping. Had to tell it for example, that "en and "y" with category "PRO:PER" are what TSNLP calls "cl" (clitics).
Had an idea that maybe we should use the semantic macros as a way to control sematiser's semantic output. Claire doesn't think it will be too useful because basicProperty macro is used, like, all over the place... but I dunno. I think it might pay off. Only hacking will tell.










