Skip to contents

Sample Data

Sample data for networds examples and for function params

ex_prince
The Prince by Niccolò Machiavelli
g
A sample graph dataframe (tbl-graph)
layouts
layouts available to plot networks
text_sample
A Text Sample
txt_wiki
A Text Sample from wikipedia

Preparing the data

filter_by_query()
Tokenize and filter text by a query
filter_graph()
Filter both nodes at the same time
tblgraph_to_tbl()
Transform a tbl_graph into a labeled tibble
tokenize_by_words()
Tokenize words
txt_subst()
Make compound words into a single word

Extract graph

extract cooccurrence of (almost) all words

cooccur_words()
Get co-occurrence of all words from pure text

Extracting graphs using regex

connectors()
A lowercase connectors between two proper names
connectors_list
list of proper names connectors
extract_entities2()
extract_entity for each sentence
extract_entity_rb()
A rule based entity extractor
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_rb()
rule based entity graph extractor
extract_graph_rgx()
extract a graph from text, using custom regex pattern as nodes.
extract_relation()
tokenize and selects only sentences/paragraphs with more than one entity per sentence or paragraph
get_graph_from_txt()
Graph from text and query
subs_ppn()
Substitute proper names/entities spaces with underscore in the text.

Extracting graphs with Part of Speech Tagging (POS)

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

Analize graphs

count_graphs()
Count the graph frequency of co-occurences/Co-mentioning of triplets
count_vec()
count a vector of elements
extract_nodes()
Extract nodes from a dataframe of two columns of nodes
extract_triplets()
from semgram output, join passive and active voices
filter_ego()
Filter a graph / create an ego graph
filter_graph_g()
Filter both nodes at same time using grep
filter_nodes()
filter nodes in both columns, at the same time
freq_nodes()
extract the frequency of nodes in a text
get_neighbors()
Get the neighbors of a node
get_neighbors_df()
Get the neighbors of a word in a dataframe
get_node_id()
Search for the id of a node in a tbl_graph
graph_subs()
graph substitution
reduce_freq()
Set a maximum value to the frequency of pairs
rename_cols()
rename cols from dplyr::count
scale_to_range()
Change the vector min and max values proportionally
split_graph()
split a tidy graph into a list of dataframe

visualize graphs

visualize static and dynamic graphs

net_wordcloud()
plot net wordcloud
plot_graph()
Plot simple graph
plot_graph2()
weighted word graph viz
plot_graph_i()
viz graph interactively
plot_pos_graph()
plot static graph from POS list
q_plot()
quick word graph
viz_triplets_i()
viz graph interactively