9

Is there any such thing as a Integrated Development Environment for context free grammars (or any variant on a formal, machine parsable grammar) that target natural languages? The ones for BNF grammars seem to be overwhelmingly aimed at turning language into machine executable code. I would imagine that a similar tool for natural language would let the user write a grammar, evaluate it for mistakes and parse example sentence to trees or generate sample sentences given a dictionary of lexemes/tokens.

2 Answers 2

4

ANTLRWorks is an editor for ANTLR grammars.

ANTLR allows you to write BNF context free grammars (which also produces code).

ANTLRWorks allows you to try examples strings on the grammar and displays the parsing.

As to natural language, if you have a BNF grammar for one (I think there is a non-trivial but still non-inclusive grammar for English in the javacc parser code), then you can use it with some changes with ANTLR.

7
  • How does ANTLR handle syntactic ambiguity? AFAIK, and according to Wikipedia, ANTLER is an LL(*) parser. This is hardly the ideal tool for developing perspicuous natural language grammar. The role of an IDE is to make the creative work easier. Imposing unneeded constraints to begin with is hardly the way to do it.
    – babou
    Commented Feb 24, 2014 at 17:17
  • @babou: I didn't go in to how CFG is particularly good (or natural) at natural language. All I'm saying is that ANTLRWorks is a good IDE for BNF (for ANTLR). You're going to have difficulties ('unneeded constraints') already if you're starting with CFG. Do you know of any looser formalisms (link grammars?)? And do they have IDEs?
    – Mitch
    Commented Feb 24, 2014 at 17:42
  • My point is not that CFG are not adequate for NL parsing. Many people are quite happy with it, and that is all the OP is asking for anyway. The point is that ANTLRWorks is intended to help developing grammars for ANTLER, which uses only a very restricted subclass of CF grammars, not even all the deterministic ones. So full CFG is already a much looser formalism. I am not questionning the quality of ANTLRWorks, but an IDE for Java is of no use to a Python programmer, even if no IDE is available for Python. Did I misunderstand something?
    – babou
    Commented Feb 24, 2014 at 18:52
  • @babou Yes, you've misunderstood; you've confused the problems of an IDE with that of the grammar. ANTLRWorks is an IDE for ANTLR, whatever it does. Your comment sounds like a complaint about ANTLR, but the OP is asking about IDEs. In your analogy, Java and Python can both compute all functions, and maybe you don't like Java, but the IDE is the one that exists, and not for Python. So you can't do LALR grammars in ANTLR; well, if you want to use LALR, then don't use ANTLRWorks.
    – Mitch
    Commented Feb 24, 2014 at 20:19
  • You then agree that ANTLRWorks will do only LL grammars. I am saying this class is too restricted for NL use, while you are saying it is good enough with the advantage of an IDE. Other users may agree with either one of us. What matters is for them to be aware that this is an issue they have to consider. I fear that the IDE main use is to compensate for the difficulty of putting grammars in LL form, and understanding how it works.
    – babou
    Commented Feb 24, 2014 at 20:54
4

You may find this interesting: LingBench IDE.

From the product description:

LingBench IDE is an Integrated Development Environment for Linguists and Computer Linguists to Model a Natural Language by describing the morphology, the syntax, the lexical and other aspects of a language in detail.

It seems to be an old and unsupported piece of software though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.