sekka 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <classpath>
3
+ <classpathentry kind="src" path="src"/>
4
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5
+ <classpathentry kind="lib" path="C:/tmp/eclipse-collections-8.2.0.jar"/>
6
+ <classpathentry kind="lib" path="C:/tmp/eclipse-collections-api-8.2.0.jar"/>
7
+ <classpathentry kind="lib" path="C:/tmp/elsa-3.0.0-M7.jar"/>
8
+ <classpathentry kind="lib" path="C:/tmp/google-collections-1.0.jar"/>
9
+ <classpathentry kind="lib" path="C:/tmp/guava-19.0.jar"/>
10
+ <classpathentry kind="lib" path="C:/tmp/kotlin-compiler-1.1.2-3.jar"/>
11
+ <classpathentry kind="lib" path="C:/tmp/kotlin-stdlib-jre8-1.1.2-3.jar"/>
12
+ <classpathentry kind="lib" path="C:/tmp/lz4-1.3.0.jar"/>
13
+ <classpathentry kind="lib" path="C:/tmp/mapdb-3.1.0-SNAPSHOT.jar"/>
14
+ <classpathentry kind="output" path="bin"/>
15
+ </classpath>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>MapDBImpoter</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>org.eclipse.jdt.core.javabuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.eclipse.jdt.core.javanature</nature>
16
+ </natures>
17
+ </projectDescription>
@@ -0,0 +1,80 @@
1
+ import java.io.File;
2
+ import java.io.FileInputStream;
3
+ import java.io.FileNotFoundException;
4
+ import java.io.InputStreamReader;
5
+ import java.io.UnsupportedEncodingException;
6
+ import java.util.Scanner;
7
+ import java.util.SortedMap;
8
+ import java.util.TreeMap;
9
+
10
+ import org.mapdb.BTreeMap;
11
+ import org.mapdb.DB;
12
+ import org.mapdb.DBMaker;
13
+ import org.mapdb.Serializer;
14
+
15
+ import com.intellij.openapi.util.io.FileUtil;
16
+
17
+ public class MapDBImporter {
18
+
19
+ static final String inputTsvName = "SEKKA-JISYO-1.6.2.N.tsv";
20
+ static final String dbFileName = "SEKKA-JISYO-1.6.2.N.mapdb";
21
+
22
+ public static void main(String[] args){
23
+
24
+ FileUtil.delete(new File(dbFileName));
25
+
26
+ /**
27
+ * Open db file
28
+ */
29
+ File dbFile = new File(dbFileName);
30
+ DB db = DBMaker
31
+ .fileDB(dbFile)
32
+ .make();
33
+
34
+
35
+ long time = System.currentTimeMillis();
36
+ SortedMap<String,String> source = new TreeMap<>();
37
+
38
+ try {
39
+ InputStreamReader in = new InputStreamReader(new FileInputStream(inputTsvName), "UTF-8");
40
+ Scanner scanner = new Scanner(in);
41
+
42
+ if(true) {
43
+ while(scanner.hasNext()) {
44
+ String line = scanner.nextLine();
45
+ String fields[] = line.split("\t");
46
+ if(2 <= fields.length) {
47
+ String key = fields[0];
48
+ String value = fields[1];
49
+ source.put(key, value);
50
+ }
51
+ }
52
+ }
53
+ else {
54
+ for(int i = 0 ; i < 1000000 ; i++) {
55
+ String key = String.format("key%06d", i);
56
+ String value = String.format("value%06d", i);
57
+ source.put(key, value);
58
+ }
59
+ }
60
+
61
+ //create map with TreeMap source
62
+ BTreeMap<String, String> map = db.treeMap("sekka")
63
+ .keySerializer(Serializer.STRING)
64
+ .valueSerializer(Serializer.STRING)
65
+ .createFrom(source);
66
+ }
67
+ catch(FileNotFoundException e) {
68
+ e.printStackTrace();
69
+ System.exit(1);
70
+ } catch (UnsupportedEncodingException e) {
71
+ e.printStackTrace();
72
+ System.exit(1);
73
+ }
74
+
75
+
76
+ db.close();
77
+
78
+ System.out.println("Finished; total time: "+(System.currentTimeMillis()-time)/1000+"s; there are "+source.size()+" items in map");
79
+ }
80
+ }
metadata CHANGED
@@ -1,129 +1,128 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sekka
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiyoka Nishiyama
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-28 00:00:00.000000000 Z
11
+ date: 2017-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: eventmachine
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: '1.0'
20
- type: :runtime
19
+ name: eventmachine
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: memcache-client
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
32
  version: '1.8'
34
- type: :runtime
33
+ name: memcache-client
35
34
  prerelease: false
35
+ type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
- name: nendo
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
46
  version: 0.8.0
48
- type: :runtime
47
+ name: nendo
49
48
  prerelease: false
49
+ type: :runtime
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.8.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: distributed-trie
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - '='
60
59
  - !ruby/object:Gem::Version
61
60
  version: 0.8.0
62
- type: :runtime
61
+ name: distributed-trie
63
62
  prerelease: false
63
+ type: :runtime
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.8.0
69
69
  - !ruby/object:Gem::Dependency
70
- name: rack
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
72
  - - "~>"
74
73
  - !ruby/object:Gem::Version
75
74
  version: '1.5'
76
- type: :runtime
75
+ name: rack
77
76
  prerelease: false
77
+ type: :runtime
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.5'
83
83
  - !ruby/object:Gem::Dependency
84
- name: ruby-progressbar
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
86
  - - "~>"
88
87
  - !ruby/object:Gem::Version
89
88
  version: '1.4'
