README.md in fasttext-0.1.3 vs README.md in fasttext-0.2.0
- old
+ new
@@ -1,10 +1,10 @@
# fastText
[fastText](https://fasttext.cc) - efficient text classification and representation learning - for Ruby
-[![Build Status](https://travis-ci.org/ankane/fasttext.svg?branch=master)](https://travis-ci.org/ankane/fasttext) [![Build status](https://ci.appveyor.com/api/projects/status/67yby3w6mth766y9/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/fasttext/branch/master)
+[![Build Status](https://github.com/ankane/fastText/workflows/build/badge.svg?branch=master)](https://github.com/ankane/fastText/actions)
## Installation
Add this line to your application’s Gemfile:
@@ -125,10 +125,16 @@
```ruby
model.word_vector("carrot")
```
+Get a sentence vector
+
+```ruby
+model.sentence_vector("sentence text")
+```
+
Get words
```ruby
model.words
```
@@ -170,11 +176,11 @@
loss: "softmax", # loss function {ns, hs, softmax, ova}
bucket: 2000000, # number of buckets
thread: 3, # number of threads
lr_update_rate: 100, # change the rate of updates for the learning rate
t: 0.0001, # sampling threshold
- label_prefix: "__label__" # label prefix
+ label_prefix: "__label__", # label prefix
verbose: 2, # verbose
pretrained_vectors: nil, # pretrained word vectors (.vec file)
autotune_metric: "f1", # autotune optimization metric
autotune_predictions: 1, # autotune predictions
autotune_duration: 300, # autotune search time in seconds
@@ -230,11 +236,11 @@
__label__spam text from document three
```
## Pretrained Models
-There are a number of [pretrained models](https://fasttext.cc/docs/en/english-vectors.html) you can download
+There are a number of [pretrained models](https://fasttext.cc/docs/en/supervised-models.html) you can download
### Language Identification
Download one of the [pretrained models](https://fasttext.cc/docs/en/language-identification.html) and load it
@@ -246,19 +252,10 @@
```ruby
model.predict("bon appétit")
```
-## rbenv
-
-This library uses [Rice](https://github.com/jasonroelofs/rice) to interface with the fastText C++ library. Rice and earlier versions of rbenv don’t play nicely together. If you encounter an error during installation, upgrade ruby-build and reinstall your Ruby version.
-
-```sh
-brew upgrade ruby-build
-rbenv install [version]
-```
-
## History
View the [changelog](https://github.com/ankane/fasttext/blob/master/CHANGELOG.md)
## Contributing
@@ -271,10 +268,10 @@
- Suggest or add new features
To get started with development:
```sh
-git clone https://github.com/ankane/fastText.git
+git clone --recursive https://github.com/ankane/fastText.git
cd fastText
bundle install
bundle exec rake compile
bundle exec rake test
```