Practical Grammar 2
xlfg
Your first grammar in xlfg
Please do the following:
You first log onto xlfg:
- Go to https://xlfg.labri.fr/ and log in.
Then you locate our workshop:
- Choose Workshops|All Workshops.
- Look for the workshop "Practical Grammar".
- In the column "Action", click the button "Consult the workshop".
Now you find a project of the workshop:
- On the right side of the screen is the list of projects of our workshop.
- Look for "Practical_Grammar 1" and click on "Create your own version".
- 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, together with the syntactic categories we want to use:
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