blingfire 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5cb0c60e84b11286c1137a7b51c7e69f8f728c0b2e316241f2393fc84100d85
4
- data.tar.gz: 3cb42d40e91f71f79e9c47a7e5f639cf2c1a50529e0b24d5446593d2f595d9d0
3
+ metadata.gz: 2585ca0684a0d6af6beaae99ab7b5250eb928c5200cbfb6274dcd2cbc914dccc
4
+ data.tar.gz: fe4681abb0c63e7d8fd0e8a777abaed95e578bbb0cfd7238bacbe9beecd3d07c
5
5
  SHA512:
6
- metadata.gz: db26b8e41a671515027f20efc2244e1384144efd88ebe3126bb77aad3abd5b09280f7af314d3ccb2d5a51c4ae56e53f0398e6529654405ebac8e85e4a6c3449e
7
- data.tar.gz: fd1e5a1cc93dbe5c2b59c2cfbb54b874f57a174f85530a0f5582a1d831b8fb214b02452767a5874505ff0c1b2b1ce7ccf99463a70eb17a43c3730da38a7780ad
6
+ metadata.gz: 9a02c3f87eea7ea989f73032388f4abe69b30055f1ea7a96aa302385a2f6038eb833cffe00b15e5b69124d7a11bf8dd031067a4a16b415999955b8ce393f25d4
7
+ data.tar.gz: e696df2343cab6ee82af95bedcfc45457b69287113f819514851ef5f943a2f0f8c165b21abff0f944dcd96d4cab45b8faa1190940bf36c294c9c98d55bd9d980
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.5 (2021-03-14)
2
+
3
+ - Updated Bling Fire to 0.1.5
4
+ - Added ARM shared library for Linux
5
+
1
6
  ## 0.1.4 (2020-12-28)
2
7
 
3
8
  - Added ARM shared library for Mac
data/README.md CHANGED
@@ -46,18 +46,16 @@ sentences, start_offsets, end_offsets = model.text_to_sentences_with_offsets(tex
46
46
 
47
47
  ## Pre-trained Models
48
48
 
49
- BlingFire comes with a default model that follows the tokenization logic of NLTK with a few changes. You can also download other models:
50
-
51
- - [BERT Base](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_base_tok.bin)
52
- - [BERT Base Cased](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_base_cased_tok.bin)
53
- - [BERT Chinese](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_chinese.bin)
54
- - [BERT Multilingual Cased](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_multi_cased.bin)
55
- - [Laser 100k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/laser100k.bin)
56
- - [Laser 250k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/laser250k.bin)
57
- - [Laser 500k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/laser500k.bin)
58
- - [XLM Roberta](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/xlm_roberta_base.bin)
59
- - [XLNet](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/xlnet.bin)
60
- - [XLNet No Norm](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/xlnet_nonorm.bin)
49
+ Bling Fire comes with a default model that follows the tokenization logic of NLTK with a few changes. You can also download other models:
50
+
51
+ - [BERT Base](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_base_tok.bin), [BERT Base Cased](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_base_cased_tok.bin), [BERT Chinese](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_chinese.bin), [BERT Multilingual Cased](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_multi_cased.bin)
52
+ - [GPT-2](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/gpt2.bin)
53
+ - [Laser 100k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/laser100k.bin), [Laser 250k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/laser250k.bin), [Laser 500k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/laser500k.bin)
54
+ - [RoBERTa](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/roberta.bin)
55
+ - [Syllab](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/syllab.bin)
56
+ - [URI 100k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/uri100k.bin), [URI 250k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/uri250k.bin), [URI 500k](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/uri500k.bin)
57
+ - [XLM-RoBERTa](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/xlm_roberta_base.bin)
58
+ - [XLNet](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/xlnet.bin), [XLNet No Norm](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/xlnet_nonorm.bin)
61
59
  - [WBD](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/wbd_chuni.bin)
62
60
 
63
61
  Load a model
data/lib/blingfire.rb CHANGED
@@ -14,12 +14,18 @@ module BlingFire
14
14
  lib_name =
15
15
  if Gem.win_platform?
16
16
  "blingfiretokdll.dll"
17
- elsif RbConfig::CONFIG["arch"] =~ /arm64-darwin/i
18
- "libblingfiretokdll.arm64.dylib"
19
17
  elsif RbConfig::CONFIG["host_os"] =~ /darwin/i
20
- "libblingfiretokdll.dylib"
18
+ if RbConfig::CONFIG["host_cpu"] =~ /arm/i
19
+ "libblingfiretokdll.arm64.dylib"
20
+ else
21
+ "libblingfiretokdll.dylib"
22
+ end
21
23
  else
22
- "libblingfiretokdll.so"
24
+ if RbConfig::CONFIG["host_cpu"] =~ /aarch64/i
25
+ "libblingfiretokdll.arm64.so"
26
+ else
27
+ "libblingfiretokdll.so"
28
+ end
23
29
  end
24
30
  vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__)
25
31
  self.ffi_lib = [vendor_lib]
@@ -1,3 +1,3 @@
1
1
  module BlingFire
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blingfire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-29 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -68,6 +68,7 @@ files:
68
68
  - vendor/LICENSE
69
69
  - vendor/blingfiretokdll.dll
70
70
  - vendor/libblingfiretokdll.arm64.dylib
71
+ - vendor/libblingfiretokdll.arm64.so
71
72
  - vendor/libblingfiretokdll.dylib
72
73
  - vendor/libblingfiretokdll.so
73
74
  homepage: https://github.com/ankane/blingfire