In the sentences below, “bill” and “hill” are both nouns.
- He ran up a big hill.
- He ran up a big bill.
Can someone explain how one distinguishes whether “up” is a preposition or a part of a phrasal verb?
In a word, context.
The simplest way would be to initially assume it's not a phrasal verb, then ask yourself, "Does the sentence make sense?"
Another trick might be to replace the main part of the verb with a synonym, and see if there is any change or loss of meaning. (If there is a shift in meaning, there's a good chance you're dealing with a phrasal verb.)
As your examples show, however, unless you're already familiar with the phrasal verb, there's no way to automatically detect it just from glancing at the sentence.
Thanks to James McCawley's Syntactic Phenomena of English, Here's a reasonably simple way of distinguishing verb+preposition (run up the hill) from phrasal verb (run up a big bill).
You don't need to know all the technical terms to "transform" OP's two examples into answers to the question "What did he run up"...
Obviously this technique is only bulletproof for native speakers. I doubt there's anything that simple for non-native speakers - by their very nature, phrasal verbs are "idiomatic" usages that you just have to learn.
This whole area - verb + (word at least looking like a preposition or adverb) - is very tricky, and plagued by conflicting terminologies. I believe the two key issues are:
(1) the degree of 'cohesion' between the verb-word and the preposition / adverb / particle.
(2) whether the verb-word retains the meaning it has without the addition of the particle / whatever.
With the sentence He ran up a big hill, ran (run) retains its usual, core meaning. J.R.'s second (synonym) test above illustrates this nicely. However, I would suggest that in 'he ran up a big hill' there is more cohesion between ran and up than in 'he ran up in the Simien Mountains before coming to the UK'. Last week he ran - up a big hill! just about works, but Way before he came to the UK he ran - up in the Simien Mountains! sounds fine.
On the other hand, with He ran up a big bill ran (run) does not retain its usual core meaning. This expression does not refer to quickish physical human movement. In fact, 'run up' rather than 'run' now has single-word near-synonyms: amass, accumulate; incur (Collins): it is perhaps best described as a multi-word verb. There is strong cohesion between 'run' and 'up'; if we really need terms to describe the orthographic words, the one obviously not the base verb is usually referred to as a 'particle' or 'adverbial particle'. This cohesion is illustrated by the fact that we can't treat the phrase including the particle as a parenthesis: *He ran - up a big bill.
This "Can we insert a dash?" test is quite powerful. However, here we have a near-prototypical preposition in one example (He ran up a big hill), and verb-preposition cohesion is far weaker than preposition-prepositional complement cohesion. One could also test by switching to an alternative (but appropriate) preposition: He ran down a big hill. Contrast *He ran down a big bill.
But with some metaphorical usages, there seems to be intermediate verb-whatsit cohesion:
He's gone after the man who scratched his car.
?He's gone - after the man who scratched his car.