LINGER Contributed by Paul O'Brien and Masoud Yazdani, Exeter University This entry contains two versions of the Linger program. The main directory (same directory as this LINGER.PRE file) is the original version which I have tested under Poplog Prolog. The subdirectory /NEW contains a newer version which is still in its original Prolog-2. This comes with English, German and Spanish grammars, as well as the French one of the original. I have not yet tested or converted the version in /NEW, so cannot comment on it. The file PROLOG.LOG in that directory shows a sample run. It is likely that the Linger program itself has been updated, since the original may not have been able to handle the extra grammatical and lexical features needed for the other languages. The rest of this LINGER.PRE file refers to the original version. It contains the following files: LINGER.PRE - This one. NOTE1.TXT - A brief note on how to use the original Prolog-2 version. PAPER1.TXT - A general description of the project. PAPER2.TXT - A paper on extending Linger to Spanish. SHELL.PL - The top-level source file. UTILS.PL - Other source files, consulted by SHELL. NAME.PL INPUT.PL DEBUG.PL INTERPRE.PL FRENCHD.PL - French dictionary. FRENCHG.PL - French grammar. To run Linger, consult SHELL.PL. Then type the goal 'run'. Linger will ask which language you want. Reply "french." (it only has a French grammar). Then type a French sentence, complete with full stop, question mark, or exclamation mark as terminator. Linger will display a parse tree, and tell you of any errors it detects. It will then ask whether you want another go. Reply "y." or "n.", and continue if appropriate. A sample run is shown below, with three sentences, all of which are slightly incorrect (Linger reports a noun not in its lexicon for the third one). Skip to the end of this run for further comments. ?- [ 'shell.pl' ]. Type "run" to start LINGER linger_shell.pl consulted yes ?- run. LINGER -- Language INdependent Grammatical Error Reporter What language do you want (french/english/spanish/german/italian)? ==> |: french. consulting Grammar consulting Dictionary Type your sentence ==>|: tu est une chat. Pre-parsing sentence Trying for a legal parse Legal parse found Parse tree selected: sentence main_clause subj_phr noun_pron_phr pronoun : [tu, 1] verb_phr pos_or_neg_verb_cons pos_verb_cons rp_pron_list pron_list pron_list2 governing_verb verb_or_aux_verb aux_verb : [est, 2] dir_obj_phr noun_phr determiner : [une, 3] adj_list noun : [chat, 4] adj_list indir_obj_phr Your sentence was: --- tu est une chat . --- I think the correct version of your sentence should read: >>> tu est un chat . <<< **** Comments **** determiner "une" changed to "un" : [gender(m), plurality(s), apostrophe(n)] **** End Comments **** Another go ? ==> |: y. Type your sentence ==>|: vous est un chat. Pre-parsing sentence Trying for a legal parse Legal parse found Parse tree selected: sentence main_clause subj_phr noun_pron_phr pronoun : [vous, 1] verb_phr pos_or_neg_verb_cons pos_verb_cons rp_pron_list pron_list pron_list2 governing_verb verb_or_aux_verb aux_verb : [est, 2] dir_obj_phr noun_phr determiner : [un, 3] adj_list noun : [chat, 4] adj_list indir_obj_phr Your sentence was: --- vous est un chat . --- I think the correct version of your sentence should read: >>> vous e4tes un chat . <<< **** Comments **** aux_verb "est" changed to "e4tes" : [tense(present), transitivity(t), person(2), plurality(p)] **** End Comments **** Another go ? ==> |: y. Type your sentence ==>|: j'ai vu un herisson. Pre-parsing sentence Trying for a legal parse Legal parse found Parse tree selected: sentence main_clause subj_phr noun_pron_phr pronoun : [j', 1] verb_phr pos_or_neg_verb_cons pos_verb_cons rp_pron_list pron_list pron_list2 aux_verb : [ai, 2] governing_verb past_participle : [vu, 3] dir_obj_phr noun_phr determiner : [un, 4] adj_list noun : [herisson, 5] adj_list indir_obj_phr Your sentence was: --- j' ai vu un herisson . --- I think the correct version of your sentence should read: >>> j' ai vu un . <<< **** Comments **** "herisson" is unknown and has been guessed to be of type noun **** End Comments **** Another go ? ==> |: n. You may need to change the way files are consulted in SHELL.PL, to suit your system's preferences. I've noted other portability problems at the start of each source file. If you are using Linger, please let Masoud Yazdani know. His Janet E-mail address is MASOUD @ UK.AC.EXETER.CS. CHECKED ON EDINBURGH-COMPATIBLE (POPLOG) PROLOG : yes. PORTABILITY: one user running Sbprolog got warning messages about variable goals (X rather than call(X)). I have changed one of these so it contains an explicit 'call', but there may be others. INTERNAL DOCUMENTATION : comments for portability problems.