Home › Forums › OpenEars › Returned hypothesis and obtaining the rule that was triggered › Reply To: Returned hypothesis and obtaining the rule that was triggered
I was actually going down that path and had read the doc you mentioned.
The problem I ran into was generating an example like the one I had (actually I used the one you wrote in the article and simply added a second set of commands).
Since it is a key followed by an array of phrases the compiler complained that their was duplicated keys (if re-using the key ThisCanBeSaidOnce over and over at the top level).
I then tried to nest the two command structures a level deeper so that the top key was only one ThisWillBeSaidOnce . At one point I was able to get it to run but then my program complained the dictionary was too complex (I had only added one additional command to your example).
Finally, I ran across your other document outlining a way to have the dictionary and grammar files pre-made which would save the generation time at initialization. I thought I could then avoid the additional level of nested dictionary keys.
But now I see it would still be better to have the dictionary available to parse the resulting hypothesis.
Maybe the way I was nesting the 2nd set of commands was not correct. I also searched for additional examples of openEars dictionary setup in code but could not find any.
Thanks for your quick reply.