How can we implement 'Alexa, Simon says...' intent to capture free form speech with wide variations as text? - alexa

I would like to capture anything a user says to Alexa in text form. Exactly how 'Alexa, Simon says...' works. Can someone hint at how that intent can be implemented?
I looked at this, this and this but the suggested answers don't work for me and there are no concrete 'accepted' answers to any yet.
LITERAL slot type works as long as the sample utterance is specified (i.e. hard coded literally). Like the answers suggested in the above threads, I tried to 'train' by providing 400+ combinations of possible utterances hoping that it will somehow figure out the rest of the combinations. But, no dice.
My input could be as random as 'TBD-2019-UK', '17_TBD_UK_Leicester', '17_TBD_UK_Leicester 1', '18_TBD_UK_Leicester 2', 'Chicago IL United States', etc. It is a pretty random combo of the year, city, state, country, some other key text in no particular order (lets ignore the special characters for now). Even if 'Chicago IL United States' is specified in Sample Utterances, LITERAL is not able to capture something like 'Pittsburgh PA United States' automatically unless that is also hard coded. There is no way I can come up with ALL possible permutations and combinations of year, city, state, country, some other key data points (... because it sounds impractical/ridiculous).
Plus, more values could be added by user. So it needs to be smart and dynamic.
The problem is, if there is no matching intent found for the utterance, instead of returning the user's speech text, my Alexa is just failing to do anything. It just goes off without doing anything. Any ideas?

Amazon's Alexa service is not designed for dictation. This has been the consistent response from the Developer Evangelists. So, quite simply, you cannot do what you desire: capture free form speech with wide variations.
There are various ways you can 'trick' Alexa into creating a 'generic slot', which I assume those links talk about. But, since it is outside the design parameters of Alexa, they will never perform well, as you have found.
For your use case, I suggest you break down your inputs into several exchanges. Don't use a one-shot invocation, but a dialog. For example:
U: Alexa, open spiffy skill
A: Welcome to spiffy skill. I'd love to do something spiffy for you,
but I need some information. You can give it to me by saying city,
year, state, or country followed by what you want me to look up.
U: City Cincinatti
A: OK, Got city Cincinatti. I need more information to be spiffy. How
Year?
U: Year 2010
A: OK, I've got Cincinatti, 2010. Should I look that up, or do you have
more info?
U: Look it up.
A: Got it. So for Cincinatti, 2010 ...

Related

How to generate text from wikidata json

I am looking for pointers for libraries or methods that would be able to generate full text from the structured information returned by Wikidata - if possible in multiple languages.
To be clearer: from data like the one provided here (this is the JSON version) I would like to be able to generate text similar to the intro paragraph of the wikipedia page for the same item:
Orvieto Cathedral (Italian: Duomo di Orvieto; Cattedrale di Santa Maria Assunta) is a large 14th-century Roman Catholic cathedral dedicated to the Assumption of the Virgin Mary and situated in the town of Orvieto in Umbria, central Italy.
The reason is that the text is provided by Wikipedia for all those cases where a page exists, but I would like to have something also for the Wikidata items without a wikipedia page.
My problem #1 here is: I don't know what something like this is called, so I have no idea what to google for. Any pointers to start from are appreciated, including services or APIs.
This problem falls under the Data to text generation task. I do not know of any services that are currently offering solution. You can look at WEBNLG challenge which has the same objective and similar data. AFAIK mostly template based methods are used to automatically insert data from wikidata into wikipedia as text.

Is there a way to change the name that the NAO-robot uses in the Basic channel?

I want that my NAO-robot (Version 6) uses another name than NAO, when someone asks "What is your name?". I already changed it's name in the settings, but it doesnt use it by the voice recognition.
The basic channel's content is probably generic and might not adapt to your robot's actual name. But by making a small app reacting on the same trigger sentence, you might be able to override the current behavior.

Phones dialing wrong number from tel-hyperlink

We received a complaint that some visitors to our website are dialing the wrong number to get in contact with us.
Our website has a hyperlink in the following form in the footer:
Call us at 12345678
Note that the "+47" (international code) is NOT displayed visually, it is only included in the hyperlink. But now it turns out a limited number of people (circa one a day) is actually calling a private local number at 47123456. Not many considering the size of our business, but still a major nuisance for the family receiving these calls.
The people calling say they just pressed the link to dial.
Has anybody else had these problems? Is anybody aware of mobile phones that do not properly support the tel hyperlink? Any suggestions for a solution? (Apart from changing our or their phone number, of course.)
There are different ways smart phones pick a telephone number.
some are reading the text of your website - some use the tag
on my first try: I would add the +47 to the displayed telephone number
on my second try (or both together): I would replace +47 with 0047 (its norway - or?)
and before posting i got a third idea: which encoding has the webserver and which encoding has the html / PHP page in sourcecode? Both UTF-8 or something else?
Maybe your server is sending it in a different way than the website is created and somehow some smartphones can't handle it correctly.
The problem here is pretty simple: this is the URL-Encoding.
The + char is an reserved character within the URL and represents an space.
To get an actual + sign replace it with the URL encoded version: %2B
See Links for details:
Wikipedia
W3Scools

