/usr/share/mozart/examples/grammar/shieber.oz is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | %%%
%%% Authors:
%%% Gert Smolka <smolka@ps.uni-sb.de>
%%%
%%% Copyright:
%%% Gert Smolka, 1998
%%%
%%% Last change:
%%% $Date: 2001-05-25 19:04:07 +0200 (Fri, 25 May 2001) $ by $Author: schulte $
%%% $Revision: 13860 $
%%%
%%% This file is part of Mozart, an implementation
%%% of Oz 3
%%% http://www.mozart-oz.org
%%%
%%% See the file "LICENSE" or
%%% http://www.mozart-oz.org/LICENSE.html
%%% for information on usage and redistribution
%%% of this file, and for a DISCLAIMER OF ALL
%%% WARRANTIES.
%%%
\insert 'shieber/formalism.oz'
\insert 'shieber/grammar.oz'
/*
% parse
{GrammarAgent query(proc {$ F}
F^lexin = [uther persuades cornwall to sleep]
end)}
% parse
{GrammarAgent query(proc {$ F}
F^lexin = [uther _ cornwall _ _ _]
end)}
% generate all sentences
{GrammarAgent query(proc {$ F}
skip
end)}
% generate from logical form
{GrammarAgent query(proc {$ F}
F^head^lf = [persuade uther kuno [beat kuno cornwall]]
end)}
{Inspect {GrammarAgent next($)}}
% generate all sentences in perfect tense
{GrammarAgent query(proc {$ F}
F^head^lf = [perfective _]
end)}
{GrammarAgent next}
% generate all sentences in perfect tense with subject knights
{GrammarAgent query(proc {$ F}
F^head^lf = [perfective (_|knights|_)]
end)}
% generate all sentences with main verb storm
{GrammarAgent query(proc {$ F}
LF = F^head^lf
in
dis LF = storm|_
[] LF = perfective|(storm|_)|_
end
end)}
% generate all sentences with at most 3 words
declare
proc {LengthLE L N}
dis L=nil
[] LL in L=_|LL N>:0 then {LengthLE LL N-1}
end
end
{GrammarAgent query(proc {$ F}
{LengthLE F^lexin 6}
end)}
*/
|