mecab-heavy 0.996.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,39 @@
1
+ # from: https://github.com/grosser/parallel/blob/master/lib/parallel.rb
2
+ def processor_count
3
+ os_name = RbConfig::CONFIG["target_os"]
4
+ if os_name =~ /mingw|mswin/
5
+ require 'win32ole'
6
+ result = WIN32OLE.connect("winmgmts://").
7
+ ExecQuery("select NumberOfLogicalProcessors from Win32_Processor")
8
+ result.to_enum.collect(&:NumberOfLogicalProcessors).reduce(:+)
9
+ elsif File.readable?("/proc/cpuinfo")
10
+ IO.read("/proc/cpuinfo").scan(/^processor/).size
11
+ elsif File.executable?("/usr/bin/hwprefs")
12
+ IO.popen("/usr/bin/hwprefs thread_count").read.to_i
13
+ elsif File.executable?("/usr/sbin/psrinfo")
14
+ IO.popen("/usr/sbin/psrinfo").read.scan(/^.*on-*line/).size
15
+ elsif File.executable?("/usr/sbin/ioscan")
16
+ IO.popen("/usr/sbin/ioscan -kC processor") do |out|
17
+ out.read.scan(/^.*processor/).size
18
+ end
19
+ elsif File.executable?("/usr/sbin/pmcycles")
20
+ IO.popen("/usr/sbin/pmcycles -m").read.count("\n")
21
+ elsif File.executable?("/usr/sbin/lsdev")
22
+ IO.popen("/usr/sbin/lsdev -Cc processor -S 1").read.count("\n")
23
+ elsif File.executable?("/usr/sbin/sysconf") and os_name =~ /irix/i
24
+ IO.popen("/usr/sbin/sysconf NPROC_ONLN").read.to_i
25
+ elsif File.executable?("/usr/sbin/sysctl")
26
+ IO.popen("/usr/sbin/sysctl -n hw.ncpu").read.to_i
27
+ elsif File.executable?("/sbin/sysctl")
28
+ IO.popen("/sbin/sysctl -n hw.ncpu").read.to_i
29
+ else
30
+ 1
31
+ end
32
+ end
33
+
34
+ class MiniPortile
35
+ def make_cmd
36
+ "make -j#{processor_count+1}"
37
+ end
38
+ end
39
+
@@ -0,0 +1,18 @@
1
+ --- Makefile.in.orig 2014-06-26 07:17:04.385962877 +0900
2
+ +++ Makefile.in 2014-06-26 07:17:39.313474839 +0900
3
+ @@ -512,11 +512,11 @@ export-package:
4
+ ./upload.pl -p mecab -n @PACKAGE@ -r @VERSION@ -f @PACKAGE@-@VERSION@.tar.gz
5
+
6
+ install-exec-hook:
7
+ - if ! [ -d $(DESTDIR)/etc/mecab/dic/naist-jdic ]; \
8
+ - then mkdir -p $(DESTDIR)/etc/mecab/dic/naist-jdic; \
9
+ + if ! [ -d ${prefix}/etc/mecab/dic/naist-jdic ]; \
10
+ + then mkdir -p ${prefix}/etc/mecab/dic/naist-jdic; \
11
+ fi
12
+ - if ! [ -f $(DESTDIR)/etc/mecab/dic/naist-jdic/dicrc ]; \
13
+ - then $(LN_S) @MECAB_DICDIR@/dicrc $(DESTDIR)/etc/mecab/dic/naist-jdic/dicrc; \
14
+ + if ! [ -f ${prefix}/etc/mecab/dic/naist-jdic/dicrc ]; \
15
+ + then $(LN_S) @MECAB_DICDIR@/dicrc ${prefix}/etc/mecab/dic/naist-jdic/dicrc; \
16
+ fi
17
+
18
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mecab-heavy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.996.1
5
+ platform: ruby
6
+ authors:
7
+ - Tadashi Saito
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mini_portile
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake-compiler
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
+ description: |
56
+ Ruby bindings for MeCab, a morphological analyzer,
57
+ with libmecab and naist-jdic so that you can use easily at Heroku
58
+ email: tad.a.digger@gmail.com
59
+ executables: []
60
+ extensions:
61
+ - ext/mecab/extconf.rb
62
+ extra_rdoc_files: []
63
+ files:
64
+ - examples/test.rb
65
+ - ext/mecab/extconf.rb
66
+ - ext/mecab/mecab_wrap.cpp
67
+ - ext/mecab/parallel_make.rb
68
+ - ext/mecab/patch/prefix.patch
69
+ homepage: http://mecab.sourceforge.net/
70
+ licenses:
71
+ - BSD
72
+ - GPL
73
+ - LGPL
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.3.0
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Ruby bindings for MeCab, with libmecab and naist-jdic for utility.
95
+ test_files:
96
+ - examples/test.rb