[pet] PET/Flop fails to compile minimal english grammar of Lingo Grammar Matrix - Solved

Coote, Ravi ravi.coote at fkie.fraunhofer.de
Tue Jul 20 14:54:47 CEST 2010


Dear Emily,

Thank you very much for you answer. You're right, deleting all the comment strings ".." after := enables to compile the grammar with flop. 

You can automate the process with the following sed-commands:

sed 's/& $//g' head-types.tdl > head-types2.tdl
sed 's/\".*\"//g' head-types2.tdl > head-types3.tdl

Head-types3.tdl contains the right syntax, then. Head-types.tdl is the only file you have to modify.

Thank you! Have a nice day.

Regards,

Ravi Coote




-----Ursprüngliche Nachricht-----
Von: emily.m.bender at gmail.com [mailto:emily.m.bender at gmail.com] Im Auftrag von Emily M. Bender
Gesendet: Freitag, 9. Juli 2010 12:42
An: Coote, Ravi; matrix-dev at u.washington.edu
Betreff: Re: PET/Flop fails to compile minimal english grammar of Lingo Grammar Matrix

Dear Ravi,

:+ is now available in PET (we should update that README).  The issue I think has to do with comment strings, i.e., "" after :=.  There were at some point just a couple of those in matrix.tdl and lots and lots in head-types.tdl.
I thought we'd gotten rid of them, but maybe not yet.

Emily

