dependency

Purpose

Allows to specify syntactic relations between "term" arguments.

Syntax

dependency([deptype], [syntrel1], …​ [syntreln-1], term1 …​ termn)

Arguments

The function takes several arguments.

The optional deptype parameter describes the structure of syntactic dependencies.

deptype parameter value

Relations structure

bidirectional/bidir

term1 ↔ term2 ↔ term3

forward

term1 → term2 → term3

tree

term1 → term2
↓ term3

By default the deptype value is set to bidir.

The optional syntrel parameter allows to specify the type of syntactic relation between arguments.

Types of Syntactic Relations

Syntactic relation

syntrel parameter value

Description

subject

subject, sbj

Relation predicate→subject:

  • She will leave tomorrow.

  • Danny speaks Spanish fluently.

adverbial

adverbial, adv

Relation predicate→adverbial:

  • She will leave tomorrow.

  • Danny speaks Spanish fluently.

object

object, obj

Relation predicate→object:

  • I don’t know his phone number.

  • Don’t forget to call me.

modifier

modifier, mod

Relation subject→modifier, object→modifier:

  • Political news influence currency markets.

agent

agent

Relation predicate→agent:

  • The contract is signed by vice-president.

These are used the following way:

Query

Relation Structure

Example

dependency(forward, obj, mod, term1, term2, term3)

term1 → (obj) term2 → (mod) term3

sign important tender

correct previous mistakes

dependency(tree, mod, mod, term1, term2, term3)

term2 ← (mod) term1 → (mod) term3

definitive agreement on price,

American business magnate

Returned Value

Documents matching the query.

Examples

Here is a 4-document dataset:

#document

Text

0

The company’s board cancelled a previously announced agreement.

1

Company’s board expects to announce a definitive agreement on the sale this week.

2

The agreement was announced this week.

3

Company announced the termination of the agreement.

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

Query

Relations structure

Result

#document

Positions

dependency(announce, agreement)

announce→agreement or agreement→announce

0

The company’s board cancelled a previously announced agreement.

1

Company’s board expects to announce a definitive agreement on the sale this week.

2

The agreement was announced this week.

dependency(obj, announce, agreement)

announce→(obj)agreement or agreement→(obj)announce

1

Company’s board expects to announce a definitive agreement on the sale this week.

dependency(sbj, announce, agreement)

announce→(sbj)agreement or agreement→(sbj)announce

2

The agreement was announced this week.

dependency(tree, sbj, obj, announce, board, agreement)

announce → (sbj) board

(obj) agreement

1

Company’s board expects to announce a definitive agreement on the sale this week.

dependency(tree, sbj, obj, announce, company, agreement)

announce → (sbj) company

(obj) agreement

--------

--------

dependency(sentpart(object), sentpart(predicate))

object → predicate or predicate → object

0

The company’s board cancelled a previously announced agreement.

1

Company’s board expects to announce a definitive agreement on the sale this week.

2

Company announced the termination of the agreement.

dependency(forward, sentpart(object), sentpart(predicate))

object → predicate

--------

--------

dependency(forward, sentpart(predicate), sentpart(object))

predicate → object

0

The company’s board cancelled a previously announced agreement.

1

Company’s board expects to announce a definitive agreement on the sale this week.

3

Company announced the termination of the agreement.