Skip to contents

Sample Data

Sample data for networds examples

g
A sample graph dataframe (tbl-graph)
txt_wiki
A Text Sample from wikipedia
text_sample
A Text Sample

Preparing the data

filter_by_query()
tokenize and filter text by query

Extract graph

Extracting graphs using regex

connectors()
A lowercase connectors between two proper names
extract_entity()
A rule based entity extractor extracts the entity from a text using regex. This regex captures all uppercase words, words that begin with upper case. If there is sequence of this patterns together, this function also captures. In the case of proper names with common lower case connectors like "Wwwww of Wwwww" this function also captures the connector and the subsequent uppercase words.
extract_entities2()
extract_entity for each sentence
subs_ppn()
Substitute proper names/entities spaces with underscore in the text.
extract_relation()
tokenize and selects only sentences/paragraphs with more than one entity per sentence or paragraph
extract_graph()
Extract a non directional graph based on co-occurrence in the token. It extracts only if two entities are mentioned in the same token (sentence or paragraph)
extract_graph_df()
Extract a non directional graph based on co-occurrence in the token and returns a tibble It extracts only if two entities are mentioned in the same token (sentence or paragraph)
extract_graph_rgx()
extract a graph from text, using custom regex pattern as nodes.
get_graph_from_txt()
graph from text and query

Extracting graphs from pure text

get_cooc_entities()
get graph (co-ocurrence of entities)
parsePOS()
parse tokenized text into POS
extract_entities()
extract entities from POS
extract_entities_v()
extract entities
extract_entities_l()
Extract entities in list format, by sentence
get_entities()
get entities from POS DF
extract_graph_pos()
extract graph of co-ocurrence from a POS dataframe
group_seq_pos()
collapse sequence of repeated POS into a single one
collapse_adp()
Collapse ADP
filter_ppn()
extract proper name and nouns from POS DF
get_cooc()
get graph (co-ocurrence of entities and Nouns)
group_ppn()
Group a POS of proper names
group_entities()
Group a sequence of entities in a POS dataframe
graph_from_coocurrence_list()
Graph from co-occurrence list
entity_list_2_graph()
from a vector of entities (generated by extract_entities2) returns a tibble/dataframe with co-occurence pairs
entity_list_2_graph2()
from a list of entities (generated by extract_entities2) returns a tibble/dataframe with co-occurence pairs

Analize graphs

get_node_id()
Search for the id of a node in a graph
get_neighbors()
Get the neighbors of a site
extract_nodes()
extract nodes from a dataframe of two columns of nodes'
count_graphs()
Count the graph frequency of co-occurences/Co-mentioning of triplets
count_vec()
count a vector of elements
filter_ego()
Filter a graph / create an ego graph
split_graph()
split a tidy graph (each line is graph with at least 2 nodes) into two dataframes within a list: one with de nodes and its indexes, a second dataframe with de edges.
rename_cols()
rename cols from count rename cols froum count to use with other functions, renaming to "from", "to" and "value" for n (frequency.)'
extract_triplets()
from semgram output, join passive and active voices # VER great..../GR_analise
graph_subs()
Substitute node columns (columns 1 and 2) of a graph data frame with a dictionary of substitutions.

visualize graphs

visualize static and dynamic graphs

q_plot()
quick word graph
net_wordcloud()
plot net wordcloud
plot_pos_graph()
plot static graph from POS list
plot_graph2()
weighted word graph viz
interactive_graph()
viz graph interactively