Process annotated text
process_text( text, construct_delimiter, constituent_delimiter, subconstituent_delimiter, discontinued_constituent_delimiter_begin, discontinued_constituent_delimiter_end )
text | string |
---|---|
construct_delimiter | char |
constituent_delimiter | char |
subconstituent_delimiter | char |
discontinued_constituent_delimiter_begin | char |
discontinued_constituent_delimiter_end | char |
data.frame A data.frame with three columns: constituents, subconstituents and constructs
annotated_text <- paste0("Greece* {which* is* the* most* beau*ti*ful* coun*try*", " +I* know* +}was* the* first* place* +we* vi*si*ted* in*", "Eu*ro*pe* +.") counts_df <- process_text(annotated_text, "+", " ", "*", "{", "}")