https://github.com/trinker/synonym
https://github.com/trinker/synonym
r synonyms text-mining
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/trinker/synonym
- Owner: trinker
- Created: 2016-03-13T04:08:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-14T17:27:28.000Z (over 8 years ago)
- Last Synced: 2025-02-13T22:42:24.609Z (8 months ago)
- Topics: r, synonyms, text-mining
- Language: R
- Size: 18.2 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS
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('', ver, ver)
````[](http://www.repostatus.org/#active)
[](https://travis-ci.org/trinker/synonym)
[](https://coveralls.io/r/trinker/synonym?branch=master)
`r verbadge`
**synonym** is a synonyms data set wrapped with a few tools for quickly looking up relevant synonyms.

# 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: