relative pronoun "which" is used as it refers to "the government building" which serves as the object of the predicate "visited" in the attributive clause.
Compare another three sentences:
a. The date when I arrived was the 5th August.
b. The date which/ that he told me was the 5th August.
c. The date on which I arrived was the 5th August.
In sentence a), a relative adverb "when" is used because it refers to "on that date" which serves as the adverbial in the attributive clause. "in which" can also be used as in sentence c) because it also means "on that date" in the attributive clause. While in sentence b), a relative pronoun "which" is used as it refers to "the date" serving as the object of the predicate "told" in the attributive clause.
Read the following sentence and find out
a. The reason why I got a job was because of my hard work.
b. The reason that/ which he gave for getting the job was because of his hard work.
c. The reason for which I got a job was because of my hard work.
In sentence a), a relative adverb "why" is used because it refers to "for this reason" which serves as the adverbial in the attributive clause. "for which" can also be used as in sentence c) because it also means "for this reason" in the attributive clause. While in sentence b), a relative pronoun "which/that" is used as it refers to "the reason" serving as the object of the predicate "gave" in the attributive clause.
III. Ready used materials for attributive clause
Definitions: Attributive clause: An attributive clause is a clause modifying a noun or pronoun in a compound sentence.
Antecedent: The word being modified by an attributive clause is called the antecedent.
Relative: The word that is used to introduce an attributive clause is called a relative. There are two kinds of relatives, i.e. relative pronouns including which, that, who, whom, whose, as, etc. and relative adverbs including where, when and why, etc.
Note: Relatives plays three important roles in an attributive clause, i.e. introducing an attributive clause, replacing the antecedent in meaning, and functioning as a sentence element in the attributive clause.
e.g.: The girl who is talking to Mr. Li over there is my sister.
In the sentence, The girl is the antecedent and who is used to introduce the attributive clause as the antecedent is a person. It (who) refers to the girl and functions as the subject in the attributive clause.
The choice of the relatives is the most difficult in learning the attributive clause. However, there are some rules that can help us choose the correct relatives. Usually, which relative to choose depends on what the antecedent is and what sentence element the relative functions in the attributive clause as shown in the following chart:
Antecedent Relative Sentence element people who that subject object whom object things which that subject object time which that subject object when prep.+ which adverbial place which that subject object where prep.+ which adverbial