Skip to contents

Takes a list containing at least two tables of n-grams and frequencies (either output of `fst_freq_table()` or `fst_ngrams_table()`) and finds n-grams unique to one table.

Usage

fst_get_unique_ngrams(list_of_top_ngrams)

Arguments

list_of_top_ngrams

A list of top ngrams

Value

Dataframe of words and whether word is unique or not.

Examples

top_child <- fst_freq_table(fst_child)
#> Note:
#>  Words with equal occurrence are presented in alphabetical order. 
#>  By default, words are presented in order to the `number` cutoff word. 
#>  This means that equally-occurring later-alphabetically words beyond the cutoff word will not be displayed.
#> 
top_dev <- fst_freq_table(fst_dev_coop)
#> Note:
#>  Words with equal occurrence are presented in alphabetical order. 
#>  By default, words are presented in order to the `number` cutoff word. 
#>  This means that equally-occurring later-alphabetically words beyond the cutoff word will not be displayed.
#> 
list_of_top_words <- list()
list_of_top_words <- append(list_of_top_words, list(top_child))
list_of_top_words <- append(list_of_top_words, list(top_dev))
fst_get_unique_ngrams(list_of_top_words)
#> # A tibble: 20 × 2
#>    words          word_type
#>    <fct>          <chr>    
#>  1 jokin          Unique   
#>  2 tulla          Unique   
#>  3 tietää         Unique   
#>  4 sanoa          Unique   
#>  5 tehdä          Unique   
#>  6 paha           Unique   
#>  7 joku           Unique   
#>  8 lyöminen       Unique   
#>  9 lyödä          Unique   
#> 10 toinen         Unique   
#> 11 nälkä          Unique   
#> 12 ahneus         Unique   
#> 13 epätasa-arvo   Unique   
#> 14 vesi           Unique   
#> 15 ihminen        Unique   
#> 16 puute          Unique   
#> 17 ilmastonmuutos Unique   
#> 18 sota           Unique   
#> 19 nälänhätä      Unique   
#> 20 köyhyys        Unique