Live data from Hacker News

How Alexa knows “peanut butter” is one shopping-list item, not two

developer.amazon.com

71–80 of 147 posts

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#72

What happened if I said "peanuts, butter". I expect two items, but will Alexa give one?

As others have said, there's the pluralization of "peanut[s]" to distinguish between the two. This is a useful feature of English: the adjective-like role of a noun in a complex noun phrase is (almost?) always singular. - Computer engineer - NOT computers* engineer - Toothbrush - NOT teethbrush* - Foot doctor - NOT feet* doctor - Alarm clock - NOT alarms* clock, even when it supports multiple alarms! Additionally, th…

Alexa, please tell me about the...

Attorneys general Senators elect

Ahhhhhhh!

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#73
post #62

In text parsing, this whole machine learning would be implemented as "ignore white space as delimiter" ( that's how I implemented it on one of my projects) Ps. I'm aware this will not be a popular comment

Sentences spoken aloud don't have commas.

> In text parsing

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#74
This seems like a fundamentally hard problem. If I ask Alexa, "Play songs by Simon and Garfunkel", I may want to include their solo work ("Play songs by ([Paul] Simon) and ([Art] Garfunkel)") or not ("Play songs by (Simon and Garfunkel)"). The choice is probably more likely for some artist groups than others. It may even vary by user. It's hard to imagine a single trained AI that can handle that variance without a ton of very quickly-changing domain knowledge.

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#75
I implemented a similar BiLSTM-CRF model at my current job. The architecture itself is really interesting, but runs into scaling issues. With LSTMs, you run into the constraint of having to wait on previous inputs and cache those results as well. Although TensorFlow now offers Cuda RNNS and fused kernels to speed up computation, I'd have thought for Amazon's scale, an attention/transformer based architcture would serve them better.

I also notice a lot of dismissive comments about "black box models" or the simple solutions of just parsing out whitespace. My two cents:

1. Models with hand crafted rules perform WORSE than learned representations, especially when you have an end-to-end model with pre trained embeddings. This is shown by one of the seminal papers on this model, Ma and Hovy (2016) https://arxiv.org/pdf/1603.01354.pdf.

"However, even systems that have utilized dis-tributed representations as inputs have used theseto augment, rather than replace, hand-crafted fea-tures (e.g. word spelling and capitalization pat-terns). Their performance drops rapidly when themodels solely depend on neural embeddings"

2. Human speech and human written text are messy. Having a rule for human speech will inevitably lead to a massive list of rules and exceptions to those rules.

3. This model is multi domain, meaning that you don't just need rules for one domain, but rules for multiple domains and interactions between those domains. Considering Amazon's hefty amount of data, it's much more efficient to learn these represntations though a machine learning model rather than constantly playing cat-and-mouse with keeping your hand crafted rules.

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#76
post #66
post #62

Earlier quoted context omitted.

Sentences spoken aloud don't have commas.

Yes, they do. There's evidence to suggest that punctuation marks were devised as pronunciation guides, indicating how to inflect and when to pause, rather than syntactic markers in their own right. Commas in particular indicate a distinctive inflection and short pause in speaking; such would be detectable by Alexa especially if it uses a neural net or similar to analyze human speech.

That was not the point of what I said at all. It Could interpret the vocal cues, yes. As far as I know this is still not a solved problem for speech to text, and results going the other way and trying to guess punctuation is still more reliable.

Back to what I really was getting at: I'm pretty sure the person I replied to was suggesting Alexa could just split(',') and call it a day. With text, yes. With voices this would be irritatingly unreliable. Everyone talks differently and sometimes people stumble weirdly. I am certain humans use a mix of vocal cues and interpretation to place the commas in their heads.

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#78

What happened if I said "peanuts, butter". I expect two items, but will Alexa give one?

As others have said, there's the pluralization of "peanut[s]" to distinguish between the two. This is a useful feature of English: the adjective-like role of a noun in a complex noun phrase is (almost?) always singular. - Computer engineer - NOT computers* engineer - Toothbrush - NOT teethbrush* - Foot doctor - NOT feet* doctor - Alarm clock - NOT alarms* clock, even when it supports multiple alarms! Additionally, th…

Proudfeet!

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#79

This seems like a fundamentally hard problem. If I ask Alexa, "Play songs by Simon and Garfunkel", I may want to include their solo work ("Play songs by ([Paul] Simon) and ([Art] Garfunkel)") or not ("Play songs by (Simon and Garfunkel)"). The choice is probably more likely for some artist groups than others. It may even vary by user. It's hard to imagine a single trained AI that can handle that variance without a to…

I presume they will statistically choose the more likely option - ie, people listen to 'Simon and Garfunkel' more than they listen to 'Simon' or 'Garfunkel'.

Humans will also screw this up. They don't have statistics about which you most likely meant but they do have context which an AI may not.

Re: How Alexa knows “peanut butter” is one shopping-list item, not two

#80
post #5

The German language is superior in this regard because there it would we either "peanut, butter" or "peanutbutter".

French would be easier to understand as peanut butter is "beurre d'arachides" (butter from peanuts). The "de" (or d' in that example) is given you the "context"/what the butter is made of. Same for apple juice, it's "jus de pommes" and etc.
Post reply on HN