sentenceParse: Parse text into sentences

Description Usage Arguments Value Examples

View source: R/sentenceParse.R

Description

Parse the elements of a character vector into a dataframe of sentences with additional identifiers.

Usage

1
sentenceParse(text, docId = "create")

Arguments

text

Character vector to be parsed into sentences

docId

A vector of document IDs with length equal to the length of text. If docId == "create" then doc IDs will be created as an index from 1 to n, where n is the length of text.

Value

A data frame with 3 columns and n rows, where n is the number of sentences found by the routine. Column 1: docId document id for the sentence. Column 2: sentenceId sentence id for the sentence. Column 3: sentence the sentences found in the routine.

Examples

1
2
3
sentenceParse("Bill is trying to earn a Ph.D.", "You have to have a 5.0 GPA.")
sentenceParse(c("Bill is trying to earn a Ph.D.", "You have to have a 5.0 GPA."),
               docId=c("d1","d2"))

AdamSpannbauer/lexRankr documentation built on Feb. 4, 2018, 12:12 p.m.