Paul Cantrell

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • Author
    Posts
  • in reply to: Problem with Rule-O-Rama not creating .DMP file #1022151
    Paul Cantrell
    Participant

    Halle,

    Thanks for the reply. Of course, the frustrating part is that I had it all working using the base OpenEars grammar, but as I added rules it got slower geometrically. (with 3 or 4 rules it was recognizing in 1-2 seconds, by 12-15 rules it was taking 2 minutes or more).

    The ability to repeat is only important as a way to gather numbers, I don’t use it elsewhere in the grammar. For instance, if the user says “Weight 152 pounds” I just encoded all the numbers, (1-10, 10,20,..100, 100,200,300) with an optional repeat and then post processed the “100 50 2” as 152. Pretty ugly, I know, but worked fairly well.

    I’ll do some research into language model vs grammar, are you suggesting that I might want to plug in my own language model into Open Ears, or were you speaking more generically? Maybe you could suggest a google search or a seminal web site where I could look that up?

    Right now my fallback strategy is to keep the number of rules small enough that base OpenEars would have the required speed, but that’s probably not a good long term strategy (4 or so rules at a time is pretty limiting). Or else maybe you will find the bug in Rule-O-Rama and I can make that work (but I don’t know how I’ll handle numbers in that case).

    Sorry to take so much of your time…

    Paul

    in reply to: Problem with Rule-O-Rama not creating .DMP file #1022149
    Paul Cantrell
    Participant

    Thanks Halle,

    I have a fairly quick deadline to get something working so that the team can decide whether to go with OpenEars or some other recognition system. I’m trying to construct a grammar that will allow accurate filling in of a medical form. The two problems I’m having is getting a grammar fast enough to work (base OpenEars is too slow by the time I have a dozen rules) and how to input numbers (It’s working okay in base OpenEars but I’m using the optional repetitions to allow entry of numbers (so, 231 would be “200 30 1” which I can recognize as a single number and combine. Not sure what to do about that with Rule-O-Rama not allowing optional repetitions. How do people acquire numbers typically? But of course, until I can get a grammar to load without crashing, those issues are moot. Thanks for any help you can give me… We think OpenEars would be great for our project if we can figure out a few of these issues.

    in 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…

Viewing 3 posts - 1 through 3 (of 3 total)