blingfire 0.1.4 → 0.1.5
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 +5 -0
- data/README.md +10 -12
- data/lib/blingfire.rb +10 -4
- data/lib/blingfire/version.rb +1 -1
- data/vendor/blingfiretokdll.dll +0 -0
- data/vendor/libblingfiretokdll.arm64.dylib +0 -0
- data/vendor/libblingfiretokdll.arm64.so +0 -0
- data/vendor/libblingfiretokdll.dylib +0 -0
- data/vendor/libblingfiretokdll.so +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2585ca0684a0d6af6beaae99ab7b5250eb928c5200cbfb6274dcd2cbc914dccc
|
|
4
|
+
data.tar.gz: fe4681abb0c63e7d8fd0e8a777abaed95e578bbb0cfd7238bacbe9beecd3d07c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a02c3f87eea7ea989f73032388f4abe69b30055f1ea7a96aa302385a2f6038eb833cffe00b15e5b69124d7a11bf8dd031067a4a16b415999955b8ce393f25d4
|
|
7
|
+
data.tar.gz: e696df2343cab6ee82af95bedcfc45457b69287113f819514851ef5f943a2f0f8c165b21abff0f944dcd96d4cab45b8faa1190940bf36c294c9c98d55bd9d980
|
data/CHANGELOG.md
CHANGED
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
|
-
|
|
50
|
-
|
|
51
|
-
- [BERT Base](https://github.com/microsoft/BlingFire/blob/master/dist-pypi/blingfire/bert_base_tok.bin)
|
|
52
|
-
- [
|
|
53
|
-
- [
|
|
54
|
-
- [
|
|
55
|
-
- [
|
|
56
|
-
- [
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
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
|
-
"
|
|
18
|
+
if RbConfig::CONFIG["host_cpu"] =~ /arm/i
|
|
19
|
+
"libblingfiretokdll.arm64.dylib"
|
|
20
|
+
else
|
|
21
|
+
"libblingfiretokdll.dylib"
|
|
22
|
+
end
|
|
21
23
|
else
|
|
22
|
-
"
|
|
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]
|
data/lib/blingfire/version.rb
CHANGED
data/vendor/blingfiretokdll.dll
CHANGED
|
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
|
+
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:
|
|
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
|