opencog / link-grammar

The CMU Link Grammar natural language parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASpell is still enabled by default although the ChangeLog says it's disabled by default

ryandesign opened this issue · comments

ASpell is disabled by default now as of #1376 but ./configure --help still says it's enabled by default:

Optional Features:
  --disable-aspell        Build without ASpell support (default is enabled)

link-grammar/configure.ac

Lines 532 to 536 in 3a26127

do_aspell=yes
# ASpell Support is handled here
AC_ARG_ENABLE([aspell], [AS_HELP_STRING([--disable-aspell],
[Build without ASpell support (default is enabled)])],
[do_aspell="${enableval}"])

Actually it looks like ASpell is still enabled by default, just as configure help says it is.

ASpell is disabled if HunSpell is found. But if HunSpell is not installed and ASpell is, then link-grammar does enable ASpell, and at the end of the configure output it prints:

   ----------
   Caution: Aspell version 0.60.8 and possibly others leak memory!
   Do not enable spell-guessing in production servers!
   ----------

This is unexpected given that the last ChangeLog entry that mentions ASpell says:

* Disable aspell; it leaks memory. #1373

@linas,
I propose to change configure as follows:

  • If hunspell is not found, issue a warning.
  • Set the default for aspell to "disabled".

I did open a bug report w/aspell around the time I first spotted that mem leak (more than a year ago, when #1373 was opened) and the developer did eventually fix it (about 3 months after opening the bug report) So now we wait until all the distros pick up the newest version of aspell. Current Debian stable is still aspell 0.60.8

Solution is to leave aspell enabled by default. It only leaks maybe 32 bytes per call, so even after a million calls, its still only 32MBytes and so more-or-less unnoticable. I hit this with opencog, where I was doing billions of calls and I special-case worked around it, there.

The ChangeLog and the bug summary #1376 was wrong; the actual commit just prints a warning. I think that's good enough.

Closing; I fixed the ChangeLog in #1515 If there's something I've missed, open a new bug report.