PHP Pregroup Parser : User's Manual

The Main Page

This page selects the grammar (also named lexicon or dictionary) that is used by the parser. A grammar defines the words (or lists of words) that are recognized by lexicon and the types that are associated to each word. A grammar also defines the set of simple types together with a partial order on them that indicates which simple type can be replaced by another one. Finally, a grammar gives the main simple type associated to correct sentences. In the main page:
  1. The first entry gives an access to the documentation.
  2. With the second link, you can use the parser with your own grammar. In this case, a file containing the definition of the grammar will have to be selected. This file will be uploaded to the server each time the parser is started.
  3. Alternatively, you can use one of the grammars distributed with the parser. In this case, you can enter a string or you can choose one (or all) example associated to the grammar.
  4. The parser works with Unicode characters (UTF-8 encoding). Sometime, it is useful to have a grammar with only ASCII characters. This section presents ASCII version of the previous grammar. The lexicon uses several special sequences for several characters in the spirit of TeX or LaTeX. For instance π is coded by \pi.

The Parser Page

This page has several optional sections whose presence depends on the grammar that is selected:

When Using Your Own Grammar

  1. You must fill the first field with the name (or path) of the file that defines your grammar. The grammar will be uploaded to the server each time the parser will be started.
  2. You can enter a string in the second field. The string is parsed using the given grammar when "Ok" is pressed.
  3. Alternatively, you can enter the name of a file which contains one or several lines. Each line is parsed separately.
  4. The last part is the parser option section which is presented bellow.

When Using A predefined Grammar

  1. You can enter a string in the first field. The string is parsed using the predefined grammar when "Ok" is pressed.
  2. If the grammar is also associated to a list of predefined examples, you can choose one of them in a list. The string is parsed when "Ok" is pressed. You can also click on the second button "Parse all examples" which starts the parser for each example in the list.
  3. The last part is the parser option section which is presented bellow.

The Parser Options

Last update: 2008-06-25