igo 0.1.4.1 → 0.1.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e864f1dc86ce2b7164e50d13f42bc10d28b33fa4ae4f271ec912e410d461f697
4
- data.tar.gz: 6e8ee3d9ac2e39306d2d02b79e9d86291bea4af1559cd7c4faf64bd009d947e3
3
+ metadata.gz: cb6aa82cbe2554d14aac09e8d583297de352c4e005cf15f27b78ca50fb354f95
4
+ data.tar.gz: 8dcf65e8294c2daf4bb0ec830ecccc42cda0cc1687d7be71f4c15494148f4fc5
5
5
  SHA512:
6
- metadata.gz: ae7bee63027e8de27766e941f99e38b4775be1fc8bf8aaf5ca454d41bf7d0346ea9eb7e9f502f93ce5e0f1f347ab6e0eb9a2f01f8c6f1ce0e7362108a2813997
7
- data.tar.gz: 97aa666160536500f5910a8d7c072e5652b435d1d9cecf6a5d5b98211ba45e1e4a76f6831d7cd90ed31fb394074f48962507a9475859a23fde355533a0a76330
6
+ metadata.gz: 18467db48f62b0b71a020a3f1874997a9dbfeed0ab0100aa18d8b0e622fd14cfddee7ec7d9725e4bbe452c47769af009afe2846f8ceeee8d3d59207081eb0468
7
+ data.tar.gz: 64f3908baa695f3538b66ad98a9783656a802fbbc187a4cf23635bcf90833dbbd05c88e5c3f0795ae33caf7154db9a790fd28b309321f48e32596cbbffb07eec
data/README.en.md CHANGED
@@ -19,10 +19,9 @@ zh.tag "全世界的无产者,联合起来!", s: true
19
19
  gem install igo
20
20
  ```
21
21
 
22
- for use `jisho-api`, `Thulac` in __Python__, you need to install:
22
+ for use `Thulac` in __Python__, you need to install:
23
23
 
24
24
  ```cmd
25
- pip install jisho-api
26
25
 
27
26
  pip install thulac
28
27
 
data/README.ja.md CHANGED
@@ -19,10 +19,9 @@ zh.tag "全世界的无产者,联合起来!", s: true
19
19
  gem install igo
20
20
  ```
21
21
 
22
- __Python__ ノ `Jisho-api`・`Thulac` 使いたいなら、以下の pip がインストール必要です:
22
+ __Python__ ノ `Thulac` 使いたいなら、以下の pip がインストール必要です:
23
23
 
24
24
  ```cmd
25
- pip install jisho-api
26
25
 
27
26
  pip install thulac
28
27
  ```
data/README.md CHANGED
@@ -19,10 +19,9 @@ zh.tag "全世界的无产者,联合起来!", s: true
19
19
  gem install igo
20
20
  ```
21
21
 
22
- for use `jisho-api`, `Thulac` in __Python__, you need to install:
22
+ for use `Thulac` in __Python__, you need to install:
23
23
 
24
24
  ```cmd
25
- pip install jisho-api
26
25
 
27
26
  pip install thulac
28
27
 
data/README.zh.md CHANGED
@@ -19,10 +19,9 @@ zh.tag "全世界的无产者,联合起来!", s: true
19
19
  gem install igo
20
20
  ```
21
21
 
22
- 要使用 __Python__ 库的 `jisho_api`, `Thulac`,你得先安装...:
22
+ 要使用 __Python__ 库的 `Thulac`,你得先安装...:
23
23
 
24
24
  ```cmd
25
- pip install jisho-api
26
25
 
27
26
  pip install thulac
28
27
 
data/lib/igo/ja.rb CHANGED
@@ -1,8 +1,6 @@
1
- require 'jisho_api'
2
1
  require 'nokogiri'
3
2
  require 'open-uri'
4
3
  require 'uri'
5
- require 'nagisa'
6
4
 
7
5
  module Igo
8
6
  module Ja
data/lib/igo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Igo
4
- VERSION = "0.1.4.1"
4
+ VERSION = "0.1.4.3"
5
5
  end
data/lib/igo/zh.rb CHANGED
@@ -32,6 +32,7 @@ module Igo
32
32
  s ? res.join(" ") : res
33
33
  end
34
34
  when /thulac/
35
+ require_relative 'thulac'
35
36
  Thulac.cut(str, text: s)
36
37
  end
37
38
  end
@@ -39,7 +40,7 @@ module Igo
39
40
  def tag str, s: false, by: 0
40
41
  case by
41
42
  when /thu/
42
- require './thulac'
43
+ require_relative 'thulac'
43
44
  Thulac.cut str, text: s
44
45
  else
45
46
  s ? Tagging.tag(str).map{_1.to_a.flatten.join("_")}.join(" ") : Tagging.tag(str).map{_1.to_a.flatten}
data/lib/igo.rb CHANGED
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "igo/version"
4
- require 'jisho_api'
5
4
  require 'jieba_rb'
6
- require 'igo/zh'
7
- require 'igo/ja'
5
+ require_relative 'igo/zh'
6
+ require_relative 'igo/ja'
8
7
 
9
8
  module Igo
10
9
  class Error < StandardError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: igo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.1
4
+ version: 0.1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - saisui
@@ -27,13 +27,11 @@ files:
27
27
  - README.md
28
28
  - README.zh.md
29
29
  - Rakefile
30
- - igo.rb
31
30
  - lib/igo.rb
32
31
  - lib/igo/ja.rb
33
32
  - lib/igo/thulac.rb
34
33
  - lib/igo/version.rb
35
34
  - lib/igo/zh.rb
36
- - sig/igo.rbs
37
35
  homepage: https://github.com/saisui/igo-rb
38
36
  licenses:
39
37
  - MPL-2.0
data/igo.rb DELETED
@@ -1,12 +0,0 @@
1
- require 'jisho_api'
2
- require 'jieba_rb'
3
-
4
- module Igo
5
- Jisho = JishoAPI::JishoAPI
6
- module Ja
7
- end
8
- module Zh
9
- end
10
- end
11
-
12
- include Natlang
data/sig/igo.rbs DELETED
@@ -1,4 +0,0 @@
1
- module Igo
2
- VERSION: String
3
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
- end