hits: Get Hits.

Description Usage Arguments Slots

Description

Get hits for a (set of) queries, optionally with s-attribute values. If the query character vector is named, the names of the query occurr in the data.table that is returned rather than the queries.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
hits(.Object, ...)

## S4 method for signature 'character'
hits(.Object, query, cqp = FALSE, sAttribute = NULL,
  pAttribute = "word", size = FALSE, freq = FALSE, mc = FALSE,
  verbose = TRUE, progress = TRUE)

## S4 method for signature 'partition'
hits(.Object, query, cqp = FALSE, sAttribute = NULL,
  pAttribute = "word", size = FALSE, freq = FALSE, mc = FALSE,
  progress = FALSE, verbose = TRUE)

## S4 method for signature 'partitionBundle'
hits(.Object, query,
  pAttribute = getOption("polmineR.pAttribute"), size = TRUE,
  freq = FALSE, mc = getOption("polmineR.mc"), progress = FALSE,
  verbose = TRUE)

## S4 method for signature 'hits'
sample(x, size)

Arguments

.Object

a character, partition or partitionBundle object

...

further parameters

query

a (optionally named) character vector with one or more queries

cqp

either logical (TRUE if query is a CQP query), or a function to check whether query is a CQP query or not

sAttribute

s-attributes

pAttribute

p-attribute (will be passed into cpos)

size

logical - return size of subcorpus

freq

locial - return relative frequencies

mc

logical, whether to use multicore

verbose

logical

progress

logical, whether to show progress bar

x

a hits object

Slots

dt

a "data.table"

corpus

a "character" vector

query

Object of class "character"


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