Semantic or pragmatic ambiguity?

Solution 1:

This is an example of Indirectness in illocution. In particular, the question

  • Do you want a cup of coffee?

can be used as an indirect offer, rather than (or perhaps regardless of) its informational request sense. Indirectness is pragmatic. That is, it has to do with illocution.

But it's relative; all language is symbolic, and therefore not direct; some might call it duplicitous, in fact. That is, by contrast with placing a cup of coffee before the addressee, saying anything counts as indirectness. So one must compare the prototype illocutionary force of a construction (usually to assert, to question, or to direct) with its actual effect in context.

There are special conventions for how to do this in English (as in any language). Most of them spring from Grice's Maxims.

Solution 2:

According to the book you linked to, the answer is that it's not ambiguous.

Do you want a cup of coffee?

That sentence asks a simple question, and will elicit the answer "Yes" or "No", depending on whether the person asked wants one or not. The sentence is not semantically ambiguous.

The book you cite, Foundations of Computational Linguistics, says

A pragmatic ambiguity consists in alternative uses of one meaning relative to a given context ... a pragmatic ambiguity by its very nature cannot be disambiguated by the context.

There is no information in your question about the context of the question, but it seems to me that it should be quite clear from the circumstances of the question whether the speaker is offering to make a coffee or not. Because the question can be disambiguated by the context, it is not pragmatically ambiguous either.

The book itself gives an example of a pragmatically ambiguous utterance: telling someone to "Put the book on the table" when there is a choice of two identical tables. If the correct table cannot be determined from the context, the instruction is pragmatically ambiguous.