
:- multifile unknown_predicate_handler/3.


% Word Expert specification

word_expert tag :=
	tag:add T <- pos:C@[0] & {pos_lex(C,T)} o
	tag:i>o <- tag:o@[1] & pos:jj@[0] o
	tag:i>b <- tag:i@[-2] & tag:i@[-1] & pos:dt@[0] o
	tag:i>b <- tag:i@[-1] & pos:wdt@[0] o
	tag:o>i <- tag:o@[-2] & tag:i@[-1] & pos:dt@[-1] o
	tag:i>b <- tag:i@[-1] & wd:who@[0] o
	tag:i>b <- tag:i@[-1] & pos:prp@[0] o
	tag:o>i <- tag:i@[-1] & pos:cc@[0] & pos:nn@[1] o
	tag:o>i <- wd: & @[0] o
	tag:i>o <- pos:in@[0] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & wd:about@[0] o
	tag:o>i <- tag:i@[-1] & pos:cc@[0] & pos:nns@[1] o
	tag:o>i <- tag:i@[1] & wd:only@[0] o
	tag:b>i <- pos:jj@[0] o
	tag:i>b <- tag:i@[-1] & pos:prp@[-1] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & pos:jj@[-1] & pos:cc@[0] o
	tag:i>o <- pos:vbz@[0] o
	tag:o>i <- pos:vbn@[0] & pos:nns@[1] o
	tag:o>i <- tag:i@[1] & pos:cc@[1] o
	tag:i>b <- tag:i@[-2] & tag:i@[-1] & wd:last@[0] o
	tag:o>i <- tag:i@[1] & wd:more@[-1] & wd:than@[0] o
	tag:i>o <- tag:o@[1] & pos:jjr@[0] o
	tag:o>i <- tag:i@[1] & pos:in@[-1] & pos:rb@[0] o
	tag:o>i <- tag:i@[1] & tag:o@[2] & pos:nnp@[-1] & pos:cc@[0] o
	tag:o>i <- pos:'prp$'@[-1] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & wd:least@[1] o
	tag:i>b <- tag:i@[-2] & tag:i@[-1] & pos:nn@[-1] & pos:cd@[0] o
	tag:i>b <- tag:i@[-1] & wd:which@[-1] o
	tag:i>o <- pos:in@[0] & pos:dt@[1] o
	tag:o>i <- wd:'The'@[-1] o
	tag:i>b <- tag:i@[-1] & wd:yesterday@[0] o
	tag:i>o <- wd:due@[0] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & pos:rbr@[0] o
	tag:o>i <- tag:i@[1] & tag:o@[2] & wd:operating@[0] o
	tag:o>i <- tag:i@[1] & pos:in@[-1] & pos:vbn@[0] o
	tag:o>i <- pos:'\'\''@[0] & pos:nn@[1] o
	tag:o>i <- tag:i@[1] & tag:o@[2] & pos:nnp@[-2] & pos:cd@[-1] o
	tag:i>o <- pos:'.'@[0] o
	tag:i>b <- tag:o@[1] & pos:nn@[-1] & pos:nnp@[0] o
	tag:b>i <- pos:jj@[-1] o
	tag:o>i <- tag:o@[1] & tag:i@[2] & pos:in@[-1] & pos:jj@[0] o
	tag:i>b <- pos:wp@[-1] o
	tag:i>o <- tag:o@[-2] & tag:i@[-1] & pos:','@[0] o
	tag:o>i <- tag:i@[-1] & pos:jj@[-1] & pos:jj@[1] o
	tag:b>i <- tag:o@[-1] & pos:in@[-1,-2,-3] o
	tag:o>i <- tag:o@[-2] & tag:i@[-1] & wd: & @[1,2,3] o
	tag:o>i <- tag:i@[-1] & pos:rb@[-1] & pos:nn@[1] o
	tag:o>i <- tag:i@[1] & wd:just@[0] o
	tag:i>o <- tag:o@[-1] & wd:least@[0] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & pos:jj@[0] o
	tag:o>i <- wd:many@[0] o
	tag:o>i <- tag:i@[1] & pos:rb@[0] & pos:jj@[1] o
	tag:o>i <- wd:'Exchange'@[1] o
	tag:o>i <- tag:o@[-2] & tag:i@[-1] & pos:nnp@[-1] & pos:nn@[1] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & pos:nnp@[1] & pos:','@[2] o
	tag:i>o <- pos:in@[0] & pos:nnp@[1] o
	tag:i>o <- tag:o@[-2] & tag:i@[-1] & pos:vbd@[0] o
	tag:i>b <- tag:i@[1] & pos:nns@[-1] & pos:dt@[0] o
	tag:i>o <- wd:have@[0] o
	tag:i>o <- wd:in@[0] o
	tag:i>o <- tag:i@[1] & pos:prp@[1] o
	tag:o>i <- tag:o@[1] & tag:i@[2] & wd:as@[-1] & wd:much@[0] o
	tag:o>i <- tag:i@[-1] & pos:rb@[-2] & pos:jj@[-1] o
	tag:o>i <- tag:i@[1] & wd:as@[0] & wd:much@[1] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & pos:rb@[0] & pos:jjr@[1] o
	tag:i>b <- tag:i@[-1] & wd:today@[0] o
	tag:o>i <- tag:i@[1] & tag:o@[2] & pos:cc@[0] & pos:cd@[1] o
	tag:o>i <- tag:i@[1] & pos:pos@[-1] o
	tag:i>b <- tag:i@[-2] & tag:i@[-1] & wd:late@[0] o
	tag:i>b <- tag:i@[-1] & pos:rbr@[0] & pos:dt@[1] o
	tag:o>i <- pos:jj@[-1] & pos: `` @[0] o
	tag:b>i <- tag:o@[-1] & pos:nnp@[1,2,3] o
	tag:i>b <- tag:i@[-2] & tag:i@[-1] & wd:next@[0] o
	tag:i>o <- tag:i@[1] & tag:i@[2] & pos:nns@[-1] & pos:jj@[0] o
	tag:o>i <- wd:the@[0] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & pos:in@[-2] & pos:jjr@[-1] o
	tag:o>i <- tag:i@[1] & pos:jjr@[0] o
	tag:o>i <- pos:nnp@[-1] & pos:')'@[1] o
	tag:o>i <- wd:a@[-1] o
	tag:o>i <- pos:'\'\''@[0] & pos:nns@[1] o
	tag:i>b <- pos:nns@[-1] & pos:cd@[0] o
	tag:i>b <- tag:i@[-1] & pos:nn@[-1] & pos:dt@[0] o
	tag:i>o <- pos:md@[0] o
	tag:i>o <- pos:to@[0] o
	tag:o>i <- wd:how@[0] & wd:much@[1] o
	tag:b>i <- pos: $ @[-2] & pos:nn@[-1] o
	tag:i>b <- tag:i@[-1] & pos:'wp$'@[0] o
	tag:i>o <- tag:i@[1] & wd:worth@[0] o
	tag:i>o <- pos:vbp@[-1] & pos:vbn@[0] o
	tag:o>i <- tag:i@[-1] & wd:general@[0] o
	tag:i>b <- tag:i@[1] & pos:cd@[-1] & pos:dt@[0] o
	tag:i>b <- tag:o@[-2] & tag:i@[-1] & pos:nnp@[-1] & pos:dt@[0] o
	tag:i>o <- wd:now@[0] o
	tag:i>o <- tag:o@[-1] & wd:not@[0] o
	tag:i>o <- pos:nn@[-1] & pos:jjr@[0] o
	tag:i>o <- wd:either@[0] o
	tag:o>i <- wd:'capital-gains'@[-1] o
	tag:o>i <- tag:i@[1] & pos:'.'@[0] o
	tag:o>i <- tag:i@[-2] & tag:i@[-1] & wd:holding@[0] o
	tag:o>i <- tag:i@[1] & pos: `` @[-1] & pos:'\'\''@[1] o
	tag:o>i <- tag:i@[1] & tag:i@[2] & pos:jj@[1] & pos:'\'\''@[2] o
	end.


