# install.packages("tidyverse") library(tidyverse) #install.packages("childesr") library(childesr) #devtools::install_github("VerbalExpressions/RVerbalExpressions") library(RVerbalExpressions) # Import Manchester Corpus (input only) tokens = get_utterances(corpus = "Manchester", role_exclude="target_child") head(tokens) IsQs=as.data.frame(tokens[grep("^is.*ing\\s", tokens$gloss, ignore.case = T),]) #Starts with is, then any number of characters, then -ing, then a space IsQs$gloss IsThe=as.data.frame(tokens[grep("^is\\s.*the\\s.*ing\\s", tokens$gloss, ignore.case = T),]) #is the X Ying IsThe$gloss NPthat=as.data.frame(tokens[grep("the\\s.*that('s|\\sis)\\s.*ing\\s", tokens$gloss, ignore.case = T),]) #The x that's (or that is) Ying NPthat$gloss NPwho=as.data.frame(tokens[grep("the\\s.*who('s|\\sis)\\s.*ing\\s", tokens$gloss, ignore.case = T),]) #The x who's (or who is) Ying NPwho$gloss