ikku 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79df566316fda67742d5436f512a1f2af79e983d
4
- data.tar.gz: 36756a87a838820552d9a97af879adfa2af34eb3
3
+ metadata.gz: 0a0d5455fb93360c656c0480fce5ad87fabbcf9c
4
+ data.tar.gz: a75862728812464a80e1bfcf5ec6fefa0a3a7c28
5
5
  SHA512:
6
- metadata.gz: d12c3b71223808be5d66209e7a35a9ab234348feec050944bea2278aac45e592a9913bf2ed0245b44da78b930a9cbf7070290976b6fd7f500ee247150979cf28
7
- data.tar.gz: f4a5017c40e2b5f68843bab47e18b653dff24ffcf726a8594f4e113aa0d036b49ef353b50629047016ae3d2d3fe496478c3ff8d589e6720b0d17543d8729a720
6
+ metadata.gz: 03aad731656adb2308f22025eccbf6a4a7937350ec81a6f90b6835c3896eaf7728ace6dd3e521287c9c72f438cbfac9f5224dcf78341cb4697b765e11b58d675
7
+ data.tar.gz: c7278be5bc4c5ce7bc2dfd4eb96a75034d9dd52e14f3d934b7fcc95cb6de2f953a8a46dcc071ee6ca2942508e81be743e710ef8098051f6b66794fff0eae54c2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.0.9
2
+ - Don't allow ikku ending with 連用タ接続
3
+
1
4
  ## 0.0.8
2
5
  - Don't allow ikku starting with no pronounciation length node
3
6
 
data/lib/ikku/node.rb CHANGED
@@ -20,6 +20,14 @@ module Ikku
20
20
  stat == STAT_ID_FOR_BOS
21
21
  end
22
22
 
23
+ def conjugation1
24
+ feature[4]
25
+ end
26
+
27
+ def conjugation2
28
+ feature[5]
29
+ end
30
+
23
31
  def eos?
24
32
  stat == STAT_ID_FOR_EOS
25
33
  end
@@ -61,7 +69,14 @@ module Ikku
61
69
  end
62
70
 
63
71
  def last_of_ikku?
64
- !["名詞接続", "格助詞", "係助詞", "連体化", "接続助詞", "並立助詞", "副詞化", "数接続", "連体詞"].include?(type)
72
+ case
73
+ when ["名詞接続", "格助詞", "係助詞", "連体化", "接続助詞", "並立助詞", "副詞化", "数接続", "連体詞"].include?(type)
74
+ false
75
+ when conjugation2 == "連用タ接続"
76
+ false
77
+ else
78
+ true
79
+ end
65
80
  end
66
81
 
67
82
  def last_of_phrase?
data/lib/ikku/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ikku
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -107,6 +107,14 @@ RSpec.describe Ikku::Reviewer do
107
107
 
108
108
  it { is_expected.to be false }
109
109
  end
110
+
111
+ context "with ikku ending with 連用タ接続 (撮っ)" do
112
+ let(:text) do
113
+ "新宿の桜と庭の写真撮っ"
114
+ end
115
+
116
+ it { is_expected.to be false }
117
+ end
110
118
  end
111
119
 
112
120
  describe "#search" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ikku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: natto