Commit Graph

281 Commits (979c02158d95ad3cbdd17a14c0f3d6f415ae58fa)

Author SHA1 Message Date
Augusto Monteiro 2b1e5b2714
Merge pull request #1400 from forslund/feature/swedish-lang-utils
Add format and parsing methods for swedish
2018-02-13 09:38:15 -03:00
Cakeh 85a13309e9 fix codacy issues 2018-02-12 12:21:07 +01:00
Cakeh c1918da9cb Add fr support for ordinal numbers and time qualifiers 2018-02-12 12:02:54 +01:00
Cakeh c45d228d91 Issue-1411 - Leave all nice_number formatting to language 2018-02-12 12:02:04 +01:00
Cakeh fcbf2eae9e Correct issues found by Codacy 2018-02-08 22:20:56 +01:00
Cakeh 3a11f39d7d Issue-1375 - Fix and complete french translation 2018-02-08 21:46:24 +01:00
Åke 708d3ecce1
Merge pull request #1412 from MycroftAI/feature/fix_nice_time
Fix bug in nice_time() for times before noon
2018-02-08 14:08:42 +01:00
Ale 27f974c3fe inserted new italian functions adapted from en
Add new tests for nice_time() and pronounce_number()
2018-02-08 10:58:36 +01:00
penrods 420b21e40e Fix bug in nice_time() for times before noon
Bonehead copy/paste and testing gap left a bug that reported things
like "negative 11 o'clock"
2018-02-08 01:29:05 -06:00
Åke Forslund a11b093e4d Add format and parsing methods for swedish 2018-02-01 15:32:08 +01:00
Åke b2af245554 Add match_one fuzzymatching function (#1372)
match_one finds the closest match for a query in a list or dictionary of
possibilities.
2018-02-01 01:52:14 -06:00
Åke Forslund 044c4c3c0f Fix broken test and codacy warning
- Restore nice_number_it
- Fix codacy warning about overriding str
- Fix octal representation of times in convert_time test
2018-01-31 14:09:06 +01:00
penrods 6dbf1e72d7 Add formater for numbers and time
Add support for:
* mycroft.util.format.nice_time()
* mycroft.util.format.prounce_number()
* implemented unittests for above

Also renamed the helper method convert_number() to
_convert_to_mixed_fraction()
2018-01-31 05:30:01 -06:00
Ale c56b293d3d Update italian parsing methods
Add extract_datetime_it
Add tests for italian methods
2018-01-29 09:47:10 +01:00
Ale 158b25170b translate italian functions for format.py and parse.py based on pt_pt job (#1363)
Add basic functions for Italian language

- nice_number()
- extract_number()
- normalize()
2018-01-25 15:58:32 +01:00
Åke Forslund 6c4f485323 Make handlers for single scheduled events one shot
- add_event() now accepts the parameter once, registring the event as a one shot event.
- remove_event for non-existing events is handled
- added a test for this
2018-01-16 17:39:51 +01:00
Åke Forslund 979b72c2df Add basic tests for add/removing event methods
Basic tests for:
- add_event
- remove_event
- schedule_event
- cancel_scheduled_event
2018-01-16 15:46:11 +01:00
Michael Nguyen f48068a50c
Merge pull request #1356 from forslund/test/separate-langs
Split the test_parse.py by language
2018-01-12 02:49:12 -06:00
Åke Forslund 35a5528a48 Split the test_parse.py by language
- switch over to utf-8 encoding for all the files
2018-01-10 16:21:28 +01:00
Jarbas 905e5397ed bing + houndify stt (#1229)
Add bing and Houndify stt backends
2018-01-09 13:41:26 +01:00
Åke Forslund 0114ce473e Split format.py and parse.py per language
Move the language specific functions and constants into separate files.
This will avoid many unnecessary conflicts due to involuntary encoding
changes.
2018-01-08 17:08:31 -06:00
aleale99 aa8f7a8e4b
minor correction on file
typo error on class name and constant name
2017-12-29 11:17:22 +01:00
Åke 277e8bc506
Merge pull request #1320 from forslund/feature/oauth-token
Add oauth token endpoint to device api
2017-12-21 17:56:43 +01:00
Åke Forslund 2c0237cb8d Add oauth token endpoint to device api
When a token has been generated for the provided developer credentials
id the method will return it as json, if it doesn't exist HTTPError will
be raised (404 not found)
2017-12-21 14:52:48 +01:00
Michael Nguyen 305825369f fixed unit test 2017-12-20 15:59:09 -06:00
Augusto Monteiro e3243e2a62
Merge pull request #1307 from forslund/bugfix/extract_datetime
Minor fix of extract datetime
2017-12-19 15:15:22 -05:00
Åke Forslund b7f5bd2dc4 Fix failing test (changed limit) 2017-12-15 13:03:57 +01:00
penrods 5a12fc471c Add new parse function fuzzy_match (take 2)
A fuzzy_match() produces a basic ratio match of two strings.
The result is between 0.0 and 1.0, where 1.0 is a perfect
match.
2017-12-15 05:54:14 -06:00
Åke Forslund 7b091e9b46 Add failing test cases for extract_datetime
- "tonight" isn't handled
- sentences containing nothing but a date throws an exception ("december 3")
2017-12-12 08:32:54 +01:00
jarbasai aa4d3a47cf pep8 strikes again 2017-12-12 03:22:11 +00:00
jarbasai 8f895118ce fix pt-pt tests TODOs 2017-12-12 02:32:44 +00:00
Åke Forslund fa430f2ec1 Correct test coverage
Previously the coverage counted the entire mycroft core including things
such as the docs and the tests themself. The inclusion of the actual
tests in the coverage metric scewed the metric quite a bit and the
inclusion of irrelevant files made the information presented by
coveralls cluttered.
2017-12-07 02:45:52 -06:00
Matthew D. Scholefield be638de12b Add general metrics 2017-11-22 23:39:14 -06:00
gaurav 3a40014122 Issue-1227 Fix arg =[] and ={}
Issue-1227 fixed line length

Issue-1227 fixed pep 8 E124

Issue-1227 fixed formatting
2017-11-22 23:17:16 -06:00
Matthew D. Scholefield 4c0ba6869e Add unit tests for messaging 2017-11-22 13:03:50 -06:00
Andrew Hayworth 6325c7ae7b Add replacment for Google TTS via Google Cloud Speech API
As noted on the Chromium Dev How-to [1] and on the
SpeechRecognition library docs [2], the Google TTS API
is really not the right API to call. While it's simple,
and allows you to authenticate via a simple token, it is
also limited to a max of *50* requests per day.

That's not a lot. I don't think many people will find that
useful, outside of quick testing (if they can even get an
API key - I couldn't figure out how to generate one that
worked correctly).

This commit introduces a new STT backend, google_cloud, so that
the Google STT backend can be deprecated eventually. To do so, we
needed to:
- Install the Google API Client Library
- Create a new STT class which knows how to turn a provided Google
  JSON credentials file into a string (the SpeechRecognition library
  expects you to pass in the JSON string, not a file path, nor an object).

Any person wishing to use this will need to:
- Enable the Cloud Speech API on the Google Cloud Platform console
- Create a new Service Account Key, and download the credentials to
  a secure location
- Configure that location in mycroft.conf, like so:

  "stt": {
    "google_cloud": {
      "credential" {
        "json": { contents of downloaded credentials }
      }
    }
  }

It's worth noting that the Cloud Speech API has a free quota of
60 minutes per month, which would probably stretch further than 50
individual requests. So for hobbyists, it should be nothing but
a net benefit.

[1] http://www.chromium.org/developers/how-tos/api-keys
[2] https://github.com/Uberi/speech_recognition/blob/master/reference/library-reference.rst#recognizer_instancerecognize_googleaudio_data-key--none-language--en-us-show_all--false
2017-11-15 22:10:00 -06:00
Åke Forslund b08cf2bf42 Add tests for creating pocketsphinx hotwords
Default to pocketsphinx when hotword config doesn't hit a predefined
hotword config
2017-11-09 13:54:48 -06:00
Åke Forslund baa5fbeff4 Fix file docstring. 2017-11-03 08:10:12 +01:00
Åke Forslund 6e4d91578b Add test for sending event 2017-11-03 08:10:12 +01:00
Åke Forslund 82b1e48571 Mock loading scheduler data 2017-11-03 08:10:12 +01:00
Åke Forslund 3004aada98 Add test cases for EventScheduler class
====  Tech Notes ====
- Add test cases
- Slight refactoring of EventScheduler class to make it easier to test
2017-11-03 08:10:12 +01:00
penrods 46a6787ed8 One more PEP8 2017-10-27 17:48:11 -05:00
penrods 683a226f42 PEP8 pickiness 2017-10-27 17:44:37 -05:00
penrods 72dbf83835 Fix PEP8 and unittest errors from PR 1049
PR 1049 introduced several cosmetic PEP8 errors that were easily fixed.
Additionally there are unittests that include non-ASCII characters which are
failing.  As Pt-PT support is a work-in-progress, I just commented them out
with TODOs next to them.
2017-10-27 17:39:05 -05:00
Jarbas e189dd97d9 Pt-PT translation (#1049)
Portuguese translation helpers!
2017-10-26 19:18:00 -04:00
Åke Forslund 1f4c98f29c Fix PEP-8 2017-10-26 19:02:32 -04:00
Åke Forslund 52a89327fe Fix storing settings in enclosure client
====  Tech Notes ====
- Fix save in enclosure client
- Add tests for save and merge
2017-10-26 19:02:32 -04:00
Åke Forslund b067e31e54 Fix failing travis and codacy
====  Tech Notes ====
- removed old main.py
- replace reference to ConfigurationManager in api tests
- reset configuration after use in configuration test
- Pep-8 issue
2017-10-26 19:02:32 -04:00
Åke Forslund 29f74c39bd Add test cases 2017-10-26 19:02:32 -04:00
Åke Forslund ea020eab4f Refactor configuration handling
====  Tech Notes ====
- Rewrite of configuration module. Reduced number of calls and simplified
logic.
- Patched configs now survives reload of config
2017-10-26 19:02:32 -04:00
Michael Nguyen f3dacfb204 ==== Tech Notes ====
added capability to auto upload changes from settingsmeta.json to home.mycroft.ai

====  Documentation Notes ====
If a developer make changes to the settingsmeta.json, then this will be auto uploaded to home.mycroft.ai

==== Protocol Notes ====
hash and uuid are now stored as variables in files located in ~/.mycroft/skills/{skill-name}
2017-10-12 12:35:50 -05:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Matthew D. Scholefield 403aeb9360 Upgrade Padatious to 0.3.2 which brings in entity support 2017-10-03 12:17:02 -05:00
Matthew D. Scholefield 07e94f2d07 Improve LOG code and add log unit test
Adjusts style for readability and generates methods dynamically
2017-09-20 12:45:22 -05:00
Matthew D. Scholefield 5e392f34aa Optimize imports
Remove unused imports and group local vs external alphabetically
2017-09-18 16:07:50 -05:00
Matthew D. Scholefield cfdc405da5 Add new LOG class 2017-09-18 13:56:06 -05:00
Åke Forslund 4d0fb1b739 Add test cases for version module 2017-09-15 00:04:24 -05:00
Jarbas e39d013282 Hotword factory (#1062)
* Create hotword_factory.py

* hotword factory

* hotword factory

* hotword factory

* pass language

* HotwordEngine base class

* standup_word config

* missing ,

* hotword factory

* missing ,

* HotWordEngine template

* hotword factory

* pep8

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* hotword factory

* fix unittest

* fix conflicts

* recognizer dir fix

* fix path

* fix path

* correct path

* fix path for realz

* fix path for real realz

* path fixed, end of brain fart

* fix phoneme lenght

* compatibility

* num phonemes for non pocketsphinx modules

* pep8

* bug fix

* bug hunt
2017-09-14 23:34:16 -05:00
Åke Forslund 0d4a841d4e Make test_api slightly more robust 2017-09-14 11:01:32 +02:00
Åke Forslund fd75b05e82 Add tests for api module 2017-09-11 20:31:23 +02:00
Åke Forslund 4386fe1f04 Add tests for stt module 2017-09-07 15:21:58 +02:00
Michael Nguyen 01a7868d49 Merge pull request #1003 from forslund/test-skills-core
Test skills core
2017-08-31 16:00:14 -05:00
Augusto Monteiro 53648b8433 Merge pull request #1012 from forslund/refactor/cleanup-skills
Cleanup skills
2017-08-22 15:03:55 -04:00
Åke Forslund b0f49b0d37 Add tests for location
====  Tech Notes ====
The tests mocks the configuration to ensure the location is what's
expected.
2017-08-22 14:11:48 +02:00
Åke Forslund 29f882b63d More tests of mycroft.skill.core
====  Tech Notes ====
Tests for open_intent_envelope() and MycroftSkill context methods added
2017-08-22 13:00:25 +02:00
Åke Forslund 12bf78cd5f Move funcs only used in skill_tester from core.py
====  Tech Notes ====
Some functions have been orphaned in core.py and are only used in the
tests. To clean up these have been moved to where they're used.
2017-08-21 15:59:48 +02:00
Åke Forslund 92d6b6865c Skill ID is not used instead of name in intents
====  Tech Notes ====
Converse fix changed registring intents using id number rather than name
2017-08-21 09:23:29 +02:00
Åke Forslund 9f2813be34 Add basic test case for loading skills
==== Fixed Issues ====
NONE - replace with associated issue numbers, e.g. #123, #304

====  Tech Notes ====
NONE - explain new algorithms in detail, tool changes, etc.

====  Documentation Notes ====
NONE - description of a new feature or notes on behavior changes

==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.

==== Environment Notes ====
NONE - new package requirements, new files being written to disk, etc.

==== Protocol Notes ====
NONE - message types added or changed, new signals, APIs, etc.
2017-08-21 09:19:57 +02:00
Åke Forslund decc04d52a Add tests intent registration
==== Fixed Issues ====
NONE - replace with associated issue numbers, e.g. #123, #304

====  Tech Notes ====
NONE - explain new algorithms in detail, tool changes, etc.

====  Documentation Notes ====
NONE - description of a new feature or notes on behavior changes

==== Localization Notes ====
NONE - point to new strings, language specific functions, etc.

==== Environment Notes ====
NONE - new package requirements, new files being written to disk, etc.

==== Protocol Notes ====
NONE - message types added or changed, new signals, APIs, etc.
2017-08-21 09:19:57 +02:00
Åke Forslund 6a764ce44e Move intent_service tests to correct directory
==== Tech notes  ====
During a rebase the intent_service test wasn't moved to the correct
directory
2017-08-19 09:30:27 +02:00
Åke Forslund 7bd603664a Fix skill settings test (broke in rebase) 2017-08-17 02:05:02 -05:00
Åke Forslund b5af1e2f28 Move audio tests to unittest dir 2017-08-17 02:05:02 -05:00
Åke Forslund 4e7defa89f Fix pep8 issues. 2017-08-17 02:05:02 -05:00
Åke Forslund 1c5da3e25d Move messagebus test to integration tests 2017-08-17 02:05:02 -05:00
Art McGee 828d305e6c This tests the messagebus for mycroft.
This is just a basic test of sending between websocket clients.  It makes sure the message gets to the other side. It doesn't check for correct ness.  More testing sure could be done.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-08-17 02:05:02 -05:00
Åke Forslund 4157585c0a Move lock tests into unittest directory 2017-08-17 02:05:02 -05:00
harika 173bee9f95 Fixed pep8 format 2017-08-17 02:05:02 -05:00
harika 4c3dd3aa7c Updating skill_tester to automate skills testing(regression) 2017-08-17 02:05:02 -05:00
harika 632df2a498 Update tests 2017-08-17 02:05:02 -05:00
harika cbbe3fe1cd __init__.py must be present 2017-08-17 02:05:02 -05:00
harika e2811ccde2 added some stuffs --arron says it's awesome! 2017-08-17 02:05:02 -05:00
Åke Forslund c8dd1a9b46 Make discover test directory settable
The skill directory can be specified when calling the discovery_test

`PYTHONPATH=./ python test/integrationtests/skills/discovery_test.py
 SKILL_DIR`
2017-08-17 02:05:02 -05:00
Åke Forslund f0a7a71e01 Fix shutdown error.
None type can be in skill list
2017-08-17 02:05:02 -05:00
Åke Forslund 39d0451143 Separate tests into unittests and integrationtests 2017-08-17 02:05:02 -05:00
Åke Forslund 949c3f91f4 Cleanup
- Load skills only once
- Fix find skill name method
- pep8 fix
2017-08-17 02:05:02 -05:00
Åke Forslund 73c53aa8ea Hackish first step to getting skill tester up and running 2017-08-17 02:05:02 -05:00
Åke Forslund ddb514e470 Add basic tests for context manager 2017-08-15 21:27:19 -05:00
Åke e7c55aaa43 Merge pull request #933 from MycroftAI/feature/skill-configuration
Feature/skill configuration
2017-08-02 08:57:28 +02:00
Michael Nguyen 48b26d1fbd added new test and put back is_stored property 2017-08-01 13:52:51 -05:00
Åke Forslund 68506cb519 Add basic tests for audio service 2017-07-31 13:37:17 +02:00
Michael Nguyen 1e8ee03674 fixed pep8 issues 2017-07-27 16:38:24 -05:00
Michael Nguyen 37ada28dbd refactored skill settings and fixed test 2017-07-27 16:28:32 -05:00
Connor Penrod 41698d4dbe Adds the ExtractDateTime parse function from Christopher (plus relevant tests) (#866)
Adds the ExtractDateTime parse function from Christopher.  When imported from mycroft/util/parse.py, it'll take a sentence like "What's the weather like 5 weeks from next Wednesday?" and will extract a python datetime object for that date.

* Added requirements.txt change for importing dateutil
2017-07-10 15:33:21 -05:00
Michael Nguyen f361392628 Merge branch 'dev' of https://github.com/MycroftAI/mycroft-core into feature/skill-configuration 2017-07-06 12:40:50 -05:00
Michael Nguyen bf48d7b6fb [WIP] need to implement PATCH 2017-07-06 12:40:21 -05:00
Matthew D. Scholefield e11bb52853 Fix wake up 2017-07-05 17:11:26 -05:00
Matthew D. Scholefield c2b2134a12 Make Wake Word detection modular (#876)
This separates Pocketsphinx into its own class allowing other wake word recognizes to be switched in easier.
2017-07-05 14:26:34 -05:00
Michael Nguyen de51d9aa4e fixed test 2017-07-05 10:10:09 -05:00
Augusto Monteiro 8629bb9e71 Merge pull request #837 from forslund/bugfix/issue-836
Allow service to reload as intended
2017-06-26 16:10:41 -04:00
Åke Forslund 5ac2e5f51e Check if settings have changed with simple hash 2017-06-22 08:36:33 +02:00
Åke Forslund 728391427e Add test for PID locks
Catch IOError in delete method if pid-file doesn't exist
2017-06-16 14:17:43 +02:00
kfezer 3988da5ffb Merge pull request #692 from forslund/feature/issue-691
#691 - adding setting per skill
2017-05-30 16:47:33 -07:00
kfezer 6e00b43acf Merge pull request #793 from ProsperousHeart/dev
Adding Extraction of Numbers
2017-05-30 15:10:13 -07:00
ProsperousHeart ae5d6273bc PEP8 Fix To Test File 2017-05-30 16:18:11 -05:00
ProsperousHeart 5ad8e4ac74 Adding Extraction of Numbers 2017-05-25 18:31:43 -05:00
Ashwin Venkatesan 98e6847282 modify test to use 'a' if numerator is 1 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan 1793757e60 Fix pep8 issues 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan 968c51dd69 Add test for non speech nice number format 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan e7e29b2edd Add tests for nice_number formatting 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan fdae0a08a2 Add simple vulgar fractions test 2017-05-25 11:43:05 -07:00
Åke Forslund b8b05e6543 Add unittest for SkillSettings 2017-05-20 08:29:27 +02:00
SoloVeniaASaludar f7b790b660 + 2017-05-18 16:53:10 -03:00
Åke Forslund 3710c4e58d Add __init__ to test/util to activate tests in that subdir 2017-05-18 16:51:17 -03:00
Åke Forslund 11391557f5 Ensure that signal directory exists when creating signal.
Also add test cases for ipc signals
2017-05-18 16:51:17 -03:00
Åke Forslund ac05fd4fd0 Add coverage with nose2 and coveralls 2017-05-18 16:51:17 -03:00
Åke Forslund ce554d06cf Disable maxAudioWithBaselineShift test (works locally but not on travis) 2017-05-18 16:49:07 -03:00
Åke Forslund 06e352476d Disable tests requiring pairing 2017-05-18 16:49:07 -03:00
Åke Forslund bc744c3476 Fix pep8 2017-05-18 16:49:07 -03:00
Åke Forslund 0284103492 Disable failing tests for now while unittests are re-enabled 2017-05-18 16:49:07 -03:00
Åke Forslund 63ce4ced02 Remove pairing skill test since it's not part of core 2017-05-18 16:49:07 -03:00
Åke Forslund cb4ce7e481 Replace GoogleSTT with MycroftSTT 2017-05-18 16:49:07 -03:00
Åke Forslund cd088415d0 Fix init of local recognizer 2017-05-18 16:49:07 -03:00
Åke Forslund 028e0bf56d Both date formats tested. 2017-05-18 16:49:07 -03:00
Åke Forslund 2180c1872d Add dedicated directory for empty directory tests. 2017-05-18 16:49:07 -03:00
Åke Forslund 26b3423fb2 Correct test criteria for time format for scheduled skill.
Now matches current behaviour, previous behaviour is not a good idea since it depended on Locale.
2017-05-18 16:49:07 -03:00
Åke Forslund a56d8146a3 record.wav amplified.
Record test failed due to low signal in record.wav
2017-05-18 16:49:07 -03:00
Åke Forslund 484d4a9ce3 Move ignore SIGCHLD to entry points.
Ignoring SIGCHLD trips up unittests, this was done as the unittest loaded mycroft.skills.core
2017-05-18 16:49:07 -03:00
penrods 35a213d4db The configuration values were poorly documented. See issue #653
This addresses this in several ways:
* Created mechanism to load 'commented' JSON (using '//' or '#' comments on a single line)
* Embedded comments into the mycroft.conf, indicating use, legal values, and where they get overridden
* Create ConfigurationManager.instance() static method to replace ConfigurationManager.get().  This produces more readable code like:
  ConfigurationManager.instance().get("value") instead of ConfigurationManager.get().get("value")
* Made _ConfigurationListener 'private'
* docstring'ed things
2017-04-13 01:09:50 -07:00
Augusto Monteiro 0901f1bafc #539 - fixing pep8 2017-03-14 13:43:45 -05:00
penrods eafcc1abfb Several extensions to text normalization:
* intent_failure message now carries along the utterance's lang code
* normalizing query for Wolfram Alpha
* added normalization of "whats" to "what is".  This is technically incorrect ("whats" means more than one instance of "what", as in "the whats and whys of open source"), but that is a rare phrase.  Unfortunately, several STT engines incorrectly output things like "whats 8 + 4", which is grammatically incorrect.  So we'll handle the common and potentially screw up the uncommon.
* more parsing test cases, including a few corrections
2017-03-14 13:43:45 -05:00
penrods cfa79e03a2 Fixes issue #539
The utterance is now placed on the bus along with its language code.  If not specified, it uses "en-us".

Added a new mycroft.util.parse module.  It contains the normalize() function.  Normalization currently does two things:
  * Expands contractions ("they're" -> "they are", etc)
  * Optionally removes articles ("a", "an", "the").  Removing is the default.
  * Textual numbers become digits, up to 20.  E.g. "What is the weather in four days" becomes "What is weather in 4 days".

NOTE:  This is potentially a breaking change!  Remove "the", "a" and "an" from your .voc files!

Skill changes:
  * I cleaned up the .voc files for the default Skills.
  * Split the date_time keyword into an extra entity.  Now a "QueryKeyword.voc" exists, with "what|tell" instead of combing that into "what is time" in the TimeKeyword.voc.
  * Volume skill now accepts 1-11, e.g. "turn volume to 11"
2017-03-14 13:43:45 -05:00
Åke 9d9ab7b826 Test allow test to finsh immediately (#453)
Add cleanup procedure to skills:
MycroftSkill cleanup does nothing, ScheduledSkill will cancel running timers to make sure it's not blocking termination.

Tests updated to use this allowing unit test to exit after completion.
2017-01-20 15:50:00 -06:00
Jonathan D'Orleans 416191e598 Issues 350 - Synchronizing local and remote configuration 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 4c1ba4e337 Issues 356 - Rebasing with master 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 14c6eae264 Issues 356 - Integrating Listener with STT modules 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans c71c054258 Issues 351 - Creating STT module and classes 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans ccceb62b7a Issues 351 - Renaming metadata to data and simplifying data usage 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 348cc3fac0 Issues 351 - Renaming message_type to type 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 935e2699ba Issues 351 - Merging metrics with server configuration 2016-12-17 10:14:42 -05:00
Jonathan D'Orleans 3304474a22 Issues 354 - Pairing device with remote server
- Getting pairing code from server
- Treating Api response after request
- Simplifying enclosure mouth events control, upgrade and test process
2016-12-17 10:12:10 -05:00
Ethan Ward b60bd99e79 Fix unused imports (#296) 2016-07-18 15:45:11 -05:00
Ethan Ward 743c430996 Update test coverage to include loading vocab (#294)
* Issues #226 - Add tests for adding vocab

* pep8

* Issues 226 - Update tests

* Issues #226 - Remove debug lines
2016-07-18 15:44:36 -05:00
Matthew D. Scholefield a43b7b3ace Add new listener config options- Fixes #260 (#266)
* Added new listener config options

* Fixed audio unit tests
This adds a cleareraudio file for the wakeup test and changesto the new LocalRecognizer constructor

* Added .dict files to .gitignore
This is because they are now auto-generated on startup rather than stored permanently

* Fixed audio accuracy test for new LocalRecognizer constructor

* Added support for spaces in wake word config
In the phonemes a new word is indicated by a period character. The separating of the words actually changes the way pocketsphinx interprets the sound of it and in this case improves it

* Fixed unit test
2016-07-07 18:24:52 -05:00
Matthew D. Scholefield 9405dce4d9 Decreased "wake up" false positives - Fixes #189 (#252)
* Increased kws threshold for the wakeup_recognizer

* Fixed pep8 in listener

* Fixed unit tests
2016-06-30 14:22:53 -05:00
Matthew D. Scholefield e626f5490f Added more tests to EnglishQuestionParser (#251)
* Added more tests

* Changed example verb in question parser test
2016-06-30 15:14:32 -04:00
Ethan Ward 90905d526c Issues 108 - Change regex to be localized (#222)
* Issues 108 - Add load_regex_files

* Issues 108 - Update weather skill with new regex syntax

* Issues 108 - Update stock skill with new regex syntax

* Issues 108 - Add stock regex file

* Issues 108 - Update time skill to use new regex syntax

* Issues 108 - Update desktop skill to use new regex syntax

* Issues 108 - Update volume skill to use new regex syntax

* Issues 108 - Update wikipedia skill to use new regex syntax

* Issues 108 - Update spelling skill to use new regex syntax

* Issues 108 - Update sms skill to use new regex syntax

* Issues 108 - Update calling skill to use new regex syntax

* Issues 108 - Remove unused argument

* Issues 108 - Add unit tests

* Issues 108 - Minor changes to fix tests

* Issues 108 - Preserve intended test logic

* Issues 108 - Address feedback

* Issues 108 - Update test formatting

* Issues 108 - Change file location
2016-06-28 16:20:48 -04:00
Matthew D. Scholefield eed03f3036 Added new compiled regex for "what's" in wolfram - Fixes #159 (#235)
* Added new compiled regex for what's
This is for verbs that don't have a space between the question word and verb

* Added support for 'whats' in wolfram

* Added tests for the EnglishQuestionParser
2016-06-28 15:13:30 -05:00
Ethan Ward 0a89a9016c WA skill will now search again if there is one `didyoumean` in the results (#236)
* Issues 192 - WA skill will now search again with top alternative

* Issues 192 - Add tests for new method

* Issues 192 - Fix pep8

* Issues 192 - Update test syntax

* Issues 192 - Change WA skill to use dialog

* Issues 192 - Address feedback
2016-06-27 17:30:45 -04:00
Ethan Ward 2a5e61bf34 Update scheduled skill formatting (Fixed #158) (#231)
* Issues 158 - Update ScheduledSkill time formatting

* Issues 158 - Add unit tests for new method changes

* Issues 158 - Change to not use date-based implementation to fix tests

* Issues 158 - Address feedback
2016-06-24 18:20:31 -04:00
Jonathan D'Orleans 81be192801 Issues 209 - Keep user configuration by default (#211) 2016-06-23 16:42:46 -04:00