Commit Graph

21 Commits (5d842fd3690a6800507f4dc9bf43403f0ccf7e12)

Author SHA1 Message Date
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
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 01b37f06eb Handle "tonight" and text containing only a date
- "tonight" is re-interpreted as PM
- check is performed to check if previous word exist before accessing it
to handle sentences containing only a simple date
2017-12-13 15:00:57 +01:00
jarbasai d7926cde07 pt unicode bug fix in normalization 2017-12-12 03:10:00 +00:00
jarbasai b301890cc5 pt unicode bug fix in datetime extract 2017-12-12 03:07:49 +00:00
jarbasai 745de21e57 pt unicode bug fix in number parse 2017-12-12 03:05:31 +00:00
penrods 55b3f20bf3 Increase min wait time in wait_while_speaking()
In code like this:
   self.speak_dialog("something")
   mycroft.audio.wait_while_speaking()
It was possible that the speaking of "something" would take longer to
start than the 0.1 seconds that was built into the wait_while_speaking().
The definition of this behavior is slightly fuzzy, but this is definitely
a case where the expectation is that previous request for speech would
start and complete.  For now, I have just bumped the minimum wait to
0.3 seconds.

In the long run we might consider tracking specific speak requests and
generating a notification when that request has been serviced.  Then the
skill could automatically hold off until that request has been serviced.
But the basic skill code won't have to change to make this happen, so
this additional sleep is adequate for today.

Also snuck in a minor change to a comment.
2017-11-22 13:21:23 -06: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
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
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
ProsperousHeart 88acee1bc2 Fixed PEP8 for number extraction addition 2017-05-30 14:30:41 -05:00
ProsperousHeart 5ad8e4ac74 Adding Extraction of Numbers 2017-05-25 18:31:43 -05:00
SoloVeniaASaludar 942055a95f + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar f7b790b660 + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar 85a74ab72f + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar 690d9763a9 + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar 8ec3c7f8bc normalize_es 2017-05-18 16:53:10 -03: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