Practical Grammar 2: Difference between revisions

From English Grammar
Jump to navigation Jump to search
Line 50: Line 50:
(11) John [sent Martha a check].<br>
(11) John [sent Martha a check].<br>
(12) We [gave Fred a wastebasket].
(12) We [gave Fred a wastebasket].
=== Syntactic Categories ===
S, NP, N, VP, V, PP, P, AP, A, D

Revision as of 14:53, 5 November 2020

xlfg

Your first grammar in xlfg

Please do the following:

You first log onto xlfg:

  1. Go to https://xlfg.labri.fr/ and log in.

Then you locate our workshop:

  1. Choose Workshops|All Workshops.
  2. Look for the workshop "Practical Grammar".
  3. In the column "Action", click the button "Consult the workshop".

Now you find a project of the workshop:

  1. On the right side of the screen is the list of projects of our workshop.
  2. Look for "Practical_Grammar 1" and click on "Create your own version".
  3. Now click on "Edit your version".

You have now arrived in the grammar editor for the grammar "Practical_Grammar 1", where you can make changes to the grammar.

Look around a bit, but leave the buttons "Output Parameters" and "Output" alone for now.

Clicking on the buttons in the row beginning with "Sentences". Whenever you do, a window will open where you can enter or change information. Do not make any changes yet. To get to a different input window, just click on its button.

The four input buttons have the following functions:

  • Sentences: here you can type in example sentences that you want to test.
  • Declarations: here you can enter information that determines the behavior of the program.
  • Grammar: this where you add phrase structure rules.
  • Lexicon: the place to write lexical entries.

Exercise 2

We are now going to write a first grammar. The goal of the grammar is to recognize all the sentences from Exercise 1 in Week 1. Here they are one more time:

Sentences

(1) John [disappeared].
(2) The bottle [broke].
(3) Martha [stayed at the hospital].
(4) Fred [resides in Chicago].
(5) Robert [went to the hospital].
(6) Alice [moved into the room].
(7) Joe [saw Fred].
(8) Alice [broke the bottle].
(9) We [moved it into the room].
(10) Fred [took Alice to the hospital].
(11) John [sent Martha a check].
(12) We [gave Fred a wastebasket].

Syntactic Categories

S, NP, N, VP, V, PP, P, AP, A, D