aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[aspell] New to aspell


From: Daniel A. Scholnick
Subject: [aspell] New to aspell
Date: Thu, 2 Sep 1999 00:53:19 -0400 (EDT)

Hi,

I am new to aspell and I have been trying to compile a small test program 
to see if I can use aspell to put a spell checker into a web based email 
client I wrote with some friends.

Anyway, I have not been able to get my test program to work.  All I want 
to do is check the spelling of a word and get suggestions if it is 
wrong.  I am able to compile and run successfully the test program that 
came with the distribution (aspell.cc).  Since it's short, I've pasted my 
code onto the bottom of this email.  The program seg faults on the 
suggest function.  Could anyone tell me what I am doing 
incorrectly or does anyone have a very simple test file they could send me?

Thanks in advance for your help.  I'm pretty psyched to get this thing 
working.

-Dan Scholnick

void main() {

  string word;
  aspell checker;
  aspell::Suggestions suggestions;

  cout << "Please enter word to check: ";
  cin >> word;

  suggestions = checker.suggest(word);
  if (suggestions.size()) {
    for (int s = suggestions.size() - 1; s != 0; --s)
      cout << " " << suggestions[s] << ",";
    cout << " " << suggestions[0] << endl;
  }

}


---
Note: This message was origanlly posted to address@hidden,
      not address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]