suika 0.2.0 → 0.3.0
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/.coveralls.yml +1 -0
- data/.github/workflows/build.yml +21 -0
- data/.github/workflows/coverage.yml +26 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +5 -1
- data/LICENSE.txt +1 -1
- data/README.md +7 -6
- data/Rakefile +75 -2
- data/Steepfile +20 -0
- data/dict/sysdic.gz +0 -0
- data/lib/suika/tagger.rb +24 -22
- data/lib/suika/version.rb +1 -1
- data/sig/suika.rbs +3 -0
- data/sig/suika/char_def.rbs +25 -0
- data/sig/suika/lattice.rbs +11 -0
- data/sig/suika/node.rbs +18 -0
- data/sig/suika/tagger.rbs +23 -0
- data/suika.gemspec +1 -1
- metadata +16 -9
- data/.travis.yml +0 -12
- data/Gemfile.lock +0 -36
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2aaecfc53b051cfbd06052bf22ac14614e459d42789670df1a7a31f601d533f
|
|
4
|
+
data.tar.gz: 39d4ac2b9fc0f4f164f2e3408b3dfcfe478f922d889334243c572a48ddf781de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dfdf6c08812109d7f6c6a52b64b8d8f7e6febd858bae23ccead4b3e598c76acd24a9c56cd893d958199b6545e37a4e01d6058c2acf39241a472260fda6accd90
|
|
7
|
+
data.tar.gz: 495016afc1854269d20b35e27bbb65cdffc307a9a94ab0149b8dcee884ac8560077ce0367a65f70b11bbdf0d27175134a2f66d67cc9bccc8f91a45353f2f1cf8
|
data/.coveralls.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
service_name: github-ci
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: build
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
ruby: [ '2.6', '2.7', '3.0' ]
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v2
|
|
13
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
|
14
|
+
uses: actions/setup-ruby@v1
|
|
15
|
+
with:
|
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
|
17
|
+
- name: Build and test with Rake
|
|
18
|
+
run: |
|
|
19
|
+
gem install --no-document bundler
|
|
20
|
+
bundle install --jobs 4 --retry 3
|
|
21
|
+
bundle exec rake
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: coverage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
coverage:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v2
|
|
14
|
+
- name: Set up Ruby 2.7
|
|
15
|
+
uses: actions/setup-ruby@v1
|
|
16
|
+
with:
|
|
17
|
+
ruby-version: '2.7'
|
|
18
|
+
- name: Build and test with Rake
|
|
19
|
+
run: |
|
|
20
|
+
gem install --no-document bundler
|
|
21
|
+
bundle install --jobs 4 --retry 3
|
|
22
|
+
bundle exec rake
|
|
23
|
+
- name: Coveralls GitHub Action
|
|
24
|
+
uses: coverallsapp/github-action@v1.1.2
|
|
25
|
+
with:
|
|
26
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -5,5 +5,9 @@ source 'https://rubygems.org'
|
|
|
5
5
|
# Specify your gem's dependencies in suika.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
|
-
gem 'rake', '~>
|
|
8
|
+
gem 'rake', '~> 13.0'
|
|
9
9
|
gem 'rspec', '~> 3.0'
|
|
10
|
+
gem 'simplecov', '~> 0.21'
|
|
11
|
+
gem 'simplecov-lcov', '~> 0.8'
|
|
12
|
+
gem 'rbs', '~> 1.2'
|
|
13
|
+
gem 'steep', '~> 0.44'
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Suika
|
|
2
2
|
|
|
3
|
-
[](https://github.com/yoshoku/suika/actions?query=workflow%3Abuild)
|
|
4
|
+
[](https://coveralls.io/github/yoshoku/suika?branch=main)
|
|
4
5
|
[](https://badge.fury.io/rb/suika)
|
|
5
|
-
[](https://github.com/yoshoku/suika/blob/
|
|
6
|
+
[](https://github.com/yoshoku/suika/blob/main/LICENSE.txt)
|
|
6
7
|
[](https://rubydoc.info/gems/suika)
|
|
7
8
|
|
|
8
9
|
Suika 🍉 is a Japanese morphological analyzer written in pure Ruby.
|
|
@@ -74,14 +75,14 @@ end
|
|
|
74
75
|
## Contributing
|
|
75
76
|
|
|
76
77
|
Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/suika.
|
|
77
|
-
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/suika/blob/
|
|
78
|
+
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/suika/blob/main/CODE_OF_CONDUCT.md).
|
|
78
79
|
|
|
79
80
|
## License
|
|
80
81
|
|
|
81
82
|
The gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause).
|
|
82
83
|
In addition, the gem includes binary data generated from mecab-ipadic.
|
|
83
|
-
The details of the license can be found in [LICENSE.txt](https://github.com/yoshoku/suika/blob/
|
|
84
|
-
and [NOTICE.txt](https://github.com/yoshoku/suika/blob/
|
|
84
|
+
The details of the license can be found in [LICENSE.txt](https://github.com/yoshoku/suika/blob/main/LICENSE.txt)
|
|
85
|
+
and [NOTICE.txt](https://github.com/yoshoku/suika/blob/main/NOTICE.txt).
|
|
85
86
|
|
|
86
87
|
## Respect
|
|
87
88
|
|
|
@@ -94,4 +95,4 @@ Janome, a morphological analyzer written in scripting language, gives me the cou
|
|
|
94
95
|
|
|
95
96
|
## Code of Conduct
|
|
96
97
|
|
|
97
|
-
Everyone interacting in the Suika project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/suika/blob/
|
|
98
|
+
Everyone interacting in the Suika project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/suika/blob/main/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
|
@@ -1,6 +1,79 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
2
|
+
require 'rspec/core/rake_task'
|
|
3
|
+
|
|
4
|
+
require 'csv'
|
|
5
|
+
require 'dartsclone'
|
|
6
|
+
require 'nkf'
|
|
7
|
+
require 'rubygems/package'
|
|
8
|
+
require 'zlib'
|
|
3
9
|
|
|
4
10
|
RSpec::Core::RakeTask.new(:spec)
|
|
5
11
|
|
|
6
12
|
task :default => :spec
|
|
13
|
+
|
|
14
|
+
desc 'Build suika system dictionary'
|
|
15
|
+
task :dictionary do
|
|
16
|
+
base_dir = "#{__dir__}/dict/mecab-ipadic-2.7.0-20070801"
|
|
17
|
+
unless File.directory?(base_dir)
|
|
18
|
+
puts "Download mecab-ipadic file and expand that under dict directory: #{__dir__}/dict/mecab-ipadic-2.7.0-20070801"
|
|
19
|
+
puts
|
|
20
|
+
puts 'Example:'
|
|
21
|
+
puts 'wget -O dict/mecab-ipadic.tgz https://drive.google.com/uc?export=download&id=0B4y35FiV1wh7MWVlSDBCSXZMTXM'
|
|
22
|
+
puts 'cd dict'
|
|
23
|
+
puts 'tar xzf mecab-ipadic.tgz'
|
|
24
|
+
puts 'cd ../'
|
|
25
|
+
next # exit
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
File.open("#{__dir__}/dict/mecab-ipadic-2.7.0-20070801/Reiwa.csv", 'w') do |f|
|
|
29
|
+
f.puts('令和,1288,1288,5904,名詞,固有名詞,一般,*,*,*,令和,レイワ,レイワ')
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
unknowns = {}
|
|
33
|
+
File.open("#{base_dir}/unk.def") do |f|
|
|
34
|
+
f.each_line do |line|
|
|
35
|
+
row = NKF.nkf('-w', line.chomp).split(',')
|
|
36
|
+
unknowns[row[0]] ||= []
|
|
37
|
+
unknowns[row[0]] << [row[1].to_i, row[2].to_i, row[3].to_i, *row[4..-1]]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
dict = {}
|
|
42
|
+
Dir.glob("#{base_dir}/*.csv").each do |filename|
|
|
43
|
+
File.open(filename) do |f|
|
|
44
|
+
f.each_line do |line|
|
|
45
|
+
row = NKF.nkf('-w', line.chomp).split(',')
|
|
46
|
+
dict[row[0]] ||= []
|
|
47
|
+
dict[row[0]] << [row[1].to_i, row[2].to_i, row[3].to_i, *row[4..-1]]
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
da = DartsClone::DoubleArray.new
|
|
53
|
+
words = dict.keys.sort
|
|
54
|
+
da.build(words)
|
|
55
|
+
features = words.map { |w| dict[w] }
|
|
56
|
+
|
|
57
|
+
concosts = nil
|
|
58
|
+
File.open("#{base_dir}/matrix.def") do |f|
|
|
59
|
+
n_entries = f.readline.chomp.split.map(&:to_i).first
|
|
60
|
+
concosts = Array.new(n_entries) { Array.new(n_entries) }
|
|
61
|
+
f.each_line do |line|
|
|
62
|
+
row, col, cost = line.chomp.split.map(&:to_i)
|
|
63
|
+
concosts[row][col] = cost
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
ipadic = {
|
|
68
|
+
trie: da.get_array,
|
|
69
|
+
features: features,
|
|
70
|
+
unknowns: unknowns,
|
|
71
|
+
concosts: concosts
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
Zlib::GzipWriter.open("#{__dir__}/dict/sysdic.gz", Zlib::BEST_SPEED) { |f| f.write(Marshal.dump(ipadic)) }
|
|
75
|
+
|
|
76
|
+
puts 'The system dictionary has been successfully built:'
|
|
77
|
+
puts "#{__dir__}/dict/sysdic.gz"
|
|
78
|
+
puts Digest::SHA1.file("#{__dir__}/dict/sysdic.gz").to_s
|
|
79
|
+
end
|
data/Steepfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
target :lib do
|
|
2
|
+
signature "sig"
|
|
3
|
+
#
|
|
4
|
+
check "lib" # Directory name
|
|
5
|
+
# check "Gemfile" # File name
|
|
6
|
+
# check "app/models/**/*.rb" # Glob
|
|
7
|
+
# # ignore "lib/templates/*.rb"
|
|
8
|
+
#
|
|
9
|
+
# # library "pathname", "set" # Standard libraries
|
|
10
|
+
library "dartsclone" # Gems
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# target :spec do
|
|
14
|
+
# signature "sig", "sig-private"
|
|
15
|
+
#
|
|
16
|
+
# check "spec"
|
|
17
|
+
#
|
|
18
|
+
# # library "pathname", "set" # Standard libraries
|
|
19
|
+
# # library "rspec"
|
|
20
|
+
# end
|
data/dict/sysdic.gz
CHANGED
|
Binary file
|
data/lib/suika/tagger.rb
CHANGED
|
@@ -42,28 +42,30 @@ module Suika
|
|
|
42
42
|
while start < terminal
|
|
43
43
|
step = terminal - start
|
|
44
44
|
|
|
45
|
-
query = sentence[start..-1]
|
|
45
|
+
query = sentence[start..-1] || ''
|
|
46
46
|
result = trie.common_prefix_search(query)
|
|
47
47
|
unless result.empty?
|
|
48
48
|
words, indices = result
|
|
49
|
-
words.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
unless words.empty?
|
|
50
|
+
step = INT_MAX
|
|
51
|
+
words.each_with_index do |word, i|
|
|
52
|
+
features[indices[i]].each do |el|
|
|
53
|
+
lattice.insert(start, start + word.length, word, false, el[0].to_i, el[1].to_i, el[2].to_i, el[3..-1])
|
|
54
|
+
end
|
|
55
|
+
step = word.length if word.length < step
|
|
53
56
|
end
|
|
54
57
|
end
|
|
55
|
-
step = words.map(&:size).min
|
|
56
58
|
end
|
|
57
59
|
|
|
58
|
-
word = sentence[start]
|
|
59
|
-
char_cate = CharDef.char_category(sentence[start])
|
|
60
|
-
char_type = CharDef.char_type(sentence[start])
|
|
60
|
+
word = sentence[start] || ''
|
|
61
|
+
char_cate = CharDef.char_category(sentence[start] || '')
|
|
62
|
+
char_type = CharDef.char_type(sentence[start] || '')
|
|
61
63
|
if char_cate[:invoke]
|
|
62
|
-
|
|
63
|
-
unk_terminal =
|
|
64
|
+
unk_terminal = start + (char_cate[:group] ? CharDef::MAX_GROUPING_SIZE : char_cate[:length])
|
|
65
|
+
unk_terminal = terminal if terminal < unk_terminal
|
|
64
66
|
pos = start + 1
|
|
65
|
-
while pos < unk_terminal && char_type == CharDef.char_type(sentence[pos])
|
|
66
|
-
word << sentence[pos]
|
|
67
|
+
while pos < unk_terminal && char_type == CharDef.char_type(sentence[pos] || '')
|
|
68
|
+
word << (sentence[pos] || '')
|
|
67
69
|
pos += 1
|
|
68
70
|
end
|
|
69
71
|
end
|
|
@@ -71,7 +73,7 @@ module Suika
|
|
|
71
73
|
lattice.insert(start, start + word.length, word, true,
|
|
72
74
|
el[0].to_i, el[1].to_i, el[2].to_i, el[3..-1])
|
|
73
75
|
end
|
|
74
|
-
step =
|
|
76
|
+
step = word.length if word.length < step
|
|
75
77
|
|
|
76
78
|
start += step
|
|
77
79
|
end
|
|
@@ -82,7 +84,7 @@ module Suika
|
|
|
82
84
|
private
|
|
83
85
|
|
|
84
86
|
DICTIONARY_PATH = "#{__dir__}/../../dict/sysdic.gz"
|
|
85
|
-
DICTIONARY_KEY = '
|
|
87
|
+
DICTIONARY_KEY = 'eb921bf5e67f5733188527b21adbf9dabdda0c7a'
|
|
86
88
|
INT_MAX = 2**(([42].pack('i').size * 16) - 2) - 1
|
|
87
89
|
|
|
88
90
|
private_constant :DICTIONARY_PATH, :DICTIONARY_KEY, :INT_MAX
|
|
@@ -90,19 +92,19 @@ module Suika
|
|
|
90
92
|
attr_reader :trie
|
|
91
93
|
|
|
92
94
|
def features
|
|
93
|
-
@sysdic[:
|
|
95
|
+
@sysdic[:features]
|
|
94
96
|
end
|
|
95
97
|
|
|
96
98
|
def unknowns
|
|
97
|
-
@sysdic[:
|
|
99
|
+
@sysdic[:unknowns]
|
|
98
100
|
end
|
|
99
101
|
|
|
100
|
-
def
|
|
101
|
-
@sysdic[:
|
|
102
|
+
def connect_cost(r_id, l_id)
|
|
103
|
+
@sysdic[:concosts][r_id][l_id]
|
|
102
104
|
end
|
|
103
105
|
|
|
104
106
|
def viterbi(lattice)
|
|
105
|
-
bos = lattice.end_nodes[0]
|
|
107
|
+
bos = lattice.end_nodes[0][0]
|
|
106
108
|
bos.min_cost = 0
|
|
107
109
|
bos.min_prev = nil
|
|
108
110
|
|
|
@@ -111,7 +113,7 @@ module Suika
|
|
|
111
113
|
rnode.min_cost = INT_MAX
|
|
112
114
|
rnode.min_prev = nil
|
|
113
115
|
lattice.end_nodes[n].each do |lnode|
|
|
114
|
-
cost = lnode.min_cost +
|
|
116
|
+
cost = lnode.min_cost + connect_cost(lnode.right_id, rnode.left_id) + rnode.cost
|
|
115
117
|
if cost < rnode.min_cost
|
|
116
118
|
rnode.min_cost = cost
|
|
117
119
|
rnode.min_prev = lnode
|
|
@@ -120,7 +122,7 @@ module Suika
|
|
|
120
122
|
end
|
|
121
123
|
end
|
|
122
124
|
|
|
123
|
-
eos = lattice.begin_nodes[-1]
|
|
125
|
+
eos = lattice.begin_nodes[-1][0]
|
|
124
126
|
prev_node = eos.min_prev
|
|
125
127
|
res = []
|
|
126
128
|
until prev_node.nil?
|
data/lib/suika/version.rb
CHANGED
data/sig/suika.rbs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Suika
|
|
2
|
+
class CharDef
|
|
3
|
+
def self.char_type: (String ch) -> String
|
|
4
|
+
def self.char_category: (String ch) -> { invoke: bool, group: bool, length: Integer }
|
|
5
|
+
|
|
6
|
+
MAX_GROUPING_SIZE: Integer
|
|
7
|
+
|
|
8
|
+
private
|
|
9
|
+
|
|
10
|
+
#CHAR_CATEGORY: Hash[String, { invoke: bool, group: bool, length: Integer }]
|
|
11
|
+
CHAR_CATEGORY: Hash[String, untyped]
|
|
12
|
+
CHAR_TYPES: Array[String]
|
|
13
|
+
|
|
14
|
+
SPACE: Array[Range[Integer]]
|
|
15
|
+
NUMERIC: Array[Range[Integer]]
|
|
16
|
+
SYMBOL: Array[Range[Integer]]
|
|
17
|
+
ALPHA: Array[Range[Integer]]
|
|
18
|
+
CYRILLIC: Array[Range[Integer]]
|
|
19
|
+
GREEK: Array[Range[Integer]]
|
|
20
|
+
HIRAGANA: Array[Range[Integer]]
|
|
21
|
+
KATAKANA: Array[Range[Integer]]
|
|
22
|
+
KANJI: Array[Range[Integer]]
|
|
23
|
+
KANJINUMERIC: Array[Range[Integer]]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module Suika
|
|
2
|
+
class Lattice
|
|
3
|
+
attr_reader begin_nodes: Array[Array[::Suika::Node]]
|
|
4
|
+
attr_reader end_nodes: Array[Array[::Suika::Node]]
|
|
5
|
+
attr_reader length: Integer
|
|
6
|
+
|
|
7
|
+
def initialize: (Integer length) -> void
|
|
8
|
+
def insert: (Integer begin_id, Integer end_id, String surface, bool unknown,
|
|
9
|
+
Integer left_id, Integer right_id, Integer cost, Array[String] attrs) -> void
|
|
10
|
+
end
|
|
11
|
+
end
|
data/sig/suika/node.rbs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module Suika
|
|
2
|
+
class Node
|
|
3
|
+
attr_accessor surface: String
|
|
4
|
+
attr_accessor unknown: bool
|
|
5
|
+
attr_accessor min_cost: Integer
|
|
6
|
+
# attr_accessor min_prev: ::Suika::Node?
|
|
7
|
+
attr_accessor min_prev: untyped
|
|
8
|
+
attr_accessor left_id: Integer
|
|
9
|
+
attr_accessor right_id: Integer
|
|
10
|
+
attr_accessor cost: Integer
|
|
11
|
+
attr_accessor attrs: Array[String]
|
|
12
|
+
|
|
13
|
+
def initialize: (?surface: String surface, ?unknown: bool unknown,
|
|
14
|
+
?min_cost: Integer min_cost, ?min_prev: ::Suika::Node? min_prev,
|
|
15
|
+
?left_id: ::Integer left_id, ?right_id: ::Integer right_id,
|
|
16
|
+
?cost: ::Integer cost, ?attrs: Array[String] attrs) -> void
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Suika
|
|
2
|
+
class Tagger
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
def parse: (String sentence) -> Array[String]
|
|
5
|
+
|
|
6
|
+
private
|
|
7
|
+
|
|
8
|
+
DICTIONARY_PATH: String
|
|
9
|
+
DICTIONARY_KEY: String
|
|
10
|
+
INT_MAX: untyped
|
|
11
|
+
|
|
12
|
+
attr_reader trie: ::DartsClone::DoubleArray
|
|
13
|
+
|
|
14
|
+
# type feature = [Integer, Integer, Integer, String, String, String, String, String, String, String]
|
|
15
|
+
|
|
16
|
+
# def features: () -> Array[Array[feature]]
|
|
17
|
+
def features: () -> Array[Array[untyped]]
|
|
18
|
+
# def unknowns: () -> Hash[String, Array[feature]]
|
|
19
|
+
def unknowns: () -> Hash[String, Array[untyped]]
|
|
20
|
+
def connect_cost: (Integer r_id, Integer l_id) -> Integer
|
|
21
|
+
def viterbi: (::Suika::Lattice lattice) -> Array[String]
|
|
22
|
+
end
|
|
23
|
+
end
|
data/suika.gemspec
CHANGED
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
|
|
16
16
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
17
|
spec.metadata['source_code_uri'] = spec.homepage
|
|
18
|
-
spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/suika/blob/
|
|
18
|
+
spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/suika/blob/main/CHANGELOG.md'
|
|
19
19
|
spec.metadata['documentation_uri'] = 'https://rubydoc.info/gems/suika'
|
|
20
20
|
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: suika
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yoshoku
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dartsclone
|
|
@@ -31,18 +31,20 @@ executables: []
|
|
|
31
31
|
extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
|
33
33
|
files:
|
|
34
|
+
- ".coveralls.yml"
|
|
35
|
+
- ".github/workflows/build.yml"
|
|
36
|
+
- ".github/workflows/coverage.yml"
|
|
34
37
|
- ".gitignore"
|
|
35
38
|
- ".rspec"
|
|
36
39
|
- ".rubocop.yml"
|
|
37
|
-
- ".travis.yml"
|
|
38
40
|
- CHANGELOG.md
|
|
39
41
|
- CODE_OF_CONDUCT.md
|
|
40
42
|
- Gemfile
|
|
41
|
-
- Gemfile.lock
|
|
42
43
|
- LICENSE.txt
|
|
43
44
|
- NOTICE.txt
|
|
44
45
|
- README.md
|
|
45
46
|
- Rakefile
|
|
47
|
+
- Steepfile
|
|
46
48
|
- bin/console
|
|
47
49
|
- bin/setup
|
|
48
50
|
- dict/sysdic.gz
|
|
@@ -52,6 +54,11 @@ files:
|
|
|
52
54
|
- lib/suika/node.rb
|
|
53
55
|
- lib/suika/tagger.rb
|
|
54
56
|
- lib/suika/version.rb
|
|
57
|
+
- sig/suika.rbs
|
|
58
|
+
- sig/suika/char_def.rbs
|
|
59
|
+
- sig/suika/lattice.rbs
|
|
60
|
+
- sig/suika/node.rbs
|
|
61
|
+
- sig/suika/tagger.rbs
|
|
55
62
|
- suika.gemspec
|
|
56
63
|
homepage: https://github.com/yoshoku/suika
|
|
57
64
|
licenses:
|
|
@@ -59,9 +66,9 @@ licenses:
|
|
|
59
66
|
metadata:
|
|
60
67
|
homepage_uri: https://github.com/yoshoku/suika
|
|
61
68
|
source_code_uri: https://github.com/yoshoku/suika
|
|
62
|
-
changelog_uri: https://github.com/yoshoku/suika/blob/
|
|
69
|
+
changelog_uri: https://github.com/yoshoku/suika/blob/main/CHANGELOG.md
|
|
63
70
|
documentation_uri: https://rubydoc.info/gems/suika
|
|
64
|
-
post_install_message:
|
|
71
|
+
post_install_message:
|
|
65
72
|
rdoc_options: []
|
|
66
73
|
require_paths:
|
|
67
74
|
- lib
|
|
@@ -76,8 +83,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
76
83
|
- !ruby/object:Gem::Version
|
|
77
84
|
version: '0'
|
|
78
85
|
requirements: []
|
|
79
|
-
rubygems_version: 3.1.
|
|
80
|
-
signing_key:
|
|
86
|
+
rubygems_version: 3.1.6
|
|
87
|
+
signing_key:
|
|
81
88
|
specification_version: 4
|
|
82
89
|
summary: Suika is a Japanese morphological analyzer written in pure Ruby.
|
|
83
90
|
test_files: []
|
data/.travis.yml
DELETED
data/Gemfile.lock
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
suika (0.2.0)
|
|
5
|
-
dartsclone (>= 0.2.0)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
dartsclone (0.2.0)
|
|
11
|
-
diff-lcs (1.4.4)
|
|
12
|
-
rake (12.3.3)
|
|
13
|
-
rspec (3.9.0)
|
|
14
|
-
rspec-core (~> 3.9.0)
|
|
15
|
-
rspec-expectations (~> 3.9.0)
|
|
16
|
-
rspec-mocks (~> 3.9.0)
|
|
17
|
-
rspec-core (3.9.2)
|
|
18
|
-
rspec-support (~> 3.9.3)
|
|
19
|
-
rspec-expectations (3.9.2)
|
|
20
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
21
|
-
rspec-support (~> 3.9.0)
|
|
22
|
-
rspec-mocks (3.9.1)
|
|
23
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
24
|
-
rspec-support (~> 3.9.0)
|
|
25
|
-
rspec-support (3.9.3)
|
|
26
|
-
|
|
27
|
-
PLATFORMS
|
|
28
|
-
ruby
|
|
29
|
-
|
|
30
|
-
DEPENDENCIES
|
|
31
|
-
rake (~> 12.0)
|
|
32
|
-
rspec (~> 3.0)
|
|
33
|
-
suika!
|
|
34
|
-
|
|
35
|
-
BUNDLED WITH
|
|
36
|
-
2.1.2
|