search for: sentence_extract

Displaying 6 results from an estimated 6 matches for "sentence_extract".

2017 Jul 11
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...ontain only a single sentence, but many have several paragraphs. One concern I had was that, even if I could get my code working, it would be too inefficient to handle that volume of data. Thanks, Paul library(tidyverse) library(stringr) library(lubridate) sentence_match <- function(x){ sentence_extract <- str_extract_all(sampletxt, boundary("sentence"), simplify = TRUE) sentence_number <- intersect(str_which(sentence_extract, "breast"), str_which(sentence_extract, "metastatic|stage IV")) sentence_match <- str_c(sentence_number, ": ", sentence_e...
2017 Jul 13
1
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...ng, and then the numbering would be lost. If you were going to get the sentence numbers as well, without making several passes through the data like my code does, how would you go about it? Thanks, Paul library(tidyverse) library(stringr) library(lubridate) sentence_match <- function(x){ sentence_extract <- str_extract_all(x, boundary("sentence"), simplify = TRUE) sentence_number <- intersect(str_which(sentence_extract, "breast"), str_which(sentence_extract, "metastatic|stage IV")) sentence_match <- str_c(sentence_number, ": ", sentence_extract[s...
2017 Jul 12
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...everal paragraphs. One concern I had was that, even if I could get my code working, it would be too inefficient to handle that volume of data. > >Thanks, > >Paul > > >library(tidyverse) >library(stringr) >library(lubridate) > >sentence_match <- function(x){ > sentence_extract <- str_extract_all(sampletxt, boundary("sentence"), simplify = TRUE) > sentence_number <- intersect(str_which(sentence_ extract, "breast"), str_which(sentence_extract, "metastatic|stage IV")) > sentence_match <- str_c(sentence_number, ": ", s...
2017 Jul 12
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...everal paragraphs. One concern I had was that, even if I could get my code working, it would be too inefficient to handle that volume of data. > >Thanks, > >Paul > > >library(tidyverse) >library(stringr) >library(lubridate) > >sentence_match <- function(x){ > sentence_extract <- str_extract_all(sampletxt, boundary("sentence"), simplify = TRUE) > sentence_number <- intersect(str_which(sentence_ extract, "breast"), str_which(sentence_extract, "metastatic|stage IV")) > sentence_match <- str_c(sentence_number, ": ", s...
2017 Jul 11
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
.... One concern I had was that, even if I > could get my code working, it would be too inefficient to handle that > volume of data. > > Thanks, > > Paul > > > library(tidyverse) > library(stringr) > library(lubridate) > > sentence_match <- function(x){ > sentence_extract <- str_extract_all(sampletxt, boundary("sentence"), > simplify = TRUE) > sentence_number <- intersect(str_which(sentence_extract, "breast"), > str_which(sentence_extract, "metastatic|stage IV")) > sentence_match <- str_c(sentence_number, "...
2017 Jul 13
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
...ng, and then the numbering would be lost. If you were going to get the sentence numbers as well, without making several passes through the data like my code does, how would you go about it? Thanks, Paul library(tidyverse) library(stringr) library(lubridate) sentence_match <- function(x){ sentence_extract <- str_extract_all(x, boundary("sentence"), simplify = TRUE) sentence_number <- intersect(str_which(sentence_extract, "breast"), str_which(sentence_extract, "metastatic|stage IV")) sentence_match <- str_c(sentence_number, ": ", sentence_extract[s...