Browse Source

Put all number-words on one line in the corpus

This makes pocketsphinx pick up way fewer false-positives of single
number-words as recognised sentences.  It doesn't seem to make any
difference in anything else, but fewer false-positives is always nice.
Clara Hobbs 7 years ago
parent
commit
cb4822025f
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      kayleevc/kaylee.py

+ 2
- 1
kayleevc/kaylee.py View File

91
                 strings.write(voice_cmd.strip().replace('%d', '') + "\n")
91
                 strings.write(voice_cmd.strip().replace('%d', '') + "\n")
92
             # Add number words to the corpus
92
             # Add number words to the corpus
93
             for word in self.number_parser.number_words:
93
             for word in self.number_parser.number_words:
94
-                strings.write(word + "\n")
94
+                strings.write(word + " ")
95
+            strings.write("\n")
95
 
96
 
96
     def log_history(self, text):
97
     def log_history(self, text):
97
         if self.options['history']:
98
         if self.options['history']:

Loading…
Cancel
Save