sentence_eval: Evaluate One Sentence

Description Usage Arguments Value

View source: R/search.R

Description

Assesses if one sentence matches the search query and marks positive tokens/concept unique identifiers (CUI's).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
sentence_eval(
  unique_id,
  unique_sentences,
  annotations,
  query_vect,
  keyword_mask,
  keyword_elements,
  cui_mask,
  cui_elements,
  use_negation
)

Arguments

unique_id

Sentence ID, i.e. row number in annotations dataframe.

unique_sentences

Dataframe of unique sentences for the patient.

annotations

NLP annotation dataframe.

query_vect

Vector of search query components.

keyword_mask

Query vector with only keywords.

keyword_elements

Vector of search query keywords.

cui_mask

Query vector with only CUI's.

cui_elements

Vector of search query CUI's.

use_negation

Should negated items be ignored in the keyword/concept search?

Value

If sentence matches query, returns sentences with marked tokens/CUI's, otherwise NA.


CEDARS documentation built on Feb. 7, 2021, 5:06 p.m.