[voikko-devel] Malaga 7.6

Harri Pitkänen hatapitk at cc.jyu.fi
Wed Sep 20 13:28:16 EEST 2006


Here are some issues we have found from Malaga 7.6

1) The missing include: the one that Anssi reported earlier was enough to fix 
the build also on OS X, with or without readline support.
--- malaga-7.6.orig/commands_interactive.c	2006-09-05 08:54:22.000000000 +0300
+++ malaga-7.6/commands_interactive.c	2006-09-05 09:00:09.000000000 +0300
@@ -8,6 +8,7 @@
 
 #include <setjmp.h>
 #include <glib.h>
+#include <stdio.h>
 #include "basic.h"
 #include "commands.h"
 #include "commands_interactive.h"

I can happily report that Malaga is now being used to proofread real newspaper 
texts in one local Finnish newspaper thanks to the support for OS X :)

2) There is an odd link in the release tar.gz:
grammars/german/.#german.syn -> bjoern at localhost.localdomain.16593:1140248090

3) Source files do not have the GPL header. I am not sure if this is a problem 
at all, since it is very clearly stated in README that the program is 
available under the GPL. But the copyright file from old Debian packages 
seems to indicate that those headers have previously been used. Was there 
some specific reason to remove them, other than making maintenace easier?

4) We recently found out that it may take very long time for Malaga to process 
certain long strings that have millions (or more) possible analyses. This is 
of course not a bug but perfectly expected behaviour. However, as we are 
using Malaga to do spell checking, it would be nice to have a way to abort 
the processing of an input string if more than some predefined number of 
combi_rule calls have been done and the analysis is still not finished.

For this, I would propose that following new function be added to malaga.h as 
an alternative for analyse_item:

extern void analyse_item_limited( string_t item, grammar_t grammar, int_t * 
combi_rule_limit );
/* Analyse ITEM according to GRAMMAR.
 * GRAMMAR must be MORPHOLOGY or SYNTAX.
 * Integer referenced by COMBI_RULE_LIMIT will be decremented upon every
 * combi_rule call as long as it remains positive; if it reaches 0, the
 * analysis is aborted with no results.
 * This function sets "malaga_error". */

If this sounds OK, I am willing to write a patch to implement this 
functionality.

Harri



More information about the devel mailing list