Skip to content

Instantly share code, notes, and snippets.

@PolMine
Last active March 25, 2017 07:04
Show Gist options
  • Save PolMine/69f17c03d7f783859a15cfc0d938812f to your computer and use it in GitHub Desktop.
Save PolMine/69f17c03d7f783859a15cfc0d938812f to your computer and use it in GitHub Desktop.
polmineR: Quick start
The recent stable version of the package (v0.7.2) is available at CRAN:
https://cran.r-project.org/web/packages/polmineR/index.html
This is also where the new vignette / documentation can be looked at:
https://cran.r-project.org/web/packages/polmineR/vignettes/vignette.html
The package can be installed with the conventional package installation mechanism (from R):
```{r}
install.packages("polmineR")
```
To interface to a CWB indexed corpus, users will also need the package 'rcqp'. Installation instructions are included in the vignette. To compile the package oneself, users need the glib and pcre libraries to be present. Binaries for Mac and Windows can be downloaded from my server:
```{r}
install.packages("rcqp", repos = "http://polmine.sowi.uni-due.de/packages")
```
A more experimental interface that will also work on a 64 bit Windows system (rcqp does not) can be downloaded from GitHub.
```
devtools::install_github("PolMine/polmineR")
```
Finally, a corpus to work with. I put the English version of the Europarl corpus into a package which can be installed as follows:
```
library(polmineR)
install.corpus("europarl-en", repo = "http://polmine.sowi.uni-due.de/packages")
```
A more experimental interface that will also work on a 64 bit Windows system (rcqp does not) can be downloaded from GitHub. However, an installation of the Corpus Workbench is needed. Installation and binary files for Linux, Windows and 32 bit Windows are available [here](http://cwb.sourceforge.net/beta.php). A cross-compiled version can be downloaded from: http://polmine.sowi.uni-due.de/public/CWB/. Then:
```
install.packages("devtools")
devtools::install_github("PolMine/polmineR")
```
Finally, a corpus to work with. I put the English version of the Europarl corpus into a package which can be installed as follows:
```{r}
library(polmineR)
install.corpus("europarl-en", repo = "http://polmine.sowi.uni-due.de/packages")
```
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment