
% The initiator for the linguistic analyser
% Allows the user to type in a sentence, ending with a carriage-return
% which read_string/1 converts to a Prolog list for the analyser
% nlidb/0 + process_string form a failure-driven loop

nlidb :-
  write('Welcome to BH-NLIDB'), nl, nl,
    repeat,
    nl,
    write('> '),
    read_string(String), nl,
    process_string(String).

process_string(String):-
	String = [stop], !,
	write('Goodbye'), nl.

process_string(String):-
    linguistic_analyser(String),
    fail.


