/* Copyright 2004 Nadav Har'El and Dan Kenigsberg */ #include #include #include #include "prefixes.c" #include "hspell.h" /* this little program creates aspell affix information for Hebrew according to * the hebrew.wgz*. This version creates a single rule for each of hspell's * "word specifier". Each rule expands to all the prefixes that provide that * specifier (excluding the null prefix, which is currently implied.) */ int main(void) { int i, specifier; char seen_specifiers[100], rulechar; int already_seen=0, seen, count; FILE *prefixfp, *wordsfp, *hefp; int prefixes_size; char *prefix_is_word; hefp = fopen("he_affix.dat", "w"); fprintf(hefp, "# This file was generated automatically from data prepared\n" "# by the Hspell project (http://ivrix.org.il/projects/spell-" "checker).\n# Hspell version %d.%d%s was used.\n" "# The conversion was carried out in %s\n", HSPELL_VERSION_MAJOR,HSPELL_VERSION_MINOR,HSPELL_VERSION_EXTRA, __DATE__); fprintf(hefp, "# Copyright 2004, Nadav Har'El and Dan Kenigsberg\n"); prefixfp = popen("gzip -dc hebrew.wgz.prefixes", "r"); while ((specifier=fgetc(prefixfp))!= EOF) { for(i=0, seen=0; (i