anaphora

Purpose

Finds words and phrases that refer to the same contextual entity (are in the anaphoric relationship), for example a noun and a pronoun that refers back to this noun like in the sentence "John fed his dog" "his" refers to "John". They are found within several consecutive sentences.

Syntax

anaphora(term1[, term2, …]​)

Arguments

Takes one or more arguments, which can be any word or phrase or sequence of tokens. The function may take as an argument any other PDL functions (e.g. lemma(), phrase(), etc.)

Returned Value

Documents matching the query.

Examples

#document

Text

1

"A girl fed her big black cat."

2

"John and his elder brother went to the cinema. They watched an interesting film."

3

"I do not like the girl that I met yesterday."

4

"In connection with the closing of the Company’s initial public offering, the Company terminated its status as an S Corporation."

5

"Mary and John"

The following table represents the returned values (see Result) for the example queries (see Query):

Query

#document

Result

anaphora(girl)

1

girl, her

anaphora(girl)

3

girl, that

anaphora(her)

1

a girl, her

anaphora(John)

2

John, his

anaphora(his)

2

John, his

anaphora(they)

2

John and his elder brother, they

anaphora(that)

3

the girl, that

anaphora(company)

4

Company’s, Company, its

anaphora(its)

4

Company’s, Company, its

anaphora(and)

2,5

and

anaphora(Mary)

5

Mary

anaphora(phrase(lemma(adjective), lemma(noun)))

0

black cat

anaphora(phrase(lemma(adjective), lemma(noun)))

1

interesting film

anaphora(phrase(lemma(adjective), lemma(noun)))

3

public offering

anaphora(phrase(6, in, closing))

3

in closing

Results returned by the function may differ depending on the type of the argument. See the text 3: * the query anaphora(girl) returns the noun girl, which is the input argument, and the pronoun her. * the query anaphora(her) returns the pronoun her, which is the input argument, and the noun phrase the girl.

So if the input argument is a part of a referenced phrase, only this argument is found, not the whole phrase.