Live data from Hacker News

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

developer.amazon.com

61–70 of 147 posts

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

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

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

#63
post #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".

> 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

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

#64
post #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.

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.

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

#66
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.

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.

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

#67
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

And that's what makes it interesting. Peanut butter versus peanuts, butter is easy. No one gets a single peanut.

As for the phone number, that's why anyone in a serious occupation (aviation, military, etc) treat each digit as is stand-alone.

Three-zero-three-six-zero-two.

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

#68
because Alexa knows that there a is thing called "peanut butter" and you most probably meant that. I think Humans too behave in a similar fashion. If you are dictating a shopping list to a person who has never heard of "peanut butter" would most likely raise a question and ask you to spell it.

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

#69
post #16

This, yet again shows just how far the computer science is from real natural language processing, despite of all "AI" companies' claims. Unless they have all and everything hardcoded, even such natural thing are impossible to process for the "natural" language processing programs. All cloud "AI" and "natural" language processing services should really be called "lots and lots of hardcoded stuff language processing"

State of the art virtual assistants offer little intelligence over a command line interface, except instead of typing the command line in, you say it. Besides that, not much difference; the syntax is rigid and the computer doesn't understand your utterance more intelligently than GCC understands "gcc -o my_prog my_prog.c".

And even with a rigid structure they only work for common cases. Using Siri in Italian and trying to get an English album playing is night impossible and vice versa.

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

#70

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, there's phrasal intonation. If the intonation and stress decrease throughout the phrase, it's a single item. If the intonation and stress reset for "butter," then it's a new item.

    - 'PEA ,Nut but ter
    - 'PEA nut 'BUT ter
Post reply on HN