An open API service indexing awesome lists of open source software.

https://github.com/trinker/synonym


https://github.com/trinker/synonym

r synonyms text-mining

Last synced: 6 months ago
JSON representation

Awesome Lists containing this project

README

          

---
title: "synonym"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
md_document:
toc: true
---

```{r, echo=FALSE}
desc <- suppressWarnings(readLines("DESCRIPTION"))
regex <- "(^Version:\\s+)(\\d+\\.\\d+\\.\\d+)"
loc <- grep(regex, desc)
ver <- gsub(regex, "\\2", desc[loc])
verbadge <- sprintf('Version', ver, ver)
````

[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/0.1.0/active.svg)](http://www.repostatus.org/#active)
[![Build Status](https://travis-ci.org/trinker/synonym.svg?branch=master)](https://travis-ci.org/trinker/synonym)
[![Coverage Status](https://coveralls.io/repos/trinker/synonym/badge.svg?branch=master)](https://coveralls.io/r/trinker/synonym?branch=master)
`r verbadge`

![](tools/synonym_logo/r_synonym.png)

**synonym** is a synonyms data set wrapped with a few tools for quickly looking up relevant synonyms.

![](tools/synonym_logo/synonym_humor.png)

# Functions

| Function | Description |
|------------------|-----------------------------------|
| `get_synonym` | Lookup relevant synonyms |
| `drop_zero` | Drop `NA`s\* from `get_synonym` objects |

\**These were terms that are in the synonym key but did not meet the relevant distance.*

# Demonstration

```{r}
if (!require("pacman")) install.packages("pacman")
pacman::p_load_gh("trinker/synonym")

get_synonym(c('cat', 'dog', 'chicken', 'dfsf'))
get_synonym('cat', 1)
get_synonym('cat', 2)
get_synonym('cat', 3)
get_synonym('cat', 2:3)
drop_zero(
get_synonym(c('cat', 'dog', 'chicken', 'dfsf'))
)

```

# Installation

To download the development version of **synonym**:

Download the [zip ball](https://github.com/trinker/synonym/zipball/master) or [tar ball](https://github.com/trinker/synonym/tarball/master), decompress and run `R CMD INSTALL` on it, or use the **pacman** package to install the development version:

```r
if (!require("pacman")) install.packages("pacman")
pacman::p_load_gh("trinker/synonym")
```

# Contact

You are welcome to:
- submit suggestions and bug-reports at:
- send a pull request on:
- compose a friendly e-mail to: