Thursday, July 15, 2010

Terminology checking v0.01

So. I just posted v0.01 of a terminology checker script to the Wiki. It is painfully naive in its structure and coding, but it got the job done tonight for some terminology checking I wanted to do, and it illustrates just how simple these basic tools can be. The key of it is this:
foreach $s ($ttx->segments()) {
my $c = $t->check ($s->source, $s->translated);
if ($c) {
foreach my $missing (keys %$c) {
$terms->{$missing} = $c->{$missing};
$bad->{$missing} = [] unless defined $bad->{$missing};
push @{$bad->{$missing}}, $s;

Now, note that it's using a termbase module I haven't published yet (because it's even more terribly naive), but the key here is that this loop is really, really simple.

This is what translation tools should look like. I'm pretty happy with this.

No comments:

Post a Comment