Skip to content

Relative clauses

Mika Hämäläinen edited this page Aug 11, 2020 · 4 revisions

Relative clauses

A verb phrase can be added to a noun phrase as a relative clause by add_relative_clause_to_np(np, realtivep, case=None, subject=False)

  1. Antecedent as an object: "Poika, jolle annoin kirjan" or "Poika, jonka näin". These kinds of constructions can be formed when the case parameter is None and subject parameter is False. The antecedent will receive the first free syntactic role in the VP's component list. These positions are tried to fill in this order "dir_object", "indir_object", "predicative".

  2. Antecedent as a subject: "Poika, joka juoksi kouluun". The antecedent will be the subject of the relative clause if subject parameter is set to True.

  3. Antecedent as an adverbial: "Navetta, jossa lehmä asuu". This kind of a relative clause can be created by setting the case variable. This will define the case of the relative pronoun.

An example of building a relative clause:

np1 = create_phrase("NP", "mies")
relp = create_verb_pharse("katsoa")
ppp = create_phrase("NP", "orava")
relpp = create_verb_pharse("vaania")
relpp.components["subject"] = create_phrase("NP", "kissa")
add_relative_clause_to_np(ppp, relpp)

relp.components["subject"] = ppp
add_relative_clause_to_np(np1,relp)

vep = create_verb_pharse("juosta")
vep.components["subject"] = np1

np2 = create_phrase("NP", "silta")

pp = create_adposition_phrase("alla", np2)

add_advlp_to_vp(vep, pp)


print(vep)

>> mies, jota orava, jota kissa vaanii, katsoo, juoksee sillan alla
Clone this wiki locally