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:
- The first entry gives an access to the documentation.
- 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.
- 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.
- 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
- 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.
- You can enter a string in the second field. The string
is parsed using the given grammar when "Ok"
is pressed.
- Alternatively, you can enter the name of a file which
contains one or several lines. Each line is parsed
separately.
- The last part is the parser option section
which is presented bellow.
When Using A predefined Grammar
- You can enter a string in the first field. The string
is parsed using the predefined grammar when "Ok"
is pressed.
- 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.
- The last part is the parser option section
which is presented bellow.
The Parser Options
- Show pregroup nets: When checked, the
pregroup nets corresponding to correct analyzes
are shown in the report.
- Show text nets: When checked, the pregroup nets
are shown using only text characters. This option needs a
monospace font for a correct rendering. If not checked, the
nets appear as bitmap images (PNG format).
- Maximum number of viewed pregroup nets: This option
gives a limit to the number of nets that is computed. In fact,
even if the parser knows rapidly if there exists a net, the
number of possible nets can be very high. This option gives a limit
to the number of nets that are computed. If you do not want to
limit their number, you must enter a negative number.
- Show only one pregroup net for each assignment of types:
Sometimes, for the same list of types assigned to the words,
it exist several different
pregoup nets. In this case, the links are not connected at the
same places. When checked, the report shows only one of these
nets.
- Show Matrix: Before computing nets, the parser uses
a tabular method based on majority partial composition
that associates types to each sub-list of words of the input string.
This option shows the intermediary result as a triangle matrix.
Each cell correponds to the types that are computed for the sub-list
of words that starts at the i-th word and ends at the j-th word.
- Show only useful types: A type that is computed
for a sub-list of words of the input string (in the matrix)
do not necessary appear in a correct analysis because the matrix is
computed from the bottom to the top ans a useful type must also
be reachable from the top. When this option is not
checked, all the computed types computed from the bottom to this cell
are shown in the matrix. If
not checked, only types that appear in, at least, one correct
analysis are presented in the matrix.
- All basic types correspond to a correct sentence:
- Scale of pregroup nets (percent):
- Alternative name of the lexicon on the server:
- XML input:
- Follow input tree (need XML input):
- Reset the form:
Last update: 2008-06-25