https://github.com/tamada/scv
Similarities and distances calculator among vectors
https://github.com/tamada/scv
Last synced: 10 months ago
JSON representation
Similarities and distances calculator among vectors
- Host: GitHub
- URL: https://github.com/tamada/scv
- Owner: tamada
- License: apache-2.0
- Created: 2021-05-24T11:49:18.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-12T23:40:26.000Z (over 4 years ago)
- Last Synced: 2023-09-23T11:34:45.740Z (over 2 years ago)
- Language: Go
- Size: 104 KB
- Stars: 0
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :balance_scale: scv
[](https://github.com/tamada/scv/actions/workflows/build.yml)
[](https://coveralls.io/github/tamada/scv?branch=setup_ci)
[](https://goreportcard.com/report/github.com/tamada/scv)
[](https://codebeat.co/projects/github-com-tamada-scv-main)
[](https://github.com/tamada/scv/blob/main/LICENSE)
[](https://github.com/tamada/scv/releases/tag/v1.0.0)
[](https://zenodo.org/badge/latestdoi/370333808)
[](https://github.com/users/tamada/packages/container/package/scv)
Similarities and distance Calculator among Vectors.
## :speaking_head: Description
There are several algorithms to calculate the similarities of two bectors; however, no commands are exists treats them.
`scv` standardizes the interface for calculating the similarities and distances among vectors.
## :runner: Usage
### :question: CLI help message
```sh
scv [OPTIONS]
OPTIONS
-a, --algorithm specifies the calculating algorithm. This option is mandatory.
The value of this option accepts several values separated with comma.
Available values are: simpson, jaccard, dice, cosine, pearson,
euclidean, manhattan, chebyshev, and levenshtein.
-f, --format specifies the resultant format. Default is default.
Available values are: default, json, and xml.
-t, --input-type specifies the type of VECTORS. Default is file.
If TYPE is separated with comma, each type shows
the corresponding VECTORS.
Available values are: byte_file, term_file, string, and json.
-h, --help prints this message.
VECTORS
the source of vectors for calculation.
```
## :athletic_shoe: Examples
```sh
$ scv -t string -a simpson distance similarity
simpson(distance, similarity) = 0.5000
$ scv -t string -a jaccard,dice distance similarity
jaccard(distance, similarity) = 0.3333
dice(distance, similarity) = 0.5000
```
### :whale: Docker
[](https://github.com/users/tamada/packages/container/package/scv)
```sh
docker run -it ghcr.io/tamada/scv:latest gives some strings for comparing
```
If `scv` reads some files, `-v` option should be specified.
```sh
docker run -v $PWD:/home/scv -it ghcr.io/tamada/scv:latest -f json testdata/*.json
```
#### versions
- `1.0.0`, `latest`
## :anchor: Install
### :beer: Homebrew
Simply type the following commands.
```
brew tap tamada/brew
brew install scv
```
### Go lang
```
go get github.com/tamada/scv
```
### :muscle: Compile yourself
```
git clone https://github.com/tamada/scv
cd scv
make
```
## :smile: About
### :man_office_worker: Authors :woman_office_worker:
* Haruaki Tamada ([tamada](https://github.com/tamada))
### :scroll: License
[Apache 2.0](https://github.com/tamada/scv/blob/main/LICENSE)
### :jack_o_lantern: Icon

This image is obtained from [iconscount.com](https://iconscout.com/icon/scale-217).