3 ms·
If someone would like to try with some more questions and can't bother to write a screen scraper for the demo page, I scraped a few questions a while back: htt
by zith 16y ago
If someone would like to try with some more questions and can't bother to write a screen scraper for the demo page, I scraped a few questions a while back:
http://www.filedump.net/dumped/quesions1285428813.txt http://www.filedump.net/dumped/quesions1285428813.txt
- rndmcnlly0 16y agoThanks for doing some extraction! Using your file I've been building up a solver for these questions in Prolog (using DCGs for parsing and simple predicates for the common sense facts and answer calculation). It's nowhere near "done", but it does get 45% of the questions now after only a few hours and 450 lines of code. The trick to factoring someone else's generative space is to spot the symmetries and build your self a little domain-specific language for explaining those symmetries to your program. Here's some snippets: tomorrow(wednesday,thursday). food(butter). body_part(arm). plenty(arm). above_waist(arm). ordinal(2) --> lit('2nd'). question( tomorrow -> Answer) --> p(['Tomorrow is ',token(Tomorrow),'. If this is true, what is today?']), { tomorrow(Answer,Tomorrow) }. question(count_2(P) -> Answer) --> p(['The list ',token_list(L),' contains how many ',pred(P),'?']). {include(P,L,Goods), length(Goods,Answer)}. pred_name('something each person has more than one of',plenty).