corpusFromGraph {VOSONDash} | R Documentation |
Create a text corpus from graph text attribute data
Description
This function creates a text corpus from node or edge text attribute data in an igraph.
Usage
corpusFromGraph(
g = NULL,
txt_attr = NULL,
type = "vertex",
iconv = FALSE,
html_decode = TRUE,
rm_url = TRUE,
rm_num = TRUE,
rm_punct = TRUE,
rm_twit_hashtags = FALSE,
rm_twit_users = FALSE,
sw_kind = "SMART",
rm_words = NULL,
stem = FALSE
)
Arguments
g |
an igraph graph object. |
txt_attr |
Character string. Name of graph text attribute. Default is |
type |
Character string. Graph attribute type. Default is |
iconv |
Logical. Use the |
html_decode |
Logical. HTML decode text. Default is |
rm_url |
Logical. Remove URL's. Default is |
rm_num |
Logical. Remove numbers. Default is |
rm_punct |
Logical. Remove punctuation. Default is |
rm_twit_hashtags |
Logical. Remove twitter hashtags. Default is |
rm_twit_users |
Logical. Remove twitter user names. Default is |
sw_kind |
Character string. Stopword dictionary. Refer |
rm_words |
Character vector. User defined stopwords. Default is |
stem |
Logical. Apply word stemming. Default is |
Value
A tm text corpus object.