-- This program is the last attempt of artificial intelligency with Ada.
-- Elhoim is Copyright (C) 2023 Manuel ; 
--
--   <one line to give the program's name and a brief idea of what it does.>
--   Copyright (C) 19yy  <name of author>
--
--   This program is free software; you can redistribute it and/or modify
--   it under the terms of the GNU General Public License as published by
--   the Free Software Foundation; either version 2 of the License, or
--   (at your option) any later version.
--
--   This program is distributed in the hope that it will be useful,
--   but WITHOUT ANY WARRANTY; without even the implied warranty of
--   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--   GNU General Public License for more details.
--
--   You should have received a copy of the GNU General Public License
--   along with this program; if not, write to the Free Software
--   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
--
-- Date := "2023-05-15 09:43:17"
-- Version := "0.3.1a"
with Ada.Wide_Text_Io;
package body Lib.Langua is
   package W_Io renames Ada.Wide_Text_Io;
   
   use Parole ;
   function Exist_Word (Lex : in Wide_String) return Boolean is
   begin
      for Lexic in Languages ' range loop
	 
	 if Languages(Lexic) /= null then
	    for Gram in Languages(Lexic) ' range  loop
	       
	       if Languages(Lexic)(Gram) /= null then
		  for Word in Languages(Lexic)(Gram) ' range loop
		     
		     if Languages(Lexic)(Gram)(Word) /= null and then
		       Languages(Lexic)(Gram)(Word).Lex.all = Lex then
			
			return True;
		     end if;
		  end loop;
	       end if;
	    end loop;
	 end if;
      end loop;
      
      return False;
   end Exist_Word;
end Lib.Langua ;