Live data from Hacker News

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

developer.amazon.com

51–60 of 147 posts

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

#51

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.

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

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

#52

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

If it correctly understands peanutS, it will classify it as "more likely 2 items" considering it would check everything against some sort of dictionary. Which contains "peanuts, butter, peanut butter".

PS. I implemented something similar without machine learning and that's how i did it. With text it's easier though, i suppose in NLU it could have a parameter for "pause time between words" which could also contribute to a different conclusion.

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

#53

Earlier quoted context omitted.

It's true that we do alter our speech to provide context clues, it is also true that without them we're _still_ capable of piecing them together. If someone says in a unnaturally drawn out way "I like peanut butter sandwhiches" then I will have no problem detecting the situation and then re-parsing it correctly.

The space is irrelevant. Consider the sentences: The black bird ate seeds. The blackbird flew at mach 3. Your brain thinks of these two words completely differently and it's only through conscious effort that you think of them together. They are different words even though they sound and are spelled the same, regardless of the space. A better example I think is "bear feet" vs "bare feet"

I'm not convinced. It takes effort for me to break apart blackbird into two separate words in my head, as they are so commonly found together. When speaking "black bird" I would insert a long pause between the two and emphasise the "b" on bird to show that I'm not talking about a "blackbird".

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

#58
post #56

I'm pretty sure you could do this in a standard LALR(1) grammar and give [peanut butter] precedence over [peanut] [butter].

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.

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

#59
post #53

Earlier quoted context omitted.

The space is irrelevant. Consider the sentences: The black bird ate seeds. The blackbird flew at mach 3. Your brain thinks of these two words completely differently and it's only through conscious effort that you think of them together. They are different words even though they sound and are spelled the same, regardless of the space. A better example I think is "bear feet" vs "bare feet"

I'm not convinced. It takes effort for me to break apart blackbird into two separate words in my head, as they are so commonly found together. When speaking "black bird" I would insert a long pause between the two and emphasise the "b" on bird to show that I'm not talking about a "blackbird".

The difference for me (maybe this is regional?) is that for “blackbird” the stress is on “black” whereas for “black bird” the stress is on “bird”.

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

#60

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

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".

Post reply on HN