CreateQuery: Create a query vector.

Description Usage Arguments Examples

Description

This function creates a vector with weights from the given querywords and term-document matrix.

Usage

1
2
CreateQuery(qtext, terms, stemming = TRUE, language = "german", FUN = NA,
  max.distance = 0, ...)

Arguments

qtext,

query-words (keywords) as string or vector with strings

terms,

terms from a term-document matrix as vector with strings

stemming,

determines if stemming should be applied to given keywords

language,

language used for text stemming

FUN,

function to apply weights to each term depending on the keywords

max.distance,

maximum Levenshtein distance between a keyword and term

...,

other parameters inquired as by the function

Examples

1
2
3
4
createQuery("term", c("vector", "with", "terms"))
createQuery("term", c("vector", "with", "terms"), max.distance=1, partial=F)
createQuery("term", c("vector", "with", "terms"),
            FUN=function(x, y) rep(1, length(y)))

joshua-heipel/tmbQuery documentation built on May 8, 2019, 3:47 p.m.