Skip to content

Commit

Permalink
Fix gr local tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pdrhlik committed Nov 8, 2018
1 parent 0bdaecb commit 5135131
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 53 deletions.
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Here we would like to say **BIG THANKS** to native speakers that help us with sw
* English - [Patrik Drhlík](https://github.com/pdrhlik)
* French (Canada) - [Marc-André Désautels](https://github.com/desautm)
* German - [Peter Meißner](https://github.com/petermeissner)
* Greek - Anonymous
* Macedonian - [novica](https://github.com/novica)
* Polish - [Michal Czyz](https://github.com/mczyzj)
* Romanian - Alexandru Supeanu
Expand Down
112 changes: 65 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@

<!-- README.md is generated from README.Rmd. Please edit this file. -->
[![Join the chat at https://gitter.im/pdrhlik/sweary](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/swearyr) [![Build Status](https://travis-ci.org/pdrhlik/sweary.svg?branch=master)](https://travis-ci.org/pdrhlik/sweary)

sweary <img src="sticker/sweary-sticker.png" align="right" width="150" />
=========================================================================
[![Join the chat at
https://gitter.im/pdrhlik/sweary](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/swearyr)
[![Build
Status](https://travis-ci.org/pdrhlik/sweary.svg?branch=master)](https://travis-ci.org/pdrhlik/sweary)

Sweary is an R package that contains a database of swear words from different languages, cherry picked by native speakers.
# sweary <img src="sticker/sweary-sticker.png" align="right" width="150" />

Installation
------------
Sweary is an R package that contains a database of swear words from
different languages, cherry picked by native speakers.

The development version of this package can be installed using [devtools](https://github.com/r-lib/devtools):
## Installation

The development version of this package can be installed using
[devtools](https://github.com/r-lib/devtools):

devtools::install_github("pdrhlik/sweary")

Current swear word lists
------------------------
## Current swear word lists

| Language | Language code | Number of swear words |
|-----------------|---------------|-----------------------|
| --------------- | ------------- | --------------------- |
| Czech | cs | 57 |
| German | de | 99 |
| English | en | 39 |
Expand All @@ -30,8 +33,7 @@ Current swear word lists
| Slovak | sk | 28 |
| **Total** | **9 langs** | **399** |

Examples
--------
## Examples

All languages are stored in a `swear_words` data frame.

Expand Down Expand Up @@ -67,45 +69,61 @@ head(en_swear_words)
## 5 bitch en
## 6 bollocks en

Add (modify) a language
-----------------------

If you are not comfortable with `git` and pull requests, you can just follow steps **1-3**. After you create the file, send it to me via [email](mailto:patrik.drhlik@gmail.com) with a subject **New sweary language: {LANG\_CODE}**. We will acknowledge you in the README after we approve of the changes.

1. **Choose a new language.**
Find its two letter [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
If the language you are creating is a certain dialect (e.g. Canadian French), find its [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) in this [language code table](http://www.lingoes.net/en/translator/langcode.htm).
2. **Create a language file.**
Place the file in `data-raw/swear-word-lists/{LANG_CODE}`.
Examples:
+ English: `data-raw/swear-word-lists/en`
- Canadian French: `data-raw/swear-word-lists/fr-CA`
## Add (modify) a language

If you are not comfortable with `git` and pull requests, you can just
follow steps **1-3**. After you create the file, send it to me via
[email](mailto:patrik.drhlik@gmail.com) with a subject **New sweary
language: {LANG\_CODE}**. We will acknowledge you in the README after we
approve of the changes.

1. **Choose a new language.**
Find its two letter [ISO 639-1
code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
If the language you are creating is a certain dialect (e.g. Canadian
French), find its [IETF language
tag](https://en.wikipedia.org/wiki/IETF_language_tag) in this
[language code
table](http://www.lingoes.net/en/translator/langcode.htm).
2. **Create a language file.**
Place the file in `data-raw/swear-word-lists/{LANG_CODE}`.
Examples:
- English: `data-raw/swear-word-lists/en`
- Canadian French: `data-raw/swear-word-lists/fr-CA`
3. **Fill in the file with swear words.** Following rules must apply:
- **One** swear word per line with no trailing whitespace.
- All words must be **lowercase**.
- The list must only contain **unique** words.
- The list must be **sorted** alphabetically.
4. **Make sure all the tests pass.**
You can do that using a development function called `build_sweary()`. It becomes available when you `git clone` the repository and call `devtools::load_all()`. Or pressing `Ctrl+Shift+L` in RStudio. Learn more about calling this function using `?build_sweary`.
5. **Update README.Rmd**.
Update the `langs` data frame in README.Rmd by adding a new row to it. More precise instructions are in the raw file itself.
- **One** swear word per line with no trailing whitespace.
- All words must be **lowercase**.
- The list must only contain **unique** words.
- The list must be **sorted** alphabetically.
4. **Make sure all the tests pass.**
You can do that using a development function called
`build_sweary()`. It becomes available when you `git clone` the
repository and call `devtools::load_all()`. Or pressing
`Ctrl+Shift+L` in RStudio. Learn more about calling this function
using `?build_sweary`.
5. **Update README.Rmd**.
Update the `langs` data frame in README.Rmd by adding a new row to
it. More precise instructions are in the raw file itself.
6. **Create a pull request.**

Origin
------
## Origin

The idea first appeared after the [South Park text analysis lightning talk](https://github.com/pdrhlik/southparktalk-whyr2018) at the [Why R? 2018 conference](http://whyr2018.pl/) in Wrocław. All the contributors will be acknowledged as the work progresses.
The idea first appeared after the [South Park text analysis lightning
talk](https://github.com/pdrhlik/southparktalk-whyr2018) at the [Why
R? 2018 conference](http://whyr2018.pl/) in Wrocław. All the
contributors will be acknowledged as the work progresses.

Acknowledgments
---------------
## Acknowledgments

Here we would like to say **BIG THANKS** to native speakers that help us with swear words dictionaries:
Here we would like to say **BIG THANKS** to native speakers that help us
with swear words dictionaries:

- Czech - [Patrik Drhlík](https://github.com/pdrhlik)
- English - [Patrik Drhlík](https://github.com/pdrhlik)
- French (Canada) - [Marc-André Désautels](https://github.com/desautm)
- German - [Peter Meißner](https://github.com/petermeissner)
- Macedonian - [novica](https://github.com/novica)
- Polish - [Michal Czyz](https://github.com/mczyzj)
- Romanian - Alexandru Supeanu
- Slovak - Šimon Žďárský
- Czech - [Patrik Drhlík](https://github.com/pdrhlik)
- English - [Patrik Drhlík](https://github.com/pdrhlik)
- French (Canada) - [Marc-André Désautels](https://github.com/desautm)
- German - [Peter Meißner](https://github.com/petermeissner)
- Greek - Anonymous
- Macedonian - [novica](https://github.com/novica)
- Polish - [Michal Czyz](https://github.com/mczyzj)
- Romanian - Alexandru Supeanu
- Slovak - Šimon Žďárský
12 changes: 6 additions & 6 deletions data-raw/swear-word-lists/gr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
αρχίδι
γαμιόλης
καριόλης
κόπανος
κωλοτρυπίδα
κωλόπαιδο
κόπανος
κώλος
κωλοτρυπίδα
Μαλάκας
μουνί
μουνόπανο
πουτάνα
πούτσα
πούστης
πούτσα
μαλάκας
μουνί
μουνόπανο
Binary file modified data/swear_words.rda
Binary file not shown.

0 comments on commit 5135131

Please sign in to comment.