mecab-heavy 0.996.1 → 0.996.2

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: e69b362e2214752e4967dcec97c1d7cbf5bd73f7
4
- data.tar.gz: 94ae7c66dbd725729267173db93ee955e07cf1be
3
+ metadata.gz: e2f646032c32712c20d13f3371a4b7eade991994
4
+ data.tar.gz: c63c6ef8422e09bad580a13ba328ded9dac02778
5
5
  SHA512:
6
- metadata.gz: 41b20517634cf31969e47bd6003f32ff2e212a6e9cf3e50002ec72f12f16bfaebcd667973d3b11f255a6c2d67b6237f0dbc780a042302d30a37fd5bdd3ff3ae6
7
- data.tar.gz: cd8529fd78cd33ce9f52dd4b9f571112b9bb8b7762cdc556c7e1365cc1cf361e5bb56042d195d54207361f4cc0bf595ff03de3448dce2a36b03b2dbd2545e074
6
+ metadata.gz: f7b6d62c9d49b88ef2dd7dd94081cfc80d3a6e197cfde1b236acc5ffb99d66c011e6c4aff624ead692577953074bd78ac5b40549d12116b64860de6034cf9533
7
+ data.tar.gz: 0aa5836044e117f511426222a92fd8313bec5513f74f65f98eb19e5b124f373257e0a6d8cb541cb4d9bce05e82af0d25b15e301ca23b1eb1ef3786670b4ebf6c
@@ -0,0 +1,11 @@
1
+ require_relative 'heavy/modular'
2
+
3
+ require 'mecab'
4
+
5
+ MeCab::Tagger.include(MeCab::Heavy::Extension::Tagger)
6
+
7
+ begin
8
+ require 'mecab/light'
9
+ MeCab::Light::Tagger.include(MeCab::Heavy::Extension::Light::Tagger)
10
+ rescue
11
+ end
@@ -0,0 +1,32 @@
1
+ module MeCab
2
+ module Heavy
3
+ DICTIONARY_PATH = File.expand_path(Dir.glob(__dir__ + "/../../../ext/mecab/ports/*/mecab/*/lib/mecab/dic/naist-jdic").first)
4
+
5
+ module Extension
6
+ module Tagger
7
+ def self.included(base)
8
+ base.class_eval do
9
+ alias initialize_before_mecab_heavy initialize
10
+ def initialize(argument = '')
11
+ p :here
12
+ initialize_before_mecab_heavy(argument + " -d #{::MeCab::Heavy::DICTIONARY_PATH}")
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+ module Light
19
+ module Tagger
20
+ def self.included(base)
21
+ base.class_eval do
22
+ alias initialize_before_mecab_heavy initialize
23
+ def initialize(argument = '')
24
+ initialize_before_mecab_heavy(argument + " -d #{::MeCab::Heavy::DICTIONARY_PATH}")
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mecab-heavy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.996.1
4
+ version: 0.996.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tadashi Saito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-28 00:00:00.000000000 Z
11
+ date: 2014-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_portile
@@ -66,6 +66,8 @@ files:
66
66
  - ext/mecab/mecab_wrap.cpp
67
67
  - ext/mecab/parallel_make.rb
68
68
  - ext/mecab/patch/prefix.patch
69
+ - lib/mecab/heavy.rb
70
+ - lib/mecab/heavy/modular.rb
69
71
  homepage: http://mecab.sourceforge.net/
70
72
  licenses:
71
73
  - BSD