code$ swipl -s code_English.prolog
% Janus 1.5.2 embeds Python 3.13.13 (main, Apr 8 2026, 18:23:14) [Clang 21.0.0 (clang-2100.0.123.102)]
Manual & tutorial: https://sandiway.arizona.edu Sandiway Fong (2024-2026)
Run: ?- parse(List,SO,L). (; for more answers)
List = [..words] (input), SO,L = syntactic object, [..] spellout (output)
See derivation: ?- report. ?- graph. (<- after parse/3) ?- summary. (short)
for a long report ?- retract(no_fill).
LEX expansion: ⒜ WordNet: ?- useMorphy. (noMorphy)
assert/retract/?- : use_morphy(C), for C={v,n,a,r}. ⒝ edit lex.prolog
⒞ ?- addNoun(Word) (addTr/addUrg/addUnacc/addAdj/addPrep).
Welcome to SWI-Prolog (threaded, 64 bits, version 10.0.2)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
% Interactive session; added `.` to Python `sys.path`
101 ?- parse([who,saw,'John'],S,L).
Words: who saw John
Initial WS: John see_θ v_see:θ:pst INFL_v who
INT/EXT: {C_Q_left(who), {INFL_v, {who, {v_see:θ:pst, {see_θ, John}}}}}
EXT: who →→ 3sg pst see John
Spellout: who 3sg pst see John
Spellout: who saw John
Parse found!
S = {C_Q_left(who), {INFL_v, {who, {v_see:θ:pst, {see_θ, John}}}}},
L = [who,saw,John] ;
INT/EXT: {C_Q_left(who), {INFL_v, {John, {v_see:θ:pst:box(who), {see_θ, who}}}}}
EXT: who null pst see →→ John 3sg pst see
Spellout: who 3sg pst do John see
Spellout: who did John see
Blocked: inconsistent with input!
Initial WS: John saw_θ v_saw:θ:pres INFL_v who
INT/EXT: {C_Q_left(who), {INFL_v, {who, {v_saw:θ:pres, {saw_θ, John}}}}}
EXT: who →→ 3sg pres saw John
Spellout: who 3sg pres saw John
Spellout: who saws John
Blocked: inconsistent with input!
INT/EXT: {C_Q_left(who), {INFL_v, {John, {v_saw:θ:pres:box(who), {saw_θ, who}}}}}
EXT: who null pres saw →→ John 3sg pres saw
Spellout: who 3sg pres do John saw
Spellout: who does John saw
Blocked: inconsistent with input!
Initial WS: John saw_θ v_saw:θ:nonf who
Initial WS: John see_θ v_see:θ:pst INFL_v C_rel_who
Initial WS: John saw_θ v_saw:θ:pres INFL_v C_rel_who
Initial WS: John saw_θ v_saw:θ:nonf C_rel_who
false.
103 ?- report.
REPORT LENGTH: 101
true.
104 ?-