|
Project Information
|
PEN (Parser de Earley do Nuno) is a Java implementation of the well-known Earley's chart parsing algorithm. It analyses sentences according to given context-free grammars, written in plain text files. A simple API is also provided together with the parser, to ease its integration in other projects. ContentsThis package contains the binaries and source code of PEN, a chart parser that implements the Earley algorithm. It can be used to process sentences according to aby given context-free grammars. Usejava -jar pen.jar <grammar_file> <setences_file>
Example: java -jar pen.jar grammar.txt sentences.txt Write your own grammarsThe grammars are simple text files with rules described in the following format: [comment... WEIGHT # RULE_A ::= RULE_B <&> terminal <@> annotation The following symbols are PEN's primitives:
ExamplesSeveral examples can be found in directory 'examples' of this package. Each example grammar has the name gramaticaX.txt and is made to process sentences contained in the files frasesX.txt. For example, gramatica2.txt is made to process frases2.txt. APIThe API documentation can be found in directory 'doc' of this package. Additional documentation (in Portuguese)Presentation, available from here Using PEN to extract information from dictionary definitions: here LicenseThis package is provided under the BSD license in the file LICENSE included in this package. |