sentpart

Purpose

Finds documents that contain arguments as part of sentence specified by function’s first parameter (subject, object, predicate, modifier, adverbial).

Syntax

sentpart(part_of_sentence[, term])

Arguments

Within the part_of_sentence parameter, the function supports the following parts of sentence:

Sentence Part

Description

Parameter Value

Predicate

Different categories of predicates:

  • Simple verbal predicate: He is going on holidays tomorrow.

  • Compound verbal predicate: They decided to discuss the question tomorrow.

  • Compound nominal predicate: He became an interpreter.

predicate

Subject

Subject

  • Danny speaks Spanish fluently.

subject

Object

Object (direct and indirect)

  • I don’t know his phone number.

object

Modifier

Different categories of modifiers:

  • currency markets;

  • political news;

  • the house of my parents;

  • genetically modified food.

modifier

Adverbial

Adverbial (adverbials of time, place, manner, etc.):

  • She will leave tomorrow.

  • He is going on holidays.

  • Danny speaks Spanish fluently.

adverbial

Agent

Agent

  • The contract is signed by vice-president.

agent

Several syntactic roles may be specified by a vertical bar ("|") character. When the term arguments are omitted, the function matches all specified parts of sentence.

Returned Value

Documents, matching the query.

Examples

Here is a 2-document dataset:

#document

Text

0

The company won a prestigious contract.

1

The contract was signed by company’s vice-president last week.

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

Query

Result

#document

Positions

sentpart(object, contract)

0

The company won a prestigious contract.

sentpart(subject, contract)

1

The contract was signed by company’s vice-president last week.

sentpart(subject)

0

The company won a prestigious contract.

1

The contract was signed by company’s vice-president last week.

sentpart(predicate)

0

The company won a prestigious contract.

1

The contract was signed by company’s vice-president last week.

sentpart(modifier)

0

The company won a prestigious contract.

1

The contract was signed by company’s vice-president last week.

sentpart(subject|object)

0

The company won a prestigious contract.

1

The contract was signed by company’s vice-president last week.