% 'Lexicon' mapping POS tags into the tags 'i', 'o', or 'b'.

pos_lex($,i).
pos_lex('\'\'',o).
pos_lex('(',o).
pos_lex(')',o).
pos_lex(',',o).
pos_lex('.',o).
pos_lex(:,o).
pos_lex(``,o).
pos_lex(cc,o).
pos_lex(cd,i).
pos_lex(dt,i).
pos_lex(ex,i).
pos_lex(in,o).
pos_lex(jj,i).
pos_lex(jjr,i).
pos_lex(jjs,i).
pos_lex(md,o).
pos_lex(nn,i).
pos_lex(nnp,i).
pos_lex(nnps,i).
pos_lex(nns,i).
pos_lex(pdt,i).
pos_lex(pos,b).
pos_lex(prp,i).
pos_lex('prp$',i).
pos_lex(rb,o).
pos_lex(rbr,o).
pos_lex(rbs,i).
pos_lex(rp,o).
pos_lex(to,o).
pos_lex(vb,o).
pos_lex(vbd,o).
pos_lex(vbg,o).
pos_lex(vbn,o).
pos_lex(vbp,o).
pos_lex(vbz,o).
pos_lex(wdt,i).
pos_lex(wp,i).
pos_lex('wp$',i).
pos_lex(wrb,o).

