Commit Graph

22 Commits (be79b193b4d5b2672b0eaa744a2f1f68d2b986bd)

Author SHA1 Message Date
Chris Veilleux 7a7ed8944d Clean up of message.py 2019-07-19 08:16:54 +02:00
Matthew D. Scholefield 42ea785fd8 Add default values to Message attributes
This ensures no attributes are None and simplifies some checks within the function
Otherwise, if, for instance, there were no 'data' field in a message, when deserializing, the caller would have to check for None
2019-02-26 02:44:19 -06:00
Åke Forslund 38701a9790 Remove inheritance from object
Inheriting from object isn't necessary in python3.
2019-01-11 09:24:21 +01:00
jarbasal 4e3667e21c Only replace complete words in message remainder
Replace str.replace() with simple regex
2018-11-17 08:35:40 +01:00
Åke Forslund 2a34833394 Make data optional in Message.reply()
To make reply work in the same manner as a newly created message data
shall be optional. This allows mistakes like L1141 of
mycroft/skills/core.py, where the data field isn't set. (And causes an
exception when the line is hit.)
2018-06-01 10:23:13 +02:00
Åke Forslund 424001c973 Fix utterance_remainder for normalized keywords
If the sentence is normalized the utterance_remainder() method fails if
the intent keyword expects normalization.

Example the joking skill has an intent "tell me joke" which is the
normalized equivalent of "tell me a joke". In this case the intent wouldn't be removed from the remainder and instead of an empty string the utterance remainder would contain "tell me joke"
2018-03-28 16:17:53 -05:00
jarbasai 364370abad more robust utterance_remainder 2018-03-23 14:59:51 +00:00
Åke f8fec82905 wait_for_response method for synchronous messagebus communication (#1423)
* Add wait_for_response method to Websock client

The client handles the basic case when wanting to do a syncronous
request-response action.

The method sets up a handler waits for the response and handles timeout.

The expected format is that the reply message should have the same type as
the original message with ".response" appended.

An method in the Message class has been added to create a standard response for
a message.

* Let the :skills command use wait_for_response

* Minor docstring changes

Fixed typos and refined text
2018-02-15 01:39:11 -06:00
Steve Penrod f8f3d3534c Add message.utterance_remainder() method (#1314)
Add message.utterance_remainder() method

This helper will return the portion of an utterance not
consumed by the Adapt parser already.  For example,
"turn on the kitchen light" would have a remainder of
"the kitchen" if there was an Intent with entities that
matched "turn on" and "light". The returned text is passed
through normalize().
2018-01-03 14:26:49 +01: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
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
kfezer cc129f615d Update message.py 2017-06-30 10:03:24 -07:00
Art McGee 3872dafd81 This add comments to document the message class
Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>

	mycroft/messagebus/message.py
2017-06-30 09:57:00 -07:00
Art McGee 94e8705264 Fixes and Typeo's
Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>

	mycroft/messagebus/message.py
2017-06-30 09:54:15 -07:00
Steve Penrod 96c08189ed Revert "This add comments to document the message class" 2017-06-30 00:41:20 +02:00
Art McGee 57ae8bac4c Fixes and Typeo's
Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-06-26 13:52:52 -07:00
Art McGee 11c6ae4a07 This add comments to document the message class
Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-06-26 13:52:52 -07: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
Ryan Sipes 8f2c451938 Fixed Missing License Headers on All Files.
GPL LIcense added to the top of each python file.
2016-05-26 11:16:13 -05:00
Leo Arias d618676089 Issues-4 - Fix pep8 errors. 2016-05-23 17:23:47 +00:00
Arron Atchison 6e42bb1736 In the 1970s computer users had to understand the arcane syntax of the machines they used. They programed their computers using the machine's native language and hardly gave it a thought.
The 1980s birthed a new form of interaction between computers and users.  For the first time computers became capable of understanding the most basic form of human communication - pointing and grunting.  The mouse and the GUI revolutionized computing and made computers accessible to the masses.

We have now entered a third era.  We are rapidly approaching a time when computer systems will understand human language and respond using the most natural form of human communication – speech.

This is an important development.  Some might even call it revolutionary.

Despite its importance, however, the technologies that will underpin this new method of interaction are the property of major tech firms who don't necessarily have the public's best interests at heart.

Not anymore.

Meet Mycroft – the worlds first open source natural language platform.  Mycroft understands human language and responds with speech.  It is being designed to run on anything from a phone to an automobile and will change the way we interact with open source technologies in profound ways.

Our goal here at Mycroft is to improve this technology to the point that when you interact with the software it is impossible to tell if you are talking to a human or a machine.

This initial release of the Mycroft software represents a significant effort by the Mycroft community to give the open source world access to this important technology.  We are all hoping that the software will be useful to the public and will help to usher in a new era of human machine interaction.

Our community welcomes everyone to use Mycroft, improve the software and contribute back to the project.  With your help and support we can truly make Mycroft an AI for everyone.

Joshua W Montgomery – May 17, 2016
2016-05-20 09:16:01 -05:00