
#include <aspell.h>
#include <stdio.h>


int main() {

  AspellConfig* spell_config = new_aspell_config();
    aspell_config_replace(spell_config, "lang", "pl_PL"); 
  
  AspellCanHaveError* possible_err = new_aspell_speller(spell_config); 

  AspellSpeller* spell_checker = 0; 
  if (aspell_error_number(possible_err) != 0) 
    printf( "%s\n", aspell_error_message(possible_err) ); 
  else 
    spell_checker = to_aspell_speller(possible_err); 

  int correct = aspell_speller_check( spell_checker, "gura", -1 );
  printf("%d\n", correct);
/*
  const AspellWordList* suggestions = 
    aspell_speller_suggest( spell_checker, "gura", -1 ); 
  
  AspellStringEnumeration* elements = aspell_word_list_elements(suggestions); 
  
  const char* word; 
  
  while ( (word = aspell_string_enumeration_next(elements)) != NULL ) 
    { 
      printf("%s\n", word);
    }
*/
  return 0;
  
};