On Fri, Jul 9, 2010 at 12:36 PM, Coote, Ravi <ravi.coote at fkie.fraunhofer.de> wrote:
> Dear Emily,
>
> I wanted to ask, if there are older versions of the Grammat matrix available.
> I suppose those were compatible with PET.
>
> According to the README-File of matrix generated grammars, the :+ 
> Syntax is not yet Supported in PET (see below).
>
> Thank you very much!
>
>
> #######################
> Changes since v 0.6:
>
> 1. Head types
>
>   We had previously hesitated to posit head types, as we
>   expect the exact subhierarchy under the type head to be
>   language-specific, even for those head types that are
>   found cross-linguistically.  However, this hesitation
>   was hampering our ability to develop lexical types for
>   the Matrix.  In this version, we have included 10 basic
>   head types, as well as types for all possible
>   disjunctive combinations for the basic 10.  See further
>   documentation near 'head' in matrix.tdl.  Note that the
>   disjunctive types are stored in a separate file
>   head-types.tdl.
>
>   We still have not posited any head features.  In order
>   to add features to one of the head types (disjunctive
>   or otherwise) already defined in the Matrix, you'll
>   need to use the new 'type addendum' syntax.  (This is
>   why a current LKB is required.)  Type addenda can be
>   used to add information (not override information)
>   associated with previously defined types.  They have :+
>   in place of :=.  Type addenda can add parent types,
>   constraints, or documentation strings, as long as they
>   are consistent with the existing definition.  As with
>   subtypes, it is good practice to refrain from stating
>   redundant information on type addenda.  The LKB will
>   print an error if a parent is declared redundantly.  No
>   such checking exists for constraints.
>
>   NB: The :+ syntax is not yet supported in the PET
>   system.
>
>
> ################
>
> -----Ursprüngliche Nachricht-----
> Von: Coote, Ravi
> Gesendet: Mittwoch, 7. Juli 2010 10:58
> An: 'Emily M. Bender'
> Betreff: WG: PET/Flop fails to compile minimal english grammar of 
> Lingo Grammar Matrix
>
> Hi Emily,
>
> I have just sent an email to the PET Mailing Listing concerning a problem with compiling the (minimal english)-grammar of the lingo customization page with PET/FLOP (please see below).
>
> Can you tell me whether the grammars created by the customization page are compatible with PET, please?
>
> Thank you very much.
>
> Have a nice day.
>
> Regards,
>
> Ravi Coote
>
> -----Ursprüngliche Nachricht-----
> Von: Coote, Ravi
> Gesendet: Mittwoch, 7. Juli 2010 10:39
> An: pet at delph-in.net
> Betreff: PET/Flop fails to compile minimal english grammar of Lingo 
> Grammar Matrix
>
> Dear list,
>
> I am having problems to compile the minimal english example of the 
> Lingo Grammar Customization Page: 
> http://www.delph-in.net/matrix/customize/matrix.cgi
>
> Flop fails with many syntax errors (see below). The error log of flop is attached.
>
> I use flop version 0.99.14svn_cm . Is this version possibly incompatible with the grammars created by the Lingo Customization Page?
>
> Do you know this problem? Thank you for any hints.
>
> Kind Regards,
>
> Ravi Coote
>
> ------------------------
>
> flop flop.set
>
> converting `flop.set' (unknown) into `flop.set.grm' ...
> loading `flop.set'... syntax error in flop.set:10.1 - got 
> `special-name-top', expecting block or statement syntax error in 
> flop.set:10.28 - got `.', expecting block or statement syntax error in 
> flop.set:11.1 - got `special-name-symbol', expecting block or 
> statement syntax error in flop.set:12.1 - got `special-name-string', 
> expecting block or statement syntax error in flop.set:13.1 - got 
> `special-name-cons', expecting block or statement syntax error in 
> flop.set:14.1 - got `special-name-list', expecting block or statement 
> syntax error in flop.set:15.1 - got `special-name-nil', expecting 
> block or statement syntax error in flop.set:16.1 - got 
> `special-name-difflis', expecting block or statement syntax error in 
> flop.set:18.1 - got `special-name-attr-fi', expecting block or 
> statement syntax error in flop.set:19.1 - got `special-name-attr-re', 
> expecting block or statement syntax error in flop.set:20.1 - got 
> `special-name-attr-li', expecting block or statement syntax error in 
> flop.set:21.1 - got `special-name-attr-la', expecting block or 
> statement syntax error in flop.set:22.1 - got `special-name-attr-ar', 
> expecting block or statement syntax error in flop.set:26.1 - got 
> `preload-files', expecting block or statement syntax error in 
> flop.set:32.1 - got `irregs-file', expecting block or statement syntax 
> error in flop.set:35.1 - got `lex-rule-suffix', expecting block or 
> statement syntax error in flop.set:37.1 - got `affixes-are-instance', 
> expecting block or statement syntax error in flop.set:41.1 - got 
> `version-file', expecting block or statement syntax error in 
> flop.set:46.1 - got `version-string', expecting block or statement 
> syntax error in flop.set:50.1 - got `grammar-info', expecting block or 
> statement syntax error in flop.set:54.1 - got `dont-expand', expecting 
> block or statement syntax error in flop.set:58.1 - got `pseudo-types', 
> expecting block or statement
>
> warning: type `string' (introduced at flop.set:11) has no definition
> warning: type `cons' (introduced at flop.set:13) has no definition
> warning: type `list' (introduced at flop.set:14) has no definition
> warning: type `null' (introduced at flop.set:15) has no definition
> warning: type `diff-list' (introduced at flop.set:16) has no 
> definition
>
> finished parsing - 22 syntax errors, 116 lines in 0 s processing type constraints (6 types):
> - expanding templates: 0 template instantiations
> - type hierarchy (leaf types [5], bitcodes, glbs [0], recomputing)
> - building dag representation
> - computing appropriateness
> warning: attribute `FIRST' introduced on top (?)
> warning: attribute `REST' introduced on top (?)
> warning: attribute `LIST' introduced on top (?)
> warning: attribute `LAST' introduced on top (?)
> warning: attribute `ARGS' introduced on top (?)
> - applying appropriateness constraints for types
> - delta / full expansion for types
> - partitioning hierarchy (1 partitions) dumping grammar (symbols 0k, 
> hierarchy 0k, feature tables 0k, supertypes 0k, lexicon 0k, types 0k) 
> finished conversion - output generated in 0 s
>




More information about the pet mailing list