get_sentence_window_indices: Wrapper for convenient argument passing

View source: R/sentence_functions.R

get_sentence_window_indicesR Documentation

Wrapper for convenient argument passing

Description

Important: "silent" argument: 'sentences' in the Python process, created by 'tokenize_sentences_wrapper()'

Usage

get_sentence_window_indices(
  filter_pattern,
  window,
  case_sensitive = FALSE,
  indices_included = NULL,
  py_var_name = "filtered_indices"
)

Arguments

filter_pattern

Chr. around which pattern extract sentences?

window

How many sentences to each side of 'filter_pattern' to extract?

search_pattern

Which pattern to search within extracted sentences?

r_indexing

Add 1 to python zero indexing to achieve equivalent indexing in R?

Value

R integer vector with (Python zero style) indices for the documents that have 'search_pattern' in 'window' sentence proximity to 'filter_pattern'.


kgjerde/cxsentences documentation built on June 13, 2025, 2:38 p.m.