Reply To: Convert JSGF Grammar to Dictionary

Home Forums OpenEars Convert JSGF Grammar to Dictionary Reply To: Convert JSGF Grammar to Dictionary

#1024994
Halle Winkler
Politepix

Does this get you the intended result?

    @{ 
      OneOfTheseWillBeSaidOnce: 
          @[ 
              @{ 
                  ThisWillBeSaidOnce:
                      
                      @[ // 8 O’Five, One O’ Nine
                          @{ 
                              OneOfTheseWillBeSaidOnce : @[@"ONE", @"TWO", @"THREE", @"FOUR", @"FIVE", @"SIX", @"SEVEN", @"EIGHT", @"NINE", @"TEN", @"ELEVEN", @"TWELVE"]
                              },
                          @{ 
                              ThisWillBeSaidOnce : @[@"O"]
                              },
                          @{ 
                              OneOfTheseWillBeSaidOnce : @[@"ONE", @"TWO", @"THREE", @"FOUR", @"FIVE", @"SIX", @"SEVEN", @"EIGHT"]
                              }
                          ]
                  },
              @{ 
                  ThisWillBeSaidOnce:
                      
                      @[ // 8 O’Five, One O’ Nine
                          @{ 
                              OneOfTheseWillBeSaidOnce : @[@"ONE", @"TWO", @"THREE", @"FOUR", @"FIVE", @"SIX", @"SEVEN", @"EIGHT", @"NINE", @"TEN", @"ELEVEN", @"TWELVE"]
                              },
                          @{ 
                              ThisWillBeSaidOnce : @[@"O’CLOCK"]
                              }
                          ]
                  },
              @{ 
                  ThisWillBeSaidOnce:
                      
                      @[ // 8 O’Five, One O’ Nine
                          @{ 
                              OneOfTheseWillBeSaidOnce : @[@"ONE", @"TWO", @"THREE", @"FOUR", @"FIVE", @"SIX", @"SEVEN", @"EIGHT", @"NINE", @"TEN", @"ELEVEN", @"TWELVE"]
                              },
                          @{ 
                              OneOfTheseWillBeSaidOnce : @[@"TEN",@"ELEVEN", @"TWELVE", @"THIRTEEN", @"FOURTEEN", @"FIFTEEN", @"SIXTEEN", @"SEVENTEEN", @"EIGHTEEN", @"NINETEEN", @"TWENTY", @"THIRTY", @"FORTY", @"FIFTY"]
                              }
                          ]
                  }
              ]
      };