sAttributes-method: Get s-attributes.

Description Usage Arguments Value Examples

Description

Structural annotations (s-attributes) of a corpus provide metainformation for ranges of text. Importing XML into the Corpus Workbench (CWB) turns elements and element attributes into s-attributes. There are two uses of the sAttributes-method: If the sAttribute parameter is NULL (default), the return value is a character vector with all s-attributes. If sAttribute is the name of a specific s-attribute (i.e. a length 1 character vector), the respective s-attributes available in the corpus are returned.

Usage

1
2
3
4
5
6
## S4 method for signature 'character'
sAttributes(.Object, sAttribute = NULL, unique = TRUE,
  regex = NULL)

## S4 method for signature 'partition'
sAttributes(.Object, sAttribute = NULL)

Arguments

.Object

either a partition or a character vector specifying a CWB corpus

sAttribute

name of a specific s-attribute

unique

logical, whether to return unique values only

regex

filter return value by applying a regex

Value

a character vector

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  use("polmineR.sampleCorpus")
  
  sAttributes("PLPRBTTXT")
  sAttributes("PLPRBTTXT", "text_date") # dates of plenary meetings
  
  P <- partition("PLPRBTTXT", text_date = "2009-11-10")
  sAttributes(P)
  sAttributes(P, "text_name") # get names of speakers

## End(Not run)

nrauscher/corpus documentation built on May 23, 2019, 9:34 p.m.