/* Copyright (C) Wolfgang Menzel, Universität Hamburg, 2003-06-27 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ %%% a collection of instance-based exercises with %%% anticipated error cases %%% uses the multi-threaded server %%% launches the web server on port 8000 :- use_module(instance_diag). exercise(tense1,'Build an appropriately tensed sentence using the following words.'). item(tense1,1,'he, be, at, home, yesterday', [[[yesterday, he, was, at, home]], [[yesterday, at, home, he, was]], [[he, was, at, home, yesterday]], [[yesterday, he, is, at, home],[tense,past_tense,past_was]], [[yesterday, he, will, be, at, home],[tense,past_tense,past_was]], [[he, is, at, home, yesterday],[tense,past_tense,past_was]], [[he, will, be, at, home, yesterday],[tense,past_tense,past_was]], [[he, will, yesterday, be, at, home],[vg_together,adv_peripheral]], [[he, will, yesterday, at, home, be],[vg_together,adv_peripheral]]]). item(tense1,2,'he, be, at, school, tomorrow', [[[tomorrow, he, will, be, at, school]], [[he, will, be, at, school, tomorrow]], [[tomorrow, he, is, at, home],[tense,future_tense,future_will_be]], [[tomorrow, he, was, at, home],[tense,future_tense,future_will_be]], [[he, is, at, home, tomorrow],[tense,future_tense,future_will_be]], [[he, was, at, home, tomoroow],[tense,future_tense,future_will_be]], [[he, will, yesterday, be, at, home],[vg_together,adv_peripheral]], [[he, will, yesterday, at, home, be],[vg_together,adv_peripheral]]]). item(tense1,3,'he, read, now', [[[now, he, is, reading]], [[he, is, reading, now]], [[he, was, reading, now],[tense,present_tense,present_is]], [[he, reads, now],[progressive,progressive_ing]], [[he, will, read, now],[tense,present_tense]], [[he, will, be, reading, now],[tense,present_tense,present_is]]]). message(tense1,tense,'The tense of the auxiliary is not appropriate'). message(tense1,past_tense,'When talking about yesterday you should use the past tense form.'). message(tense1,past_was,'The past tense of ''to be'' is ''was'''). message(tense1,vg_together,'The member s of the verb group should not be separated by local or temporal adjuncts.'). message(tense1,adv_peripheral,'Temporal or local adverbials have to be placed at the beginning or the end of a sentence.'). message(tense1,future_tense,'When talking about tomorrows you should use the future tense form.'). message(tense1,future_will_be,'The future tense of ''to be'' is ''will be'''). message(tense1,progressive,'Use the progressive form for events currently going on'). message(tense1,progressive,'The progressive form is constructed using the suffix ''-ing'' and an appropriate form of ''to be'''). exercise(tense2,'Build a sentence using the following words!'). item(tense2,1,'he, drive, too, fast', [[[he, drives, too, fast]], [[he, was, driving, too, fast]], [[he, has, been, driving, too, fast]]]). item(tense2,2,'he, go, to, spain, last, year', [[[last, year, he, went, to, spain]], [[he, went, to, spain, last, year]], [[last, year, he, has, been, going, to, spain]], [[he, has, been, going, to, spain, last, year]]]). item(passive,1,'John, buy, the, book', [[[the, book, has, been, bought, by, john]], [[the, book, will, be, bought, by, john]]]). item(passive,2,'John, Jack, defeat', [[[john, was, defeated, by, jack]], [[jack, was, defeated, by, john]], [[john, has, been, defeated, by, jack]], [[jack, has, been, defeated, by, john]], [[john, will, be, defeated, by, jack]], [[jack, will, be, defeated, by, john]]]). exercise(agreement1,'Build a sentence using the following words.'). item(agreement1,1,'Mary, sleep', [[[mary, sleeps]], [[mary, slept]], [[mary, will, sleep]], [[mary, is, sleeping]], [[mary, was, sleeping]], [[mary, sleep],[agree,names]], [[mary, sleeping],[progressive,no_aux]], [[sleeps, mary],[subject_first,swap]]]). item(agreement1,2,'I, drink', [[[i, drink]], [[i, drank]], [[i, will, drink]], [[i, am, drinking]], [[i, was, drinking]], [[i, drinks],[agree,non_3rd_sg]], [[i, drinking],[progressive,no_aux]], [[drink, i],[subject_first,swap]]]). item(agreement1,3,'he, walk', [[[he, walks]], [[he, walked]], [[he, will, walk]], [[he, is, walking]], [[he, was, walking]], [[he, walk],[agree,'3rd_sg']], [[he, walking],[progressive,no_aux]], [[walks,he],[subject_first,swap]]]). item(agreement1,4,'they, dance', [[[they, dance]], [[they, danced]], [[they, will, dance]], [[they, are, dancing]], [[they, were, dancing]], [[they, dances],[agree,non_3rd_sg]], [[they, dancing],[progressive,no_aux]], [[dance, they],[subject_first,swap]]]). message(agreement1,agree, 'Subject and Predicate must agree in person and number'). message(agreement1,names, 'If the subject is a name the verb needs to be in 3rd person singular form.'). message(agreement1,non_3rd_sg, 'The pronoun is not 3rd person singular, but the verb is.'). message(agreement1,'3rd_sg', 'The pronoun is 3rd person singular, so the verb should be as well.'). message(agreement1,subject_first,'The subject must precede the verb.'). message(agreement1,swap, 'Swap the two words around.'). message(agreement1,no_aux, 'An appropriate form of the auxiliary "to be" will be required.'). message(agreement1,progressive, 'The progressive tense requires a complex verb group.'). exercise(agreement2,'Build a sentence using the following words'). item(agreement2,1,'i, he, call', [[[i, call, him]], [[he, calls, me]], [[i, called, him]], [[he, called, me]], [[i, will, call, him]], [[he, will, call, me]], [[me, he, calls],[obj_third,pro_move_end]], [[him, I, call],[obj_third,pro_move_end]], [[i, call, he],[obj_case,obj_acc]], [[he, calls, i],[obj_case,obj_acc]], [[me, calls, he],[objsubj,exchange]], [[him, calls, I],[objsubj,exchange]], [[i, calls, him],[subjagr,non_3rd_sg]], [[he, call, me],[subjagr,'3rd_sg']]]). item(agreement2,2,'he, she, call', [[[he, calls, her]], [[she, calls, him]], [[he, called, her]], [[she, called, him]], [[he, will, call, her]], [[she, will, call, him]], [[him, she, calls],[obj_third,pro_move_end]], [[her, he, calls],[obj_third,pro_move_end]], [[he, calls, she],[obj_case,obj_acc]], [[she, calls, him],[obj_case,obj_acc]], [[him, calls, she],[objsubj,exchange]], [[her, calls, he],[objsubj,exchange]], [[he, call, her],[subjagr,non_3rd_sg]], [[she, call, him],[subjagr,non_3rd_sg]]]). message(agreement2,obj_third, 'The object has to be placed after the verb.'). message(agreement2,pro_move_end, 'Move the first word to the end of the sentence'). message(agreement2,obj_case, 'The case of the object is wrong.'). message(agreement2,obj_acc, 'The object has to be in accusative case.'). message(agreement2,objsubj, 'The subject should precede and the object follow the verb.'). message(agreement2,exchange, 'Exchange the first and the last word.'). message(agreement2,subjagr, 'Subject and Predicate must agree in person and number'). message(agreement2,non_3rd_sg, 'The first pronoun is not 3rd person singular, but the verb is.'). message(agreement2,'3rd_sg', 'The first pronoun is 3rd person singular, so the verb should be as well.'). %%% launches the demo-server on port 8000 :- use_module(tutor_t_server). :- nl. :- write_ln('server launched on port 8000'). :- nl. :- server(8000).