next up previous
Next: Removing Suffixes Up: No Title Previous: Letter Tree Definition

Finding Words

% find_word(+Word,+Tree,-LexEntry)
%  Finds Word in Tree retrieving LexEntry.
find_word([H|T],Tree,LexEntry) :-
   member([H|Branches],Tree),
   find_word(T,Branches,LexEntry).

find_word([],Tree,LexEntry) :-
   member(LexEntry,Tree),
   \+ (LexEntry = [_|_]).


Mike Rosner
Mon Feb 14 08:45:31 MET 2000