mecab_standalone 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/lib/bin/mecab +0 -0
- data/lib/bin/mecab-config +125 -0
- data/lib/etc/mecabrc +16 -0
- data/lib/lib/mecab/dic/ipadic/char.bin +0 -0
- data/lib/lib/mecab/dic/ipadic/dicrc +29 -0
- data/lib/lib/mecab/dic/ipadic/left-id.def +1316 -0
- data/lib/lib/mecab/dic/ipadic/matrix.bin +0 -0
- data/lib/lib/mecab/dic/ipadic/pos-id.def +69 -0
- data/lib/lib/mecab/dic/ipadic/rewrite.def +94 -0
- data/lib/lib/mecab/dic/ipadic/right-id.def +1316 -0
- data/lib/lib/mecab/dic/ipadic/sys.dic +0 -0
- data/lib/lib/mecab/dic/ipadic/unk.dic +0 -0
- data/lib/mecab_standalone.rb +11 -0
- metadata +55 -0
Binary file
|
Binary file
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class MecabStandalone
|
2
|
+
LD_LIBRARY_PATH = File.join( $LOAD_PATH.grep(/mecab\_standalone\-/).first, 'lib' )
|
3
|
+
|
4
|
+
def self.reading(input, rcfile = "#{__dir__ }/etc/mecabrc", dic = "#{__dir__ }/lib/mecab/dic/ipadic/")
|
5
|
+
io = IO.popen({'LD_LIBRARY_PATH' => LD_LIBRARY_PATH},
|
6
|
+
"echo \"#{input}\" | #{__dir__ }/bin/mecab -r #{rcfile} -d #{dic} -Oyomi")
|
7
|
+
reading = io.read
|
8
|
+
io.close
|
9
|
+
reading
|
10
|
+
end
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mecab_standalone
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Taku Kudo
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-06-10 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple Mecab stand alone gem
|
14
|
+
email: taku@chasen.org
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/bin/mecab
|
20
|
+
- lib/bin/mecab-config
|
21
|
+
- lib/etc/mecabrc
|
22
|
+
- lib/lib/mecab/dic/ipadic/char.bin
|
23
|
+
- lib/lib/mecab/dic/ipadic/dicrc
|
24
|
+
- lib/lib/mecab/dic/ipadic/left-id.def
|
25
|
+
- lib/lib/mecab/dic/ipadic/matrix.bin
|
26
|
+
- lib/lib/mecab/dic/ipadic/pos-id.def
|
27
|
+
- lib/lib/mecab/dic/ipadic/rewrite.def
|
28
|
+
- lib/lib/mecab/dic/ipadic/right-id.def
|
29
|
+
- lib/lib/mecab/dic/ipadic/sys.dic
|
30
|
+
- lib/lib/mecab/dic/ipadic/unk.dic
|
31
|
+
- lib/mecab_standalone.rb
|
32
|
+
homepage: https://taku910.github.io/mecab/
|
33
|
+
licenses:
|
34
|
+
- MIT
|
35
|
+
metadata: {}
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options: []
|
38
|
+
require_paths:
|
39
|
+
- lib
|
40
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
requirements: []
|
51
|
+
rubygems_version: 3.1.2
|
52
|
+
signing_key:
|
53
|
+
specification_version: 4
|
54
|
+
summary: mecab_standalone
|
55
|
+
test_files: []
|