Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
classifier (2.3.1)
classifier (2.3.2)
fast-stemmer (~> 1.0)
matrix
mutex_m (~> 0.2)
Expand Down
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,47 @@ Text classification in Ruby. Five algorithms, native performance, streaming supp
gem 'classifier'
```

Or install via Homebrew for CLI-only usage:

```bash
brew install classifier
```

## Command Line

Classify text instantly with pre-trained models—no coding required:

```bash
# Detect spam
classifier classify "You won a free iPhone!" -r sms-spam-filter
# => spam

# Analyze sentiment
classifier classify "This movie was absolutely amazing!" -r imdb-sentiment
# => positive

# Detect emotions
classifier classify "I'm so happy today!" -r emotion-detection
# => joy

# List all available models
classifier models
```

Train your own model:

```bash
# Train from files
classifier train positive reviews/good/*.txt
classifier train negative reviews/bad/*.txt

# Classify new text
classifier classify "Great product, highly recommend"
# => positive
```

[CLI Guide →](https://rubyclassifier.com/docs/guides/cli/basics)

## Quick Start

### Bayesian
Expand Down
2 changes: 1 addition & 1 deletion lib/classifier/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ def fetch_github_file(registry, file_path)
return ''
end

response.body
response.body.force_encoding(Encoding::UTF_8)
end
end
end
2 changes: 1 addition & 1 deletion lib/classifier/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Classifier
VERSION = '2.3.1'.freeze
VERSION = '2.3.2'.freeze
end