Live data from Hacker News

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

developer.amazon.com

91–100 of 147 posts

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

#91

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…

I agree. When parsing speech, we humans listen for many cues all at once. Spoken language even has intentional redundancy so we can identify and disregard inconsistent cues. For example, a child or foreign speaker might replace "peanut" with "peanuts" and most people would still have no problem understanding "peanuts butter" as long as the rest of the cues are consistent.

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

#93

Earlier quoted context omitted.

Well, what is it? I imagine lists with post-specifiers are near impossible to parse too: Coffee, instant Custard, powdered Sugar Bit contrived, but still.

That seems easy. Keep a pointer to the last item, and if you encounter a 'modifier', modify it.

yeah, but which way? `Add custard powdered sugar to my shopping list` is is powdered custard, or powdered sugar?

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

#94

This is surprising, I didn't know Alexa was capable of this. Whenever I say "Alexa, add milk, eggs, bread, & laundry detergent to my shopping list" it shows up as one long sentence in a single entry.

It's a fairly new feature.

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

#96
post #63
post #60

Earlier quoted context omitted.

No one ever gets a single "peanut". So unless you mush mouth the "S", the reasonable expectation for both your cohabitator and the robot is to bring peanuts and butter. A better question is "coconut, milk" versus "coconut milk".

> A better question is "coconut, milk" versus "coconut milk". Sure, but if you were dictating to a human that would still be an easy one for them to get wrong, depending on how long you paused. I find this interesting with phone numbers. In some countries you hear people say "thirty three sixty two" and they mean 303602

This is a very interesting observation. The whole point of speech to text models being biased towards the US in terms of training data and innovation is valid not only across the larger things (gender/race/religion) but just small things like this. And these are likely to cause daily problems.

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

#97

Earlier quoted context omitted.

A better example is "coffee cream" (Google fails on this one)

Well, what is it? I imagine lists with post-specifiers are near impossible to parse too: Coffee, instant Custard, powdered Sugar Bit contrived, but still.

I see your point for longer lists, but most humans would correctly interpret "Hey, add coffee cream to my shopping list" as one item rather than two.

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

#98

Earlier quoted context omitted.

Well, what is it? I imagine lists with post-specifiers are near impossible to parse too: Coffee, instant Custard, powdered Sugar Bit contrived, but still.

That seems easy. Keep a pointer to the last item, and if you encounter a 'modifier', modify it.

[deleted]

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

#100

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…

In my experience doing stuff like this for artist/song record linkage, the key is really to take a "query expansion" approach rather than a "normalization" approach, because choosing a single normalized form is impossible. So it's better to embrace that there are dozens, hundreds, or even thousands of interpretations and choose probabilistically.

A great example is trying to deal with the "sort name" of artists: e.g. "Presley, Elvis".

It's easy to assume that "Hazlewood, Lee & Nancy Sinatra" means "Lee Hazlewood & Nancy Sinatra".

How bout "Sinatra, Frank & Nancy"? Now the rules are different: the expansion could either be "Frank Sinatra & Nancy Sinatra" (correct) or "Frank Sinatra & Nancy" (but there's no singer who just goes by "Nancy", or is there?)

Now how about "Peter, Paul & Mary"? In that case it's already the literal expanded form referencing three people, not two people named "Paul Peter & Mary Peter" or "Paul Peter & Mary".

So, you just assume they are all possible and rank them based on real-world data. You're right, not always easy!

(Treating them as an unordered bag of tokens can either help or hurt accuracy – that has its own problems when you consider how short and similar many titles are, and how some artists deliberately name themselves as jokes/riffs on a more famous one. Not to mention that after all this it could still be ambigous: MusicBrainz knows about six artists all named "Nirvana". So context is key!)

Post reply on HN