Live data from Hacker News

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

developer.amazon.com

141–147 of 147 posts

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

#141
post #95

Amazon is pulling ahead. Siri still adds 'All man milk' to my shopping list instead of almond milk.

And someone asking Siri to set a reminder to "prepare the dough" only to find that Siri heard something much more morbid.

https://twitter.com/danielpunkass/status/1073723442179031041

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

#142

Earlier quoted context omitted.

You don't need commas to do that in text parsing either. Newlines, for example, will do. When spoken, a shopping list is not a sentence. There's a small pause and/or different emphasis on the start of each item that can be learned (humans, for one, can discern it). "Eggs milk peanut-butter" sounds different than "Eggs milk peanut butter". (Besides it can easily learn that peanut, singular, is not a thing people order…

You're basically saying that they should build a speech recognition system that links words that should belong together with a hyphen... great then: that's exactly what this article is about.

No. They're not saying anything about "words that should belong together". They're saying two things:

1) There is a pronunciation difference between one item with two words, and two items with one word each.

2) You can also use per-word information here, because "peanut" is not something that goes on shopping lists.

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

#143
post #139

Earlier quoted context omitted.

"Coconut" is still an anomalous grocery item. You'd want one of - a coconut - [number] coconuts - shredded coconut "Coconut" is best matched to that last option, but it's not a natural word choice. (Although it is a natural list entry... do people think of themselves as dictating to Alexa, or as writing the list themselves while happening to use their voice?)

If i'm making a list as a reminder to actually pick up items.. coconut will suffice.

Yes, I agree. If you're writing a list for yourself, a bare "coconut" is a typical entry. But if you're dictating a shopping list to someone else, you're quite unlikely to say "coconut" because that isn't grammatical.

So it turns into a question of how people think about dictating to Alexa.

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

#144
post #64
post #58

Earlier quoted context omitted.

This would require that you have an exhaustive list of priorities typed out in a grammar, for each language. Word embeddings is a more semi-supervised learning. There is no way grammars could cover all the cases in a scalable way.

True, so maybe the best approach is to use machine learning to generate the exhaustive list of priorities based on labeled human speech. Then your end product is something we can understand and tweak, instead of a black-box neural network.

You'd have to human-label that speech. That already won't scale very well, and requires per-language annotation.

Understanding and tweaking it should be done with hyper parameters, not semantic libraries.

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

#145

Earlier quoted context omitted.

You don't need commas to do that in text parsing either. Newlines, for example, will do. When spoken, a shopping list is not a sentence. There's a small pause and/or different emphasis on the start of each item that can be learned (humans, for one, can discern it). "Eggs milk peanut-butter" sounds different than "Eggs milk peanut butter". (Besides it can easily learn that peanut, singular, is not a thing people order…

You're basically saying that they should build a speech recognition system that links words that should belong together with a hyphen... great then: that's exactly what this article is about.

No, I'm just using a hyphen on my "transcription" to show the two cases are spoken differently.

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

#146
post #123

Earlier quoted context omitted.

You don't need commas to do that in text parsing either. Newlines, for example, will do. When spoken, a shopping list is not a sentence. There's a small pause and/or different emphasis on the start of each item that can be learned (humans, for one, can discern it). "Eggs milk peanut-butter" sounds different than "Eggs milk peanut butter". (Besides it can easily learn that peanut, singular, is not a thing people order…

> "Eggs milk peanut-butter" sounds different than "Eggs milk peanut butter" True, but I've never went to the grocery store to buy a singular peanut. I've bought a bag of peanuts, but not just one peanut.

Which I cover directly below.

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

#147

Earlier quoted context omitted.

Far more important than the lack of a pause between then words is the a priori fact that "peanut butter" is a common single item and "peanut, butter" is an uncommon list of items. It is that fact that means that you require a pause between the words to indicate "peanut, butter". If you ordered "butter, peanuts" for example, it would probably get that it was two items even without the pause between words. It's all abo…

I don't see why they can't both be important signals. I would hazard a guess that a combined approach is what humans do. I'm not a linguist or anything, but it seems like in practice people may pronounce "peanut butter" a little differently when they say the two words together. Something like "peanubutter". Or maybe they convert the "t" in "peanut" into a glottal stop. Anyway, if the "t" is absent when you're talking…

They are both signals. But the prior probability is more important in this case because it is so much more common to say "peanut butter" than "peanut, butter". In other cases the pause might be a more important signal.
Post reply on HN