martinodb / notes-on-open-source-grammar-tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notes on open source grammar tools.

Construction Grammars

FCG (Fluid Construction Grammar)

SBSG (Sign-based Construction Grammar)

HPSG (Head-driven Phrase Structure Grammar)

Delph-in tools

Deep Linguistic Processing with HPSG (DELPH-IN) The DELPH-IN Consortium is a collaboration among computational linguists from research sites world-wide working on ‘deep’ linguistic processing of human language. The goal is the combination of linguistic and statistical processing methods for getting at the meaning of texts and utterances. The partners have adopted Head-Driven Phrase Structure Grammar (HPSG) and Minimal Recursion Semantics (MRS), two advanced models of formal linguistic analysis. They have also committed themselves to a shared format for grammatical representation and to a rigid scheme of evaluation, as well as to the general use of open-source licensing and transparency.

DELPH-IN is an international consortium of researchers committed to producing precise, high-quality language processing tools and resources, primarily in the HPSG syntactic and MRS semantic frameworks, and PyDelphin is a suite of Python libraries for processing data and interacting with tools in the DELPH-IN ecosystem. PyDelphin's goal is to lower the barriers to making use of DELPH-IN resources to help users quickly build applications or perform experiments, and it has been successfully used for research into machine translation (e.g., Goodman, 2018), sentence chunking (Muszyńska, 2016), neural semantic parsing (Buys & Blunsom, 2017), natural language generation (Hajdik et al., 2019), and more. Documentation, including guides and an API reference, is available here: http://pydelphin.readthedocs.io/ New to PyDelphin? Want to see examples? Try the walkthrough.

Menard

  • Menard github repo
    • "A Clojure library for generation and parsing expressions from grammars and lexicons."
    • For now, it seems a toy to translate from a small subset of Dutch to English
    • But it's actively maintained and it's pure Clojure, no need to use external tools. That's interesting.
    • Not very documented, but quick and good response to issues by the author.

OpenCCG (CCG: Combinatory Categorial Grammar)

OpenCCG is a system for parsing and generating text using combinatory categorial grammar for syntax and hybrid logic dependency semantics for, well, the semantic representation. If that seems like a mouthful, don't worry too much about the details right now. You can get started installing OpenCCG and working with OpenCCG using the tccg utility right now. If, on the other hand, you want to start understanding what that mouthful means, Johanna Moore at the University of Edinburgh has some helpful course notes on NLG in general and OpenCCG in particular.

Example interaction with tccg (the main OpenCCG tool)

$ tccg
Loading grammar from URL: file:/home/[..]/openCCG/SourceForge/openccg/grammars/tiny/grammar.xml
Grammar 'tiny' loaded.

Enter strings to parse.
Type ':r' to realize selected reading of previous parse.
Type ':h' for help on display options and ':q' to quit.
You can use the tab key for command completion, 
Ctrl-P (prev) and Ctrl-N (next) to access the command history, 
and emacs-style control keys to edit the line.

tccg> she buys it
3 parses found.

Parse 1: s : 
  @w1:action(buy ^ 
             <tense>pres ^ 
             <Actor>(w0:animate-being ^ pro3f ^ 
                     <num>sg) ^ 
             <Patient>(w2:thing ^ pro3n ^ 
                       <num>sg))
tccg> :r
[1,000] she buys it :- s : (@w0:animate-being(pro3f) ^ @w0:animate-being(<num>sg) ^ @w1:action(buy) ^ @w1:action(<tense>pres) ^ @w1:action(<Actor>w0:animate-being) ^ @w1:action(<Patient>w2:thing) ^ @w2:thing(pro3n) ^ @w2:thing(<num>sg))
tccg> :q
Exiting tccg.

About

License:MIT License