utanone 0.1.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 +7 -0
- data/.env.sample +1 -0
- data/.rspec +3 -0
- data/.rubocop.yml +50 -0
- data/CHANGELOG.md +2 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +85 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/utanone/uta.rb +122 -0
- data/lib/utanone/utanone.rb +7 -0
- data/lib/utanone/version.rb +5 -0
- data/utanone.gemspec +39 -0
- metadata +145 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ca2cf7d743435c6d391f6640733aa4df39459874837eedafc9563b6450c0cd43
|
4
|
+
data.tar.gz: b962d0cfd06c692f351b03b66d4a880118498cdd925a1464beeec45b1bb3817b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bdab2b8bf25ad48447b7f20751a6209b8ed3ee6c955d634d5f857ea535156095f55482e3da36732962175f8daabb716b3fd6c2cfe01b8978aee31cf113721422
|
7
|
+
data.tar.gz: 760648236b6d36a216fc9e881b3436e2b85e2e42208577f729a450fc2ad30174d0b7dd00bfc95ce43cc9c85174f57ea01be519e9558507f5e4ab11742d57b378
|
data/.env.sample
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
MECAB_PATH=/usr/local/Cellar/mecab/0.996/lib/libmecab.dylib
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 3.0.1
|
3
|
+
Exclude:
|
4
|
+
- Gemfile
|
5
|
+
- "*.md"
|
6
|
+
- "*.text"
|
7
|
+
- utanone.gemspec
|
8
|
+
- "bin/*"
|
9
|
+
- Rakefile
|
10
|
+
- "vendor/**/*"
|
11
|
+
- "tmp/**/*"
|
12
|
+
NewCops: enable
|
13
|
+
|
14
|
+
Style/StringLiterals:
|
15
|
+
Enabled: true
|
16
|
+
EnforcedStyle: single_quotes
|
17
|
+
|
18
|
+
Style/StringLiteralsInInterpolation:
|
19
|
+
Enabled: true
|
20
|
+
EnforcedStyle: single_quotes
|
21
|
+
|
22
|
+
Style/ConditionalAssignment:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/AsciiComments:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/FrozenStringLiteralComment:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Layout/LineLength:
|
32
|
+
Max: 150
|
33
|
+
|
34
|
+
Metrics/MethodLength:
|
35
|
+
Enabled: true
|
36
|
+
Max: 20
|
37
|
+
|
38
|
+
Metrics/CyclomaticComplexity:
|
39
|
+
Enabled: true
|
40
|
+
Max: 8
|
41
|
+
|
42
|
+
Metrics/AbcSize:
|
43
|
+
Enabled: true
|
44
|
+
Max: 20
|
45
|
+
|
46
|
+
Metrics/BlockLength:
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Documentation:
|
50
|
+
Enabled: false
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at yuriko11d@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 yuko yuri
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# Utanone
|
2
|
+
|
3
|
+
Utanone(歌の音) is a helper for creating tanka/haiku poems in Japanese.
|
4
|
+
|
5
|
+
形態素解析エンジン[MeCab](https://taku910.github.io/mecab/)を使用して、入力した短歌/俳句の音数をカウントします。
|
6
|
+
|
7
|
+
## Requirements
|
8
|
+
- [MeCab 0.996](http://taku910.github.io/mecab/)
|
9
|
+
- MeCabのインストールは [mecab](https://github.com/markburns/mecab)を参考にしてください
|
10
|
+
- Ruby 2.7 or greater
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem install utanone
|
16
|
+
```
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
### MECAB_PATH の設定
|
20
|
+
`MECAB_PATH` を設定する必要があります。
|
21
|
+
|
22
|
+
```
|
23
|
+
ENV['MECAB_PATH']='/usr/local/lib/libmecab.so'
|
24
|
+
```
|
25
|
+
|
26
|
+
### Uta インスタンスの生成(ref_utaの指定なし)
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'utanone'
|
30
|
+
|
31
|
+
uta = Utanone::Uta.new('あっつい夏の日、3時にアイスクリームを食べちゃったね')
|
32
|
+
```
|
33
|
+
|
34
|
+
### #yomigana
|
35
|
+
|
36
|
+
よみがなを返します。
|
37
|
+
```ruby
|
38
|
+
uta.yomigana #=> "アッツイナツノヒ、サンジニアイスクリームヲタベチャッタネ"
|
39
|
+
```
|
40
|
+
|
41
|
+
### #count
|
42
|
+
|
43
|
+
文字数をカウントします。
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
uta.count #=> 27
|
47
|
+
```
|
48
|
+
|
49
|
+
引数に `tanka: true` を渡すことで短歌、俳句での音数をカウントします。
|
50
|
+
(`ァ、ィ、ォ、ャ、ュ、ョ` は音数としてカウントしません。`ッ` は音数としてカウントします。)
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
uta.count(tanka: true) #=> 26
|
54
|
+
```
|
55
|
+
|
56
|
+
### #correct
|
57
|
+
よみがなが形態素解析の結果と異なる場合によみがなを訂正できます。戻り値としてよみがなを訂正したUtaインスタンスを返却します。
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
uta = Utanone::Uta.new('午前四時の灯')
|
61
|
+
uta.yomigana #=> ゴゼンヨンジノアカリ
|
62
|
+
corrected_uta = uta.correct(correct_yomigana: 'ゴゼンヨジノトモシビ')
|
63
|
+
corrected_uta.yomigana #=> ゴゼンヨジノトモシビ
|
64
|
+
```
|
65
|
+
|
66
|
+
### Uta インスタンスの生成(ref_utaの指定あり)
|
67
|
+
第2引数にref_utaを指定することで、ref_utaが保持しているよみがなを優先して、よみがなを設定します。
|
68
|
+
|
69
|
+
下記の例文では形態素解析の結果では「四」は「ヨ」、「灯」は「アカリ」とよみがなが設定されます。
|
70
|
+
|
71
|
+
よみがなをそれぞれ「ヨン」、「トモシビ」と修正したUtaインスタンスをref_utaとして第二引数に渡すことで、形態素として「四」「灯」が含まれる場合によみがなを「ヨン」、「トモシビ」として返却します。
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
uta = Utanone::Uta.new('午前四時の灯')
|
75
|
+
uta.yomigana #=> "ゴゼンヨンジノアカリ"
|
76
|
+
ref_uta = uta.correct(correct_yomigana: 'ゴゼンヨジノトモシビ')
|
77
|
+
ref_uta.yomigana #=> "ゴゼンヨジノトモシビ"
|
78
|
+
|
79
|
+
uta2 = Utanone::Uta.new('灯が見える午前四時', ref_uta)
|
80
|
+
uta2.yomigana #=> "トモシビガミエルゴゼンヨジ"
|
81
|
+
```
|
82
|
+
|
83
|
+
## License
|
84
|
+
|
85
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "utanone"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/utanone/uta.rb
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'natto'
|
4
|
+
module Utanone
|
5
|
+
class Uta
|
6
|
+
attr_reader :original_str, :parsed_morphemes
|
7
|
+
|
8
|
+
EXCLUDING_COUNTING_RUBY_BY_TANKA = /ァ|ィ|ォ|ャ|ュ|ョ/
|
9
|
+
EXCLUDING_COUNTING_LEXICAL_CATEGORIES = %w[記号].freeze
|
10
|
+
|
11
|
+
def initialize(str, ref_uta = nil)
|
12
|
+
@original_str = str
|
13
|
+
@parsed_morphemes = parse_to_hash(str, ref_uta)
|
14
|
+
end
|
15
|
+
|
16
|
+
def yomigana
|
17
|
+
@parsed_morphemes.map { _1[:ruby] }.join
|
18
|
+
end
|
19
|
+
|
20
|
+
def count(tanka: false)
|
21
|
+
words_hash_without_symbol = @parsed_morphemes.reject{ Utanone::Uta::EXCLUDING_COUNTING_LEXICAL_CATEGORIES.include?(_1[:lexical_category]) }
|
22
|
+
count_size = 0
|
23
|
+
words_hash_without_symbol.each do |h|
|
24
|
+
if tanka
|
25
|
+
# tanka オプションを入れた場合は ァ|ィ|ォ|ャ|ュ|ョ は音数に数えない
|
26
|
+
count_size += h[:ruby].size - h[:ruby].scan(Utanone::Uta::EXCLUDING_COUNTING_RUBY_BY_TANKA).size
|
27
|
+
else
|
28
|
+
count_size += h[:ruby].size
|
29
|
+
end
|
30
|
+
end
|
31
|
+
count_size
|
32
|
+
end
|
33
|
+
|
34
|
+
def correct(correct_yomigana:) # rubocop:disable Metrics/AbcSize
|
35
|
+
return self if yomigana == correct_yomigana
|
36
|
+
|
37
|
+
# 訂正したよみがなで再作成したUtaインスタンスを作成するので、一旦コピーする
|
38
|
+
corrected_uta = Uta.new(@original_str)
|
39
|
+
|
40
|
+
corrected_uta.parsed_morphemes.each_with_index do |morpheme, i|
|
41
|
+
# 形態素ごとによみがなの修正が必要であれば修正する
|
42
|
+
if correct_yomigana[0, morpheme[:ruby].size] == morpheme[:ruby]
|
43
|
+
# よみがなが一致したらそのまま処理を続行する
|
44
|
+
# 比較したよみがな部分は訂正済みよみがなから削除する
|
45
|
+
correct_yomigana.slice!(0, morpheme[:ruby].size)
|
46
|
+
next
|
47
|
+
else
|
48
|
+
# よみがなが不一致なら修正する
|
49
|
+
next_morpheme = corrected_uta.parsed_morphemes[i + 1]
|
50
|
+
if next_morpheme
|
51
|
+
# 修正済みよみがなから次の形態素に一致する箇所を探すことで修正したい形態素のよみがなを取得する
|
52
|
+
next_morpheme_start = correct_yomigana.index(next_morpheme[:ruby])
|
53
|
+
|
54
|
+
# 一致箇所がなければ修正ができないものとして処理を中断する(よみがな不一致が連続すると修正できない)
|
55
|
+
# TODO: 再帰を使って連続したよみがな不一致も修正できないか
|
56
|
+
break unless next_morpheme_start
|
57
|
+
|
58
|
+
# 取得できた場合は修正する
|
59
|
+
morpheme[:ruby] = correct_yomigana[0, next_morpheme_start]
|
60
|
+
correct_yomigana.slice!(0, morpheme[:ruby].size)
|
61
|
+
else
|
62
|
+
# 最後の形態素だった時
|
63
|
+
morpheme[:ruby] = correct_yomigana
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
corrected_uta
|
68
|
+
end
|
69
|
+
|
70
|
+
private
|
71
|
+
|
72
|
+
def parse_to_hash(str, ref_uta)
|
73
|
+
parsed_str_enum = natto.enum_parse(conversion_number(str))
|
74
|
+
|
75
|
+
parsed_str_enum.each_with_object([]) do |result, array|
|
76
|
+
next if result.is_eos?
|
77
|
+
|
78
|
+
morpheme = separated_element(result)
|
79
|
+
|
80
|
+
if ref_uta
|
81
|
+
# ref_utaとして参照するUtaオブジェクトが渡されている場合は読みを参照するUtaオブジェクトから取得する
|
82
|
+
ref_morpheme = ref_uta.parsed_morphemes.find { _1[:word] == morpheme[:word] }
|
83
|
+
morpheme[:ruby] = ref_morpheme[:ruby] if ref_morpheme
|
84
|
+
end
|
85
|
+
|
86
|
+
raise Utanone::ParseError unless morpheme[:ruby]
|
87
|
+
|
88
|
+
array << morpheme
|
89
|
+
end
|
90
|
+
rescue Natto::MeCabError
|
91
|
+
raise Utanone::ParseError
|
92
|
+
end
|
93
|
+
|
94
|
+
def conversion_number(str)
|
95
|
+
# 半角数字を全角数字にしないと読みが取れないので変換する
|
96
|
+
str.tr('0-9a-zA-Z', '0-9a-zA-Z')
|
97
|
+
end
|
98
|
+
|
99
|
+
def separated_element(result)
|
100
|
+
# 形態素
|
101
|
+
word = result.surface
|
102
|
+
|
103
|
+
splited_result = result.feature.split(/\t|,/)
|
104
|
+
|
105
|
+
# 品詞
|
106
|
+
lexical_category = splited_result[0]
|
107
|
+
|
108
|
+
# 読み
|
109
|
+
ruby = splited_result[7]
|
110
|
+
|
111
|
+
{
|
112
|
+
word: word,
|
113
|
+
ruby: ruby,
|
114
|
+
lexical_category: lexical_category
|
115
|
+
}
|
116
|
+
end
|
117
|
+
|
118
|
+
def natto
|
119
|
+
@natto ||= Natto::MeCab.new
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
data/utanone.gemspec
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/utanone/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'utanone'
|
7
|
+
spec.version = Utanone::VERSION
|
8
|
+
spec.authors = ['yuriko1211']
|
9
|
+
spec.email = ['yuriko11d@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Utanone is a helper that counts the number of sounds in Japanese sentences.'
|
12
|
+
spec.description = 'Utanone is a helper that counts the number of sounds in Japanese sentences.'
|
13
|
+
spec.homepage = 'https://github.com/yuriko1211/utanone'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.required_ruby_version = '>= 2.7.0'
|
16
|
+
|
17
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/yuriko1211/utanone'
|
19
|
+
spec.metadata['changelog_uri'] = 'https://github.com/yuriko1211/utanone/blob/main/CHANGELOG.md'
|
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 do |f|
|
25
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
26
|
+
end
|
27
|
+
end
|
28
|
+
spec.bindir = 'exe'
|
29
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
|
+
spec.require_paths = ['lib']
|
31
|
+
|
32
|
+
spec.add_dependency 'mecab', '~> 0.996'
|
33
|
+
spec.add_dependency 'natto', '~> 1.2.0'
|
34
|
+
|
35
|
+
spec.add_development_dependency 'dotenv'
|
36
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
37
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
38
|
+
spec.add_development_dependency 'rubocop', '~> 1.7'
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: utanone
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- yuriko1211
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-09-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mecab
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.996'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.996'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: natto
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.2.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: dotenv
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.7'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.7'
|
97
|
+
description: Utanone is a helper that counts the number of sounds in Japanese sentences.
|
98
|
+
email:
|
99
|
+
- yuriko11d@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".env.sample"
|
105
|
+
- ".rspec"
|
106
|
+
- ".rubocop.yml"
|
107
|
+
- CHANGELOG.md
|
108
|
+
- CODE_OF_CONDUCT.md
|
109
|
+
- Gemfile
|
110
|
+
- LICENSE.txt
|
111
|
+
- README.md
|
112
|
+
- Rakefile
|
113
|
+
- bin/console
|
114
|
+
- bin/setup
|
115
|
+
- lib/utanone/uta.rb
|
116
|
+
- lib/utanone/utanone.rb
|
117
|
+
- lib/utanone/version.rb
|
118
|
+
- utanone.gemspec
|
119
|
+
homepage: https://github.com/yuriko1211/utanone
|
120
|
+
licenses:
|
121
|
+
- MIT
|
122
|
+
metadata:
|
123
|
+
homepage_uri: https://github.com/yuriko1211/utanone
|
124
|
+
source_code_uri: https://github.com/yuriko1211/utanone
|
125
|
+
changelog_uri: https://github.com/yuriko1211/utanone/blob/main/CHANGELOG.md
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options: []
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: 2.7.0
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
requirements: []
|
141
|
+
rubygems_version: 3.2.15
|
142
|
+
signing_key:
|
143
|
+
specification_version: 4
|
144
|
+
summary: Utanone is a helper that counts the number of sounds in Japanese sentences.
|
145
|
+
test_files: []
|