Extraction of the Negative sentences so that normal findings can be removed and not counted when searching for true diseases. eg remove No evidence of candidal infection so it doesn't get included if looking for candidal infections. It should be used after the Extractor and the optional NewLines has been used. It can be used as part of the other functions or as a way of providing a 'positive diagnosis only' type output (see HistolDx)
NegativeRemove(dataframe, Column)
dataframe | dataframe with column of interest |
---|---|
Column | column of interest |
# Build a character vector and then # incorporate into a dataframe anexample<-c("There is no evidence of polyp here", "Although the prep was poor,there was no adenoma found", "The colon was basically inflammed, but no polyp was seen", "The Barrett's segment was not biopsied", "The C0M7 stretch of Barrett's was flat") anexample<-data.frame(anexample) names(anexample)<-"Thecol" # Run the function on the dataframe and it should get rid of sentences (and # parts of sentences) with negative parts in them. hh<-NegativeRemove(anexample,"Thecol")