utopia-group/regel

editing the grammar

Closed this issue · 3 comments

Hi, I want to create a grammar in another language and start with looking at your grammar. Can you provide some guideline on how to do it? I have difficulties finding it. Thanks in adavance.

Which grammar are you referring to? The regex grammar or sempre grammar?

Thanks for getting back to me. I think the idea of supplementing examples with user input is great. The regex grammar is for converting your regex (sketch) language to regex actually used in programs, right? Telling me what part of the many programs handle it is great. I am not very sure about the sempre grammar. Is it for converting the output of corenlp to sketch? Pointing out where the corresponding codes are would be extremely useful for me. I see that corenlp is used. So you are using the stanford corenlp parser to parse English sentences? So you dont have a grammar for English, right? What if I want to use a parser for another language. Can you highlight the part I need to change? Thanks

There is a "grammar" for English in the regex context. Please see sempre/dataset/regex.grammar and sempre/dataset/regex.lexicon. If you want to use a parser for another language, you should just provide a new grammar. The details of how to use sempre is here: https://github.com/percyliang/sempre/blob/master/TUTORIAL.md.