anchor.diff:  
   correct([]) -> [];
   
  +%correct a word
   correct(Word) ->
     whereis(spelling_corrector_server) ! {correct, self(), Word},
     receive    
  
positive.code: -import(expander, [expand/1]).
  
  -export([correct/1, init/1, loop_correct/1]).
  
  
  line_token_to_tuple([_|[H2|[H3|[]]]]) ->
  
negative.code:           X when X =/= -1  -> 
             Sender ! {found, Word},
              loop_correct(Dict);
            _ ->  
              PossibleWords = expander:expand(Word, expand_once), % get all the possible variations from expander
              CorrectedWord = find_most_common(Dict,PossibleWords), % find most common word as a solution
            
              % only double-expand short words, because performance
              case ((length(CorrectedWord) == 0) and (length(Word) =< ?MIN_SIZE_TO_DOUBLE_EXPAND)) of 
                true ->
                  PossibleWords2 = expander:expand(Word, expand_twice),
                  CorrectedWord2 = find_most_common(Dict,PossibleWords2),
                  Sender ! {found, CorrectedWord2};
                false ->
                  Sender ! {found, CorrectedWord} 
                end,
              loop_correct(Dict)
            end
        end.
  
  %initialize corrector with dictionary
  init(DictionaryFile) ->
    Dict = maps:from_list(load_file(DictionaryFile)),
    Pid = spawn(?MODULE, loop_correct, [Dict]),
  