-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from pygettext to xgettext (#248)
* Switch from pygettext to xgettext This commit switches the update_translations.py script to use xgettext instead of pygettext, mostly because xgettext is installed system wide, while pygettext moves around, especially when updating python versions. It also contains a few tweaks to the Naomi TTI system, which was scoring Hacker News higher than News when responding to the word "news" because every template in Hacker News contains the word news while one of the templates in News does not. I have therefore started penalizing the intent proportional to the weight of words that do not appear in the incoming request, which seems to work well so far, and penalizes "Hacker News" into a lower ranking if the word "Hacker" is not detected in the incoming request. * Skip WER if transcription is blank jiWER suddenly is throwing an error if the transcription is blank, so skip it. * Fixes to update_translations.py Fixed a couple of bugs introduced when updating update_translations.py to python3, and added some fixes to hopefully prevent msgcat from duplicating the header information when updating translations. * Flake8 issues Fixed some formatting issues, unused variables, unused import * Codacy subprocess complaint Codacy does not like subprocess. Added a nosec check. * Fixed plurals Fixed a bug which was preventing the plurals information from being written to the .po files * Better recovery after canceling setup I started setting up Naomi, but canceled the process before it completed. At that point, it had built the Pocketsphinx model, but had not set the locations of the hmm dir or fst file in the profile. Because it did not have to create them the next time I ran it, it did not set the default location of the fst file. * STTTrainer fix for new intents This fixes the Adapt Pocketsphinx STTTrainer plugin to extract intent templates from the new intent structure.
- Loading branch information
1 parent
faffb05
commit f18c800
Showing
10 changed files
with
235 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from blessings import Terminal | ||
from getpass import getpass | ||
from naomi import app_utils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.