How to tell which word a prepositional phrase is modifying?
Solution 1:
"about the grade" complementizes the adjective "happy". The preposition will accompany the adjective in questions and relative clauses, which shows their syntactic and semantic closeness:
- What are you happy about?
- I want to tell you about something I'm very happy about.
"in biology" does modify the verb "received" rather than the noun "grade".
The presence of the relative clause leads to the use of the definite article before "grade", and therefore the actual grade (or mark) the person got is not specified.
Let's imagine we have this sentence:
- I received a high grade in biology.
The question that elicits the answer "in biology" would be "where" or "in what subject" rather than "what type of grade" or "which grade", as you say:
- Where / In what subject did you get a high grade?
- In biology.
This shows that "in biology" is an adverbial of (figurative) place modifying the verb "received", and not a prepositional phrase modifying the noun "grade".
If instead of "grade" we had the noun "degree", then both parsings would be possible, with "in biology" forming part of the noun phrase "degree in biology" (with "in biology" modifying the noun "degree") or designating as an adverbial the area in which the person got a degree:
- I got a degree in biology.
The mentioned parsings would become mutually exclusive if a relative clause led the speaker or the writer to keep the noun phrase as a unit (in which case "in biology" would postmodify the noun):
- I'm happy about the degree in biology I obtained.
or to separate them (in which case "in biology" would modify the verb):
- I'm happy about the degree I obtained in biology.