sempre icon indicating copy to clipboard operation
sempre copied to clipboard

Errors while running with processed-grammar

Open BrijeshKaria opened this issue 8 years ago • 1 comments

I am not sure about the purpose of processed-grammar that gets created in state/execs/#.exec directory but when I use in below command, The grammar files in context is for publications domain that comes with overnight samples. I get few errors given below

command java -cp libsempre/:lib/ -ea edu.stanford.nlp.sempre.Main -Main.interactive -interactive false -server true -Grammar.inPaths state/execs/1.exec/processed-grammar

errors ERROR: java.lang.RuntimeException: Error on (rule $Intermediate1 (that $VP) (SelectFn 0)): java.util.MissingFormatArgumentException: Format specifier '%s':

debugging above error reveals bug in Grammar.java file on line number 259.

after I fix it I get bellow error

ERROR: java.lang.RuntimeException: Found cycle of unaries involving $Intermediate3:

not sure how to resolve it.

BrijeshKaria avatar Jan 21 '18 07:01 BrijeshKaria

  • When SEMPRE reads the grammar file, it (1) resolves macros and (2) split the rules so that each rule only has at most 2 children ("binarization"). The result is saved as the processed-grammar file and is used only for debugging purposes. While it can be used as the input grammar, using the original grammar is preferred in general cases.
  • The overnight grammar must be used with a floating parser. The default beam parser cannot process cycling rules such as (rule $Cat1 ($Cat1) ...). Please try adding -Builder.parser FloatingParser to the command line.

ppasupat avatar Jan 23 '18 23:01 ppasupat