classifier 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -0
- data/lib/classifier/cli.rb +1 -1
- data/lib/classifier/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef8c75a0dfe0e6da3e2a7cf49d970c738913515b2f29f8759b8c2bc0df5ac8d0
|
|
4
|
+
data.tar.gz: 03b67f752c656af13f87edfd32fe56fe201e1a0521978b06ed6139a5d01569a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 42ac44b3698b864e27a47a79c468971e4c33f73e465a0c552715a93422e1cbbe009c57275378a330dd00607d4d3048590c805373e85f5bf31ecfaca4504ed311
|
|
7
|
+
data.tar.gz: 41fe7ff430019ff41a97a110784419049914f3a86cdcc383349c58770ab5419cbcb6bb99ae930d08058e1003d4efc8026616317b2096352abe473d54203e99c5
|
data/README.md
CHANGED
|
@@ -24,6 +24,47 @@ Text classification in Ruby. Five algorithms, native performance, streaming supp
|
|
|
24
24
|
gem 'classifier'
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
Or install via Homebrew for CLI-only usage:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
brew install classifier
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Command Line
|
|
34
|
+
|
|
35
|
+
Classify text instantly with pre-trained models—no coding required:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Detect spam
|
|
39
|
+
classifier classify "You won a free iPhone!" -r sms-spam-filter
|
|
40
|
+
# => spam
|
|
41
|
+
|
|
42
|
+
# Analyze sentiment
|
|
43
|
+
classifier classify "This movie was absolutely amazing!" -r imdb-sentiment
|
|
44
|
+
# => positive
|
|
45
|
+
|
|
46
|
+
# Detect emotions
|
|
47
|
+
classifier classify "I'm so happy today!" -r emotion-detection
|
|
48
|
+
# => joy
|
|
49
|
+
|
|
50
|
+
# List all available models
|
|
51
|
+
classifier models
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Train your own model:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Train from files
|
|
58
|
+
classifier train positive reviews/good/*.txt
|
|
59
|
+
classifier train negative reviews/bad/*.txt
|
|
60
|
+
|
|
61
|
+
# Classify new text
|
|
62
|
+
classifier classify "Great product, highly recommend"
|
|
63
|
+
# => positive
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
[CLI Guide →](https://rubyclassifier.com/docs/guides/cli/basics)
|
|
67
|
+
|
|
27
68
|
## Quick Start
|
|
28
69
|
|
|
29
70
|
### Bayesian
|
data/lib/classifier/cli.rb
CHANGED
data/lib/classifier/version.rb
CHANGED