fasttext 0.1.1 → 0.1.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/CHANGELOG.md +6 -2
- data/LICENSE.txt +1 -1
- data/README.md +3 -2
- data/ext/fasttext/ext.cpp +0 -28
- data/ext/fasttext/extconf.rb +5 -5
- data/lib/fasttext/ext.bundle +0 -0
- data/lib/fasttext/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f83be8c01c6a45a90758ccee430b3898396bcfdda5a2c338126ed9dc3620aea5
|
4
|
+
data.tar.gz: 7e3dee8eb3afe12745f78448fd01ac68a2f0ac946bd01195f2f6e6081f62fbad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be3117e1aceed3f6126fc1d84eb87caf53abb3be802a419ebcaa284cb567ee9ac033d5860842690bbd1c0477a6e5013dfc36eb96f6fb067a63015150fa18a1fe
|
7
|
+
data.tar.gz: dc2467f3f7317b5e1955ede144d9ad50c5abb1cc2b9dc5ad356350f192631b0142c91aecc4dd03b331d90f1cf65c7f3ba3ec176c17dc6b66a1226171261de1b6
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
## 0.1.
|
1
|
+
## 0.1.2 (2020-01-10)
|
2
|
+
|
3
|
+
- Fixed installation error with Ruby 2.7
|
4
|
+
|
5
|
+
## 0.1.1 (2019-10-26)
|
2
6
|
|
3
7
|
- Fixed installation
|
4
8
|
- Reduced gem size
|
5
9
|
- Added support for multiple documents to `predict` method
|
6
10
|
|
7
|
-
## 0.1.0
|
11
|
+
## 0.1.0 (2019-10-26)
|
8
12
|
|
9
13
|
- First release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -240,10 +240,11 @@ model.predict("bon appétit")
|
|
240
240
|
|
241
241
|
## rbenv
|
242
242
|
|
243
|
-
This library uses [Rice](https://github.com/jasonroelofs/rice) to interface with the fastText C++ library.
|
243
|
+
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.
|
244
244
|
|
245
245
|
```sh
|
246
|
-
|
246
|
+
brew upgrade ruby-build
|
247
|
+
rbenv install [version]
|
247
248
|
```
|
248
249
|
|
249
250
|
## History
|
data/ext/fasttext/ext.cpp
CHANGED
@@ -14,34 +14,6 @@
|
|
14
14
|
|
15
15
|
using namespace Rice;
|
16
16
|
|
17
|
-
template<>
|
18
|
-
inline
|
19
|
-
long long from_ruby<long long>(Object x)
|
20
|
-
{
|
21
|
-
return NUM2LL(x);
|
22
|
-
}
|
23
|
-
|
24
|
-
template<>
|
25
|
-
inline
|
26
|
-
Object to_ruby<long long>(long long const & x)
|
27
|
-
{
|
28
|
-
return LL2NUM(x);
|
29
|
-
}
|
30
|
-
|
31
|
-
template<>
|
32
|
-
inline
|
33
|
-
unsigned long long from_ruby<unsigned long long>(Object x)
|
34
|
-
{
|
35
|
-
return NUM2ULL(x);
|
36
|
-
}
|
37
|
-
|
38
|
-
template<>
|
39
|
-
inline
|
40
|
-
Object to_ruby<unsigned long long>(unsigned long long const & x)
|
41
|
-
{
|
42
|
-
return ULL2NUM(x);
|
43
|
-
}
|
44
|
-
|
45
17
|
template<>
|
46
18
|
inline
|
47
19
|
Object to_ruby<std::vector<std::pair<fasttext::real, std::string>>>(std::vector<std::pair<fasttext::real, std::string>> const & x)
|
data/ext/fasttext/extconf.rb
CHANGED
@@ -5,11 +5,11 @@ abort "Missing stdc++" unless have_library("stdc++")
|
|
5
5
|
# TODO use -std=c++14 when available
|
6
6
|
$CXXFLAGS << " -pthread -std=c++11 -funroll-loops -O3 -march=native"
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
ext = File.expand_path(".", __dir__)
|
9
|
+
fasttext = File.expand_path("../../vendor/fastText/src", __dir__)
|
10
10
|
|
11
|
-
$srcs = Dir["{#{
|
12
|
-
$INCFLAGS << " -I
|
13
|
-
$VPATH <<
|
11
|
+
$srcs = Dir["{#{ext},#{fasttext}}/*.{cc,cpp}"]
|
12
|
+
$INCFLAGS << " -I#{fasttext}"
|
13
|
+
$VPATH << fasttext
|
14
14
|
|
15
15
|
create_makefile("fasttext/ext")
|
Binary file
|
data/lib/fasttext/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fasttext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- ext/fasttext/extconf.rb
|
95
95
|
- lib/fasttext.rb
|
96
96
|
- lib/fasttext/classifier.rb
|
97
|
+
- lib/fasttext/ext.bundle
|
97
98
|
- lib/fasttext/model.rb
|
98
99
|
- lib/fasttext/vectorizer.rb
|
99
100
|
- lib/fasttext/version.rb
|
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
- !ruby/object:Gem::Version
|
145
146
|
version: '0'
|
146
147
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
148
|
+
rubygems_version: 3.1.2
|
148
149
|
signing_key:
|
149
150
|
specification_version: 4
|
150
151
|
summary: fastText - efficient text classification and representation learning - for
|