Math

Answered

Custom Grammar File

Hello,

I am trying to add a custom grammar file so that only digits from 0 to 9 get recognized but it is causing following error :

INVALID_OBJECT: error: AddResource custom_grammar.res failed

error: failed to read configuration script

script exits with 2 errors

My configuration file has following code:

Name: configuration5

Type: Math

Configuration-Script:

 AddResource math-ak.res

 AddResource custom_grammar.res

I have tried with following custom_grammar file contents :

symbol = 0 1 2 3 4 5 6 7 8 9

expression ::= identity(symbol)

start(expression)

and also with :

symbol = 0 1 2 3 4 5 6 7 8 9

Everything works fine if i use math-grm-standard.res instead of custom_grammar.res file. 

Please help on how to achieve the required result.

Regards,

Pankaj Tyagi


Best Answer

Dear Kannan,


Currently, I did not mention ludef are not for Math BUT only Text parts.


You should then create a text part, create a configuration in your .conf file (resp. en_US.conf file), and set this configuration.


It should then work.


Best regards,


Olivier


Answer

Dear Kannan,


Currently, I did not mention ludef are not for Math BUT only Text parts.


You should then create a text part, create a configuration in your .conf file (resp. en_US.conf file), and set this configuration.


It should then work.


Best regards,


Olivier

Dear Mr. Olivier,

Thank you for your help.

Your resource file worked for me.


Regards,

Pankaj Tyagi

Dear Pankaj,


thank you for the update, I am glad it is of help.


Best regards,


Olivier