suika 0.2.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/LICENSE.txt +1 -1
- data/README.md +7 -9
- data/dict/sysdic.gz +0 -0
- data/lib/suika/tagger.rb +29 -23
- data/lib/suika/version.rb +1 -1
- 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 +24 -0
- data/sig/suika.rbs +3 -0
- metadata +10 -15
- data/.gitignore +0 -16
- data/.rspec +0 -3
- data/.rubocop.yml +0 -119
- data/.travis.yml +0 -12
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -36
- data/Rakefile +0 -6
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/suika.gemspec +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a03decb52a47468d332c6177131b627fd961c532077d6c92dbf66b8558d94a9d
|
4
|
+
data.tar.gz: 85c8f68c3772669dee4cdb7a8c1a2b3149936c96b391294deafa3e2fb3c6e66c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a277d7b595ad52d21e5d3ffc179e11bf555cf8ee0680c0f4d9ba77206ea77677208cd0c6b54342b8fc689c3213ae365a8802b58560e6dde4780f8352318b1c7
|
7
|
+
data.tar.gz: 0c5da3097be496973eb5b52e13a89e0d71d410972524a5a53e3f3e1eed8f98b21dd17cb7758c45297caabe5daab155111d53dc036b19ec40e38f05e1b65852d5
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## 0.3.2
|
2
|
+
|
3
|
+
- Refactor codes and configs with RuboCop.
|
4
|
+
|
5
|
+
## 0.3.1
|
6
|
+
- Fix Tagger's inspect method not to expand instance variables for object creation on irb and pry.
|
7
|
+
|
8
|
+
## 0.3.0
|
9
|
+
|
10
|
+
### Changes
|
11
|
+
- Add type declaration files.
|
12
|
+
- Refactor to avoid assigning null to variables.
|
13
|
+
- Fix some configuration files.
|
14
|
+
|
15
|
+
|
1
16
|
## 0.2.0
|
2
17
|
|
3
18
|
### Breaking Change
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# Suika
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/yoshoku/suika/workflows/build/badge.svg)](https://github.com/yoshoku/suika/actions?query=workflow%3Abuild)
|
4
|
+
[![Coverage Status](https://coveralls.io/repos/github/yoshoku/suika/badge.svg?branch=main)](https://coveralls.io/github/yoshoku/suika?branch=main)
|
4
5
|
[![Gem Version](https://badge.fury.io/rb/suika.svg)](https://badge.fury.io/rb/suika)
|
5
|
-
[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/suika/blob/
|
6
|
+
[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/suika/blob/main/LICENSE.txt)
|
6
7
|
[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://rubydoc.info/gems/suika)
|
7
8
|
|
8
9
|
Suika 🍉 is a Japanese morphological analyzer written in pure Ruby.
|
@@ -74,14 +75,15 @@ 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,
|
78
|
+
This project is intended to be a safe, welcoming space for collaboration,
|
79
|
+
and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
78
80
|
|
79
81
|
## License
|
80
82
|
|
81
83
|
The gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause).
|
82
84
|
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/
|
85
|
+
The details of the license can be found in [LICENSE.txt](https://github.com/yoshoku/suika/blob/main/LICENSE.txt)
|
86
|
+
and [NOTICE.txt](https://github.com/yoshoku/suika/blob/main/NOTICE.txt).
|
85
87
|
|
86
88
|
## Respect
|
87
89
|
|
@@ -91,7 +93,3 @@ Suika is created with reference to [the book on morphological analysis](https://
|
|
91
93
|
- [Tomoko Uchida](https://github.com/mocobeta) is the author of [Janome](https://github.com/mocobeta/janome) that is a Japanese morphological analysis engine written in pure Python.
|
92
94
|
Suika is heavily influenced by Janome's idea to include the built-in dictionary and language model.
|
93
95
|
Janome, a morphological analyzer written in scripting language, gives me the courage to develop Suika.
|
94
|
-
|
95
|
-
## Code of Conduct
|
96
|
-
|
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/master/CODE_OF_CONDUCT.md).
|
data/dict/sysdic.gz
CHANGED
Binary file
|
data/lib/suika/tagger.rb
CHANGED
@@ -34,7 +34,7 @@ module Suika
|
|
34
34
|
# Parse the given sentence.
|
35
35
|
# @param sentence [String] Japanese text to be parsed.
|
36
36
|
# @return [Array<String>]
|
37
|
-
def parse(sentence)
|
37
|
+
def parse(sentence) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
38
38
|
lattice = Lattice.new(sentence.length)
|
39
39
|
start = 0
|
40
40
|
terminal = sentence.length
|
@@ -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 # rubocop:disable Metrics/BlockNesting
|
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
|
@@ -79,10 +81,14 @@ module Suika
|
|
79
81
|
viterbi(lattice)
|
80
82
|
end
|
81
83
|
|
84
|
+
def inspect
|
85
|
+
to_s
|
86
|
+
end
|
87
|
+
|
82
88
|
private
|
83
89
|
|
84
90
|
DICTIONARY_PATH = "#{__dir__}/../../dict/sysdic.gz"
|
85
|
-
DICTIONARY_KEY = '
|
91
|
+
DICTIONARY_KEY = 'eb921bf5e67f5733188527b21adbf9dabdda0c7a'
|
86
92
|
INT_MAX = 2**(([42].pack('i').size * 16) - 2) - 1
|
87
93
|
|
88
94
|
private_constant :DICTIONARY_PATH, :DICTIONARY_KEY, :INT_MAX
|
@@ -90,19 +96,19 @@ module Suika
|
|
90
96
|
attr_reader :trie
|
91
97
|
|
92
98
|
def features
|
93
|
-
@sysdic[:
|
99
|
+
@sysdic[:features]
|
94
100
|
end
|
95
101
|
|
96
102
|
def unknowns
|
97
|
-
@sysdic[:
|
103
|
+
@sysdic[:unknowns]
|
98
104
|
end
|
99
105
|
|
100
|
-
def
|
101
|
-
@sysdic[:
|
106
|
+
def connect_cost(r_id, l_id)
|
107
|
+
@sysdic[:concosts][r_id][l_id]
|
102
108
|
end
|
103
109
|
|
104
110
|
def viterbi(lattice)
|
105
|
-
bos = lattice.end_nodes[0]
|
111
|
+
bos = lattice.end_nodes[0][0]
|
106
112
|
bos.min_cost = 0
|
107
113
|
bos.min_prev = nil
|
108
114
|
|
@@ -111,7 +117,7 @@ module Suika
|
|
111
117
|
rnode.min_cost = INT_MAX
|
112
118
|
rnode.min_prev = nil
|
113
119
|
lattice.end_nodes[n].each do |lnode|
|
114
|
-
cost = lnode.min_cost +
|
120
|
+
cost = lnode.min_cost + connect_cost(lnode.right_id, rnode.left_id) + rnode.cost
|
115
121
|
if cost < rnode.min_cost
|
116
122
|
rnode.min_cost = cost
|
117
123
|
rnode.min_prev = lnode
|
@@ -120,7 +126,7 @@ module Suika
|
|
120
126
|
end
|
121
127
|
end
|
122
128
|
|
123
|
-
eos = lattice.begin_nodes[-1]
|
129
|
+
eos = lattice.begin_nodes[-1][0]
|
124
130
|
prev_node = eos.min_prev
|
125
131
|
res = []
|
126
132
|
until prev_node.nil?
|
data/lib/suika/version.rb
CHANGED
@@ -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,24 @@
|
|
1
|
+
module Suika
|
2
|
+
class Tagger
|
3
|
+
def initialize: () -> void
|
4
|
+
def parse: (String sentence) -> Array[String]
|
5
|
+
def inspect: () -> String
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
DICTIONARY_PATH: String
|
10
|
+
DICTIONARY_KEY: String
|
11
|
+
INT_MAX: untyped
|
12
|
+
|
13
|
+
attr_reader trie: ::DartsClone::DoubleArray
|
14
|
+
|
15
|
+
# type feature = [Integer, Integer, Integer, String, String, String, String, String, String, String]
|
16
|
+
|
17
|
+
# def features: () -> Array[Array[feature]]
|
18
|
+
def features: () -> Array[Array[untyped]]
|
19
|
+
# def unknowns: () -> Hash[String, Array[feature]]
|
20
|
+
def unknowns: () -> Hash[String, Array[untyped]]
|
21
|
+
def connect_cost: (Integer r_id, Integer l_id) -> Integer
|
22
|
+
def viterbi: (::Suika::Lattice lattice) -> Array[String]
|
23
|
+
end
|
24
|
+
end
|
data/sig/suika.rbs
ADDED
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.2
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dartsclone
|
@@ -31,20 +31,10 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- ".gitignore"
|
35
|
-
- ".rspec"
|
36
|
-
- ".rubocop.yml"
|
37
|
-
- ".travis.yml"
|
38
34
|
- CHANGELOG.md
|
39
|
-
- CODE_OF_CONDUCT.md
|
40
|
-
- Gemfile
|
41
|
-
- Gemfile.lock
|
42
35
|
- LICENSE.txt
|
43
36
|
- NOTICE.txt
|
44
37
|
- README.md
|
45
|
-
- Rakefile
|
46
|
-
- bin/console
|
47
|
-
- bin/setup
|
48
38
|
- dict/sysdic.gz
|
49
39
|
- lib/suika.rb
|
50
40
|
- lib/suika/char_def.rb
|
@@ -52,15 +42,20 @@ files:
|
|
52
42
|
- lib/suika/node.rb
|
53
43
|
- lib/suika/tagger.rb
|
54
44
|
- lib/suika/version.rb
|
55
|
-
- suika.
|
45
|
+
- sig/suika.rbs
|
46
|
+
- sig/suika/char_def.rbs
|
47
|
+
- sig/suika/lattice.rbs
|
48
|
+
- sig/suika/node.rbs
|
49
|
+
- sig/suika/tagger.rbs
|
56
50
|
homepage: https://github.com/yoshoku/suika
|
57
51
|
licenses:
|
58
52
|
- BSD-3-Clause
|
59
53
|
metadata:
|
60
54
|
homepage_uri: https://github.com/yoshoku/suika
|
61
55
|
source_code_uri: https://github.com/yoshoku/suika
|
62
|
-
changelog_uri: https://github.com/yoshoku/suika/blob/
|
56
|
+
changelog_uri: https://github.com/yoshoku/suika/blob/main/CHANGELOG.md
|
63
57
|
documentation_uri: https://rubydoc.info/gems/suika
|
58
|
+
rubygems_mfa_required: 'true'
|
64
59
|
post_install_message:
|
65
60
|
rdoc_options: []
|
66
61
|
require_paths:
|
@@ -76,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
71
|
- !ruby/object:Gem::Version
|
77
72
|
version: '0'
|
78
73
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
74
|
+
rubygems_version: 3.2.33
|
80
75
|
signing_key:
|
81
76
|
specification_version: 4
|
82
77
|
summary: Suika is a Japanese morphological analyzer written in pure Ruby.
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
require:
|
2
|
-
- rubocop-performance
|
3
|
-
- rubocop-rspec
|
4
|
-
|
5
|
-
AllCops:
|
6
|
-
NewCops: enable
|
7
|
-
TargetRubyVersion: 2.5
|
8
|
-
DisplayCopNames: true
|
9
|
-
DisplayStyleGuide: true
|
10
|
-
Exclude:
|
11
|
-
- 'bin/*'
|
12
|
-
- 'suika.gemspec'
|
13
|
-
- 'Rakefile'
|
14
|
-
- 'Gemfile'
|
15
|
-
|
16
|
-
Layout/EmptyLineAfterGuardClause:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
Layout/EmptyLinesAroundAttributeAccessor:
|
20
|
-
Enabled: true
|
21
|
-
|
22
|
-
Layout/LineLength:
|
23
|
-
Max: 145
|
24
|
-
IgnoredPatterns: ['(\A|\s)#']
|
25
|
-
|
26
|
-
Layout/SpaceAroundMethodCallOperator:
|
27
|
-
Enabled: true
|
28
|
-
|
29
|
-
Lint/DeprecatedOpenSSLConstant:
|
30
|
-
Enabled: true
|
31
|
-
|
32
|
-
Lint/MixedRegexpCaptureTypes:
|
33
|
-
Enabled: true
|
34
|
-
|
35
|
-
Lint/RaiseException:
|
36
|
-
Enabled: true
|
37
|
-
|
38
|
-
Lint/StructNewOverride:
|
39
|
-
Enabled: true
|
40
|
-
|
41
|
-
Metrics/ModuleLength:
|
42
|
-
Max: 200
|
43
|
-
|
44
|
-
Metrics/ClassLength:
|
45
|
-
Max: 200
|
46
|
-
|
47
|
-
Metrics/MethodLength:
|
48
|
-
Max: 50
|
49
|
-
|
50
|
-
Metrics/AbcSize:
|
51
|
-
Max: 60
|
52
|
-
|
53
|
-
Metrics/CyclomaticComplexity:
|
54
|
-
Max: 16
|
55
|
-
|
56
|
-
Metrics/PerceivedComplexity:
|
57
|
-
Max: 16
|
58
|
-
|
59
|
-
Metrics/BlockLength:
|
60
|
-
Max: 40
|
61
|
-
Exclude:
|
62
|
-
- 'spec/**/*'
|
63
|
-
|
64
|
-
Metrics/ParameterLists:
|
65
|
-
Max: 12
|
66
|
-
|
67
|
-
Naming/MethodParameterName:
|
68
|
-
Enabled: false
|
69
|
-
|
70
|
-
Naming/ConstantName:
|
71
|
-
Enabled: false
|
72
|
-
|
73
|
-
Security/MarshalLoad:
|
74
|
-
Enabled: false
|
75
|
-
|
76
|
-
Style/AsciiComments:
|
77
|
-
Enabled: false
|
78
|
-
|
79
|
-
Style/Documentation:
|
80
|
-
Enabled: false
|
81
|
-
|
82
|
-
Style/ExponentialNotation:
|
83
|
-
Enabled: true
|
84
|
-
|
85
|
-
Style/HashEachMethods:
|
86
|
-
Enabled: true
|
87
|
-
|
88
|
-
Style/HashTransformKeys:
|
89
|
-
Enabled: true
|
90
|
-
|
91
|
-
Style/HashTransformValues:
|
92
|
-
Enabled: true
|
93
|
-
|
94
|
-
Style/RedundantRegexpCharacterClass:
|
95
|
-
Enabled: true
|
96
|
-
|
97
|
-
Style/RedundantRegexpEscape:
|
98
|
-
Enabled: true
|
99
|
-
|
100
|
-
Style/SlicingWithRange:
|
101
|
-
Enabled: true
|
102
|
-
|
103
|
-
Style/FormatStringToken:
|
104
|
-
Enabled: false
|
105
|
-
|
106
|
-
Style/NumericLiterals:
|
107
|
-
Enabled: false
|
108
|
-
|
109
|
-
RSpec/MultipleExpectations:
|
110
|
-
Enabled: false
|
111
|
-
|
112
|
-
RSpec/ExampleLength:
|
113
|
-
Max: 40
|
114
|
-
|
115
|
-
RSpec/InstanceVariable:
|
116
|
-
Enabled: false
|
117
|
-
|
118
|
-
RSpec/LeakyConstantDeclaration:
|
119
|
-
Enabled: false
|
data/.travis.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at yoshoku@outlook.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: https://contributor-covenant.org
|
74
|
-
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
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
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "suika"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/suika.gemspec
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'lib/suika/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = 'suika'
|
7
|
-
spec.version = Suika::VERSION
|
8
|
-
spec.authors = ['yoshoku']
|
9
|
-
spec.email = ['yoshoku@outlook.com']
|
10
|
-
|
11
|
-
spec.summary = 'Suika is a Japanese morphological analyzer written in pure Ruby.'
|
12
|
-
spec.description = 'Suika is a Japanese morphological analyzer written in pure Ruby.'
|
13
|
-
spec.homepage = 'https://github.com/yoshoku/suika'
|
14
|
-
spec.license = 'BSD-3-Clause'
|
15
|
-
|
16
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
17
|
-
spec.metadata['source_code_uri'] = spec.homepage
|
18
|
-
spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/suika/blob/master/CHANGELOG.md'
|
19
|
-
spec.metadata['documentation_uri'] = 'https://rubydoc.info/gems/suika'
|
20
|
-
|
21
|
-
# Specify which files should be added to the gem when it is released.
|
22
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
-
end
|
26
|
-
spec.bindir = 'exe'
|
27
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
-
spec.require_paths = ['lib']
|
29
|
-
|
30
|
-
spec.add_runtime_dependency 'dartsclone', '>= 0.2.0'
|
31
|
-
end
|