function dictionary_decode ( )

%*****************************************************************************80
%
%% dictionary_decode() applies dictionary decoding to a text file.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 November 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'dictionary_decode():\n' );
  fprintf ( 1, '  Apply dictionary decoding to a file.\n' );
  fprintf ( 1, '\n' );

  list2 = textread ( 'gettysburg_address_dictionary.txt', '%s' );

  code = load ( 'gettysburg_address_encoded.txt' );

  code_num = length ( code );

  for i = 1 : code_num
    fprintf ( 1, ' %s', list2{code(i)} );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'dictionary_decode():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

