From: Nathan on
On May 25, 5:08 pm, Walter Roberson <rober...(a)hushmail.com> wrote:
> Nathan wrote:
> > Do you know the rules of English that determine whether a noun
> > receives "a" or "an"?
>
> Unfortunately, the rules are based upon pronunciation rather than on spelling:
> a union, an umpire, a hint, an herbal tea. And pronunciation can be regional...

However, Walter, those are exceptions from the general "rule" taught
in elementary school:
'an' is followed by a word starting with a vowel (in general)
'a' is followed by a word starting with a consonant (in general).


Derek:
Here is a small example of a simple string concatenation function that
you pass two strings into:

function fullstring = concstr(Astr,Bstr)
fullstring = [Astr, Bstr];
end

%Provided you have two variables that contain strings:
C = 'Hello '; %note the single quotes
D = 'World.'; %note the single quotes
%You can concatenate them using the above function as follows:
Fstr = concstr(C,D)
%%%%%%%%%%%
Fstr =
'Hello World.'


-Nathan
From: Walter Roberson on
Nathan wrote:
> On May 25, 5:08 pm, Walter Roberson <rober...(a)hushmail.com> wrote:
>> Nathan wrote:
>>> Do you know the rules of English that determine whether a noun
>>> receives "a" or "an"?
>> Unfortunately, the rules are based upon pronunciation rather than on spelling:
>> a union, an umpire, a hint, an herbal tea. And pronunciation can be regional...

> However, Walter, those are exceptions from the general "rule" taught
> in elementary school:
> 'an' is followed by a word starting with a vowel (in general)
> 'a' is followed by a word starting with a consonant (in general).

Elementary school teaches "A vowel is A, E, I, O, or U, and sometimes
Y", so even elementary school rules about "a" or "an" slide into
questions of pronunciation.

And besides, you didn't ask whether the OP knew the elementary school
rules, you asked whether the OP knew "the rules of English" -- which
means the complete rule that takes pronunciation into account.

The spelling based approximation to the rule has a lot of exceptions --
e.g., it does not take into account that "j" can represent the vowel
more commonly written as "y", or that "w" is now often silent ('wh' used
to be have the 'w' pronounced), or that "x" can be a vowel sound ("an
x-ray") or that "f" or "l" or "m" or "n" or "s" can start with a vowel
sound ("give me an F! Give me an L!") or that "r" can be intermediate
("give me an R!")... That's about half of the letters of the alphabet
that you might sometimes use "an" before!

Any language that pronounces "ghoti" as "fish" is mixed up ;-)
http://en.wikipedia.org/wiki/Ghoti
From: Nathan on
On May 26, 9:55 am, Walter Roberson <rober...(a)hushmail.com> wrote:
> Nathan wrote:
> > On May 25, 5:08 pm, Walter Roberson <rober...(a)hushmail.com> wrote:
> >> Nathan wrote:
> >>> Do you know the rules of English that determine whether a noun
> >>> receives "a" or "an"?
> >> Unfortunately, the rules are based upon pronunciation rather than on spelling:
> >> a union, an umpire, a hint, an herbal tea. And pronunciation can be regional...
> > However, Walter, those are exceptions from the general "rule" taught
> > in elementary school:
> > 'an' is followed by a word starting with a vowel (in general)
> > 'a' is followed by a word starting with a consonant (in general).
>
> Elementary school teaches "A vowel is A, E, I, O, or U, and sometimes
> Y", so even elementary school rules about "a" or "an" slide into
> questions of pronunciation.
>
> And besides, you didn't ask whether the OP knew the elementary school
> rules, you asked whether the OP knew "the rules of English" -- which
> means the complete rule that takes pronunciation into account.
>
> The spelling based approximation to the rule has a lot of exceptions --
> e.g., it does not take into account that "j" can represent the vowel
> more commonly written as "y", or that "w" is now often silent ('wh' used
> to be have the 'w' pronounced), or that "x" can be a vowel sound ("an
> x-ray") or that "f" or "l" or "m" or "n" or "s" can start with a vowel
> sound ("give me an F! Give me an L!") or that "r" can be intermediate
> ("give me an R!")... That's about half of the letters of the alphabet
> that you might sometimes use "an" before!
>
> Any language that pronounces "ghoti" as "fish" is mixed up ;-)http://en.wikipedia.org/wiki/Ghoti

Well, you got me.

I was just under the assumption that, because this seems to be a
beginning matlab course, there wouldn't be the depth required to cover
ALL of the rules for using "an" versus "a". The general case seems to
be an appropriate way to demonstrate what the OP was asking for.

How easy is it for a beginning matlabber to create a program that can
understand the pronunciation of words to determine whether the article
"an" or "a" is to be used?

-Nathan
From: Walter Roberson on
Nathan wrote:

> How easy is it for a beginning matlabber to create a program that can
> understand the pronunciation of words to determine whether the article
> "an" or "a" is to be used?

Not easy at all. Many humans have difficulty in pronouncing English, as it is
so irregular.

The busses around here have automated announcements of the stop names, and
who-ever programmed them has some real lulus compared to the actual local
pronunciation. ;-)

I remember seeing one TV show several years ago in which a character was
taking a test to become a full detective, and was asked as part of the test,
"True or false: there are some parts of the country in which 'Marry', 'Mary',
and 'Merry' are all pronounced the same?". And the odd thing is, that when the
person asking the question pronounced the words, I knew exactly which of the
words he meant, even though the pronunciation of the three is nearly
indistinguishable around where I live.

"Proper" pronunciation depends upon context. "Portage" as a street name is
different from "Portage" as a city name is different for "portage" as a verb
or verbal noun, which is different from "portage" as a noun meaning freight...