How to tag text, to keep track of unique edits

So, for example in database I have three users: Peter, John and Sara. There is a specific field, in which all three users can write.
Peter writes:
"I like apples"
, after that John appends with
" and I like bananas"
. Now I have field which says
"I like apples and I like bananas"
, so If I would like to display, which part was writen by whom, my approuch would be to create html tags:
The field would be:
<span class="text-sequence-1">I like apples</span><span class="text-sequence-2"> and I like bananas</span>
and then, from database I would pick the sentences by its order and using CSS on hover on display additional content, on each part of hover on.
1st problem. The problem is if, the third user, Sara, comes and
updates the text, which belongs to both original. Which can be
overcome if I allow to edit one by one Johns and Peters tags.
Then I get edited span inside of original spans and could track
which part was edited and how. If I did like this, I would still
face a second problem:
2nd problem. If Sara decides to edit, for example Johns part, a few
times. I would still get nested badly.
I could use something like #number tags instead of spans, so I can track where each edition ends, but then I couldn't apply CSS code to them to color which part belongs to who and apply additional effects on hover, like showing a box, who edited it and when.
Any ideas how could I implement it?
Sorry for my bad english.
Since you are using a database, keep track of the edits in a separate table. For each edit, keep the following fields:
row-ID of this edit (primary key)
the parent row-ID (the row-ID of the "current edit" when the edit was started/confirmed; see below for how to use)
the author that edited things
the time-stamp
an optional short text describing what was changed (for example, "fixed spelling")
When showing the field, you can then display a link to a "history", that would show who edited what when. You can show individual differences between any two versions such as Wikipedia does when you look at the history of a page - there are many libraries to do that, with highlighting and all. This library seems nice, but there are many others, in all sorts of languages.
When someone starts to edit, let them modify the then-current version (highest time-stamp). When they commit their edit (click accept or similar), check again to see that nobody else has changed things while they were editing (the time-stamp of the parent edit is still highest). If someone did change something, show them the difference between your parent-row and the edit, and tell them to fix things before committing (there may be several edits to take into account). This is the "wikipedia way", and it amounts to a sort of lightweight version control (much easier to implement than, say, Git)
Acually I think that this approach is not good. As you noticed you will get alot of nasty nestings.
What if somone edits only one letter?
Instead of that, think about line comparison approach. Like Git does. So compare if first line changed and store each version.( More sophisticated way would be only storing lines that changed and applying changes like git patches.)
I think your way is destined to fail. It's far way too complex and there is no logical comparision method to be used.
John is cool
John is uncool
John is Uncool
John is weak
Think how you would tag those. What if somone deletes piece of text? Edit will not be visible or u will insert an empty tag (which will not be visible)?
Dont tag, compare. Tagging is not what you're looking for i think. Also please see: Text comparison algorithm

WinForms name chooser

I have a set of names (first, last, salutation) and need a control to allow users to select a single name using WinForms. A ComboBox works fine if the there are ~20 names, but not so well when there are >100 names.
Can anyone recommend a name picker? Perhaps an address book control that I could customize? It's not too hard to write my own, but I have other wheels to invent.
I'm giving you an answer that seems more like a feature request... :-) It can be very easy to use if you implement a control which behaviour is similar to the auto-completion feature of Google: foreach char inserted by the user, a window appears with only the names that match with the string inserted.
I think that it isn't so hard to implement, but I'm sorry, I can't give you a recommendation, only an advice :-)
I agree with Maurizio. To add to his answer:
The most commonly used interface which does exactly this is in email clients, where they auto-complete names (and/or email addresses) as you type them. Thunderbird is a pretty good example. These usually either auto-complete if there is only one match, or show a drop-down list of possible autocompletions you can pick from. In addition, a button next to the field usually allows you to browse the address book as a list.
I'd also suggest filtering the autocompletions available in the most useful ways: e.g. As you type "wi", you could filter it down to names like "[WI]lson, John", "Amery, [WI]lliam", and "[I]ving, [W]alter", making it easy to find people by their initials as well as first and surnames.

Resources