Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.4%) to scientific vocabulary
Repository
R package for stylometric analyses
Basic Info
- Host: GitHub
- Owner: computationalstylistics
- Language: R
- Default Branch: master
- Size: 3.35 MB
Statistics
- Stars: 195
- Watchers: 28
- Forks: 46
- Open Issues: 19
- Releases: 0
Metadata Files
README.md
stylo: R package for stylometric analyses
Authors: Maciej Eder, Mike Kestemont, Jan Rybicki, Steffen Pielström
*License:** GPL-3
This package provides a number of functions, supplemented by a GUI, to perform various analyses in the field of computational stylistics, authorship attribution, etc.
Refer to the Computational Stylistics Group webpage, especially the subpage Projects, to get some ideas about possible applications of the package stylo.
Citation
If you find the package stylo useful and plan to publish your results, please consider citing the following paper:
Eder, M., Rybicki, J. and Kestemont, M. (2016). Stylometry with R: a package for computational text analysis. R Journal, 8(1): 107-21. https://journal.r-project.org/archive/2016/RJ-2016-007/index.html
Installation
There are four ways of installing stylo:
- from CRAN repository
- from the GitHub repository, via the package
devtools - from a locally downloaded file
- building the package directly from source files
1. Installing from CRAN repository
This is the simplest way to install stylo (as well as any other R package). Launch R, make sure you are connected to the internet, type:
install.packages("stylo")
choose your favorite CRAN mirror (a window will usually pop up), click OK.
If you are a MacOS user, please have a look below, at the Installation issues section.
2. Installing from the GitHub repository
A convenient way to install R packages directly from the GitHub repository is to use the package devtools. Unless you have already installed it, you should do it now:
install.packages("devtools")
Then, install the package stylo:
library(devtools)
install_github("computationalstylistics/stylo")
The remarks about possible issues on MacOS apply are valid also in this case.
3. Installing from a local file
This is an option for more advanced users. You need to obtain a so-called tarball file, which is a compressed version of the package (you can grab it from CRAN). It might be named stylo_0.7.4.tar.gz, depending of the current version of course. Then type in R console:
setwd("I/hope/I/can/remember/where/I/have/put/the/zipfile/")
install.packages("stylo_0.7.4.tar.gz", repos = NULL, type = "source")
4. Building a package from source files
This is something for real geeks. Clone this very repository, unpack it, and type the following lines at the command prompt:
R CMD build stylo
R CMD INSTALL stylo
Installation issues
NOTE (Mac OS users): the package stylo requires X11 support being installed. To quote "R for Mac OS X FAQ" (http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html): “Each binary distribution of R available through CRAN is build to use the X11 implementation of Tcl/Tk. Of course a X windows server has to be started first: this should happen automatically on OS X, provided it has been installed (it needs a separate install on Mountain Lion or later). The first time things are done in the X server there can be a long delay whilst a font cache is constructed; starting the server can take several seconds.”
You might also run into encoding errors when you start up R (e.g. “WARNING: You're using a non-UTF8 locale” etc.). In that case, you should close R, open a new window in Applications > Terminal and execute the following line:
defaults write org.R-project.R force.LANG en_US.UTF-8
Next, close the Terminal and start up R again.
ANOTHER NOTE A slightly different workaround of the above problem (Mac users again):
- Install XQuartz, restart Mac
- Open Terminal, type:
sudo ln -s /opt/X11 /usr/X11 - Run XQuartz
- Run R, type:
system('defaults write org.R-project.R force.LANG en_US.UTF-8')
YET ANOTHER NOTE On MacOS Mojave one usually faces the problem of not properly recognized tcltk support. Open your terminal and type the following command:
xcode-select --install
This will download and install xcode developer tools and fix the problem. The problem is that one needs to explicitly agree to the license agreement.
Usage
This section is meant to give the users a general outline of what the package can do, rather than providing a comprehensive description of designing a stylometric test using the R package stylo. Refer to the following documents:
- for (real) beginners: a crush introduction in the form of a slideshow
- for (sort of) beginners: a concise HOWTO
- for advanced users: a paper in R Journal
- full documentation at CRAN
Materials on Youtube
- Introduction to the package ‘stylo’: first steps
- Introduction to the package ‘stylo’: installation
- Introduction to the package ‘stylo’: basic parameters
Docs on non-obvious functionalities
- Using the function
stylo()in batch mode - Performance measures in supervised classification
- Authorship verification with the package 'stylo'
- Cross-validation using the function
classify() - Custom distance measures
- Testing rolling stylometry
- Using ‘Stylo’ with languages other than English
Other relevant resources
Kudos to David L. Wrisley for a super-useful post (a notebook with code snippets, to be precise) on analyzing the Gutenberg Project texts with
stylo.Despite a black legend, R and Python are not necessarily in a deadly clash: here is a great post by José Calvo Tello on invoking the package
stylodirectly from Python!Using the package
stylowith the TXM environment: see this post by Serge Heiden.Probably not a bad idea to check a comprehensive Stylometry Bibliography curated by Christof Schöch, before starting an experiment in text analysis.
The package
stylohas been created as a by-product of a few projects conducted by the Computational Stylistics Group. See this website for further details. An older version of the webpage is also there, even if it has not been be updated for a while.
Owner
- Name: Computational Stylistics Group
- Login: computationalstylistics
- Kind: user
- Website: https://computationalstylistics.github.io/
- Repositories: 33
- Profile: https://github.com/computationalstylistics
GitHub Events
Total
- Issues event: 2
- Watch event: 22
- Push event: 3
- Fork event: 1
Last Year
- Issues event: 2
- Watch event: 22
- Push event: 3
- Fork event: 1
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| computationalstylistics | m****r@g****m | 178 |
| computationalstylistics | m****r@g****m | 110 |
| Steffen Pielström | s****m@w****e | 14 |
| Aaron Dunmore | a****e@g****m | 7 |
| James Clawson | j****n | 4 |
| Mike Kestemont | m****t@g****m | 4 |
| James Clawson | c****n@g****m | 3 |
| meder | m****r@c****l | 3 |
| Frans de Jonge | f****e@g****m | 3 |
| Marcin Kosiński | m****i@g****m | 2 |
| pboot | p****t@x****l | 1 |
| Simone Rebora | s****1@g****m | 1 |
| Kamil | k****i@g****m | 1 |
| meder | m****r@m****l | 1 |
| FcoJavT | 5****T | 1 |
| v-ji | 1****i | 1 |
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 32
- Total pull requests: 28
- Average time to close issues: 5 months
- Average time to close pull requests: about 2 months
- Total issue authors: 21
- Total pull request authors: 11
- Average comments per issue: 1.53
- Average comments per pull request: 0.86
- Merged pull requests: 28
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- christofs (5)
- adunmore (4)
- jmclawson (3)
- jnussbaum (2)
- shenbear (2)
- corvusMidnight (1)
- sta-a (1)
- sblss (1)
- Frenzie (1)
- gasyoun (1)
- fishfree (1)
- Jean-Baptiste-Camps (1)
- npahakis (1)
- nightowl15 (1)
- andbue (1)
Pull Request Authors
- pielstroem (6)
- jmclawson (5)
- adunmore (4)
- Frenzie (3)
- mikekestemont (3)
- MarcinKosinski (2)
- pboot (1)
- FcoJavT (1)
- Quares (1)
- SimoneRebora (1)
- v-ji (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 661 last-month
- Total dependent packages: 1
- Total dependent repositories: 2
- Total versions: 28
- Total maintainers: 1
cran.r-project.org: stylo
Stylometric Multivariate Analyses
- Homepage: https://github.com/computationalstylistics/stylo
- Documentation: http://cran.r-project.org/web/packages/stylo/stylo.pdf
- License: GPL (≥ 3)
-
Latest release: 0.7.5
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.0 depends
- ape * imports
- class * imports
- e1071 * imports
- lattice * imports
- pamr * imports
- tcltk * imports
- tcltk2 * imports
- tsne * imports
- networkD3 * suggests
- readr * suggests
- stringi * suggests