Created
December 27, 2019 22:55
-
-
Save PolMine/76bbf7623e60bb19cde9658a8096c1d3 to your computer and use it in GitHub Desktop.
Get phrases using pointwise mutual information
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(polmineR) | |
use("GermaParl") | |
stopwords <- unname(unlist( | |
noise( | |
terms("GERMAPARL", p_attribute = "word"), | |
stopwordsLanguage = "en" | |
) | |
)) | |
r <- Cooccurrences( | |
.Object = "GERMAPARL", p_attribute = "word", | |
left = 0L, right = 1L, stoplist = stopwords | |
) | |
decode(r) | |
pmi(r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment