Reply To: Problem with Rule-O-Rama not creating .DMP file

Home Forums OpenEars plugins Problem with Rule-O-Rama not creating .DMP file Reply To: Problem with Rule-O-Rama not creating .DMP file

#1022131
Paul Cantrell
Participant

Halle,

Thank you for the quick reply. I’m seeing weird stuff trying to use the fast grammar… I suspect there are some rules as to what combinations of rules are allowed that I’m not understanding.

I have a grammar which works great if I use generateGrammarFromDictionary but dies if I use generateFastGrammarFromDictionary. I get a few different failures depending on which keywords I use (Can/Will).

This one hangs on startup (but works fine when not “Fast”):
NSDictionary *grammar = @{
OneOfTheseCanBeSaidOnce :
@[
@{ ThisWillBeSaidOnce : @[ @{ThisWillBeSaidOnce : @[@”A S A”] }, @{OneOfTheseCanBeSaidOnce : @[@”1″, @”2″, @”3″, @”4″, @”E”]}]},
@{ ThisWillBeSaidOnce : @[@”PATIENT EDUCATION PROVIDED”]},
@{ ThisWillBeSaidOnce : @[ @{ThisWillBeSaidOnce : @[@”HEART”] }, @{OneOfTheseCanBeSaidOnce : @[@”R R R”, @”OTHER”]}]},
@{ ThisWillBeSaidOnce : @[ @{ThisWillBeSaidOnce : @[@”LUNGS”] }, @{OneOfTheseCanBeSaidOnce : @[@”C T A”, @”OTHER”]}]},
]
};
This one crashes with an Index 1 beyond bounds [0 .. 0]:

NSDictionary *grammar = @{
OneOfTheseWillBeSaidOnce :
@[
@{ ThisCanBeSaidOnce : @[ @{ThisWillBeSaidOnce : @[@”A S A”] }, @{OneOfTheseCanBeSaidOnce : @[@”1″, @”2″, @”3″, @”4″, @”E”]}]},
@{ ThisCanBeSaidOnce : @[@”PATIENT EDUCATION PROVIDED”]},
@{ ThisCanBeSaidOnce : @[ @{ThisWillBeSaidOnce : @[@”HEART”] }, @{OneOfTheseCanBeSaidOnce : @[@”R R R”, @”OTHER”]}]},
@{ ThisCanBeSaidOnce : @[ @{ThisWillBeSaidOnce : @[@”LUNGS”] }, @{OneOfTheseCanBeSaidOnce : @[@”C T A”, @”OTHER”]}]},
]
};
2014-08-06 18:30:05.203 OpenEarsSampleApp[43771:60b] *** Terminating app due to uncaught exception ‘NSRangeException’, reason: ‘*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]’
*** First throw call stack:
(
0 CoreFoundation 0x025571e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x022d68e5 objc_exception_throw + 44
2 CoreFoundation 0x0250b8b2 -[__NSArrayI objectAtIndex:] + 210
3 OpenEarsSampleApp 0x0011eccb OpenEarsSampleApp + 1170635
4 OpenEarsSampleApp 0x00121743 OpenEarsSampleApp + 1181507
5 OpenEarsSampleApp 0x00121bf0 OpenEarsSampleApp + 1182704
6 OpenEarsSampleApp 0x00121e2d OpenEarsSampleApp + 1183277
7 OpenEarsSampleApp 0x00004595 OpenEarsSampleApp + 13717

I feel like I must be missing a basic concept of how the rules are supposed to work… I’ve read the RuleORama Manual, but it just gives the same example as in the tutorial. Is there some other documentation I should be reading?

Thanks again for any help you can give me…