90
- type: :runtime
89
+ name: ruby-progressbar
91
90
  prerelease: false
91
+ type: :runtime
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.4'
97
97
  - !ruby/object:Gem::Dependency
98
- name: bundler
99
98
  requirement: !ruby/object:Gem::Requirement
100
99
  requirements:
101
100
  - - "~>"
102
101
  - !ruby/object:Gem::Version
103
102
  version: '1.7'
104
- type: :development
103
+ name: bundler
105
104
  prerelease: false
105
+ type: :development
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.7'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rake
113
112
  requirement: !ruby/object:Gem::Requirement
114
113
  requirements:
115
114
  - - "~>"
116
115
  - !ruby/object:Gem::Version
117
116
  version: '10.0'
118
- type: :development
117
+ name: rake
119
118
  prerelease: false
119
+ type: :development
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '10.0'
125
- description: Sekka is a SKK like input method. Sekka server provides REST Based API.
126
- If you are SKK user, let's try it.
125
+ description: Sekka is a SKK like input method. Sekka server provides REST Based API. If you are SKK user, let's try it.
127
126
  email:
128
127
  - kiyoka@sumibi.org
129
128
  executables:
@@ -175,9 +174,20 @@ files:
175
174
  - lib/sekka/alphabet-lib.nnd
176
175
  - lib/sekka/approximatesearch.rb
177
176
  - lib/sekka/convert-jisyo.nnd
177
+ - lib/sekka/downloader.rb
178
178
  - lib/sekka/google-ime.nnd
179
179
  - lib/sekka/henkan.nnd
180
+ - lib/sekka/jar/eclipse-collections-8.2.0.jar
181
+ - lib/sekka/jar/eclipse-collections-api-8.2.0.jar
182
+ - lib/sekka/jar/elsa-3.0.0-M7.jar
183
+ - lib/sekka/jar/google-collections-1.0.jar
184
+ - lib/sekka/jar/guava-19.0.jar
185
+ - lib/sekka/jar/kotlin-compiler-1.1.2-3.jar
186
+ - lib/sekka/jar/kotlin-stdlib-jre8-1.1.2-3.jar
187
+ - lib/sekka/jar/lz4-1.3.0.jar
188
+ - lib/sekka/jar/mapdb-3.1.0-SNAPSHOT.jar
180
189
  - lib/sekka/jisyo-db.nnd
190
+ - lib/sekka/jruby_mapdb.rb
181
191
  - lib/sekka/kvs.rb
182
192
  - lib/sekka/path.rb
183
193
  - lib/sekka/roman-lib.nnd
@@ -210,6 +220,8 @@ files:
210
220
  - public_dict/1.6.1/SEKKA-JISYO-1.6.1.N.url
211
221
  - public_dict/1.6.2/SEKKA-JISYO-1.6.2.N.ldb.tar.gz.md5
212
222
  - public_dict/1.6.2/SEKKA-JISYO-1.6.2.N.ldb.tar.gz.url
223
+ - public_dict/1.6.2/SEKKA-JISYO-1.6.2.N.mapdb.md5
224
+ - public_dict/1.6.2/SEKKA-JISYO-1.6.2.N.mapdb.url
213
225
  - public_dict/1.6.2/SEKKA-JISYO-1.6.2.N.md5
214
226
  - public_dict/1.6.2/SEKKA-JISYO-1.6.2.N.url
215
227
  - script/sekkaserver.debian
@@ -219,10 +231,12 @@ files:
219
231
  - test/approximate-bench.nnd
220
232
  - test/azik-verification.nnd
221
233
  - test/common.nnd
234
+ - test/downloader.nnd
222
235
  - test/google-ime.nnd
223
236
  - test/henkan-bench.nnd
224
237
  - test/henkan-main.nnd
225
238
  - test/jisyo.nnd
239
+ - test/jruby_mapdb.nnd
226
240
  - test/memcache.nnd
227
241
  - test/redis.nnd
228
242
  - test/roman-lib.nnd
@@ -232,11 +246,14 @@ files:
232
246
  - test/skk-azik-table.nnd
233
247
  - test/skk-jisyo-in-1.txt
234
248
  - test/util.nnd
249
+ - tool/MapDBImpoter/.classpath
250
+ - tool/MapDBImpoter/.project
251
+ - tool/MapDBImpoter/src/MapDBImporter.java
235
252
  homepage: http://github.com/kiyoka/sekka
236
253
  licenses:
237
254
  - New BSD
238
255
  metadata: {}
239
- post_install_message:
256
+ post_install_message:
240
257
  rdoc_options: []
241
258
  require_paths:
242
259
  - lib
@@ -251,9 +268,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
268
  - !ruby/object:Gem::Version
252
269
  version: '0'
253
270
  requirements: []
254
- rubyforge_project:
255
- rubygems_version: 2.6.11
256
- signing_key:
271
+ rubyforge_project:
272
+ rubygems_version: 2.4.8
273
+ signing_key:
257
274
  specification_version: 4
258
275
  summary: Sekka is a SKK like input method.
259
276
  test_files:
@@ -262,10 +279,12 @@ test_files:
262
279
  - test/approximate-bench.nnd
263
280
  - test/azik-verification.nnd
264
281
  - test/common.nnd
282
+ - test/downloader.nnd
265
283
  - test/google-ime.nnd
266
284
  - test/henkan-bench.nnd
267
285
  - test/henkan-main.nnd
268
286
  - test/jisyo.nnd
287
+ - test/jruby_mapdb.nnd
269
288
  - test/memcache.nnd
270
289
  - test/redis.nnd
271
290
  - test/roman-lib.nnd