embulk-filter-kuromoji 0.1.1 → 0.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b4dca9e4715f6af3d568ca4013519d4f5351470
|
4
|
+
data.tar.gz: 9acf950dff08f825309b721eb63fefc031977b99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5b3f8dda0b8ccc31be015bb839925640fdc109c9fe6de98ced99e9008d2df27dfa8c686148b55d7be0694ad19cf1110db11a3227a5941b69e19c5af9b693d17
|
7
|
+
data.tar.gz: 2eb8b106940f6716b782ef1e5b2960d96d425b475c33d652a797620a40caef87d4157d916cb99d47e1b134766e35212a54a90a201aa8415f3fcb630fe19160e8
|
data/build.gradle
CHANGED
Binary file
|
@@ -69,8 +69,14 @@ public class KuromojiFilterPlugin implements FilterPlugin
|
|
69
69
|
|
70
70
|
for (String key: task.getKeyNames()) {
|
71
71
|
for (Map<String, String> setting : task.getSettings()) {
|
72
|
-
|
73
|
-
|
72
|
+
String keyName = key + MoreObjects.firstNonNull(setting.get("suffix"), "");
|
73
|
+
if (task.getKeepInput()) {
|
74
|
+
if (setting.get("suffix") != null) {
|
75
|
+
builder.add(new Column(i++, keyName, Types.STRING));
|
76
|
+
}
|
77
|
+
} else {
|
78
|
+
builder.add(new Column(i++, keyName, Types.STRING));
|
79
|
+
}
|
74
80
|
}
|
75
81
|
}
|
76
82
|
|
@@ -101,26 +107,24 @@ public class KuromojiFilterPlugin implements FilterPlugin
|
|
101
107
|
|
102
108
|
return new PageOutput() {
|
103
109
|
private PageReader reader = new PageReader(inputSchema);
|
110
|
+
private PageBuilder builder = new PageBuilder(Exec.getBufferAllocator(), outputSchema, output);
|
104
111
|
|
105
112
|
@Override
|
106
113
|
public void finish() {
|
107
|
-
|
114
|
+
builder.finish();
|
108
115
|
}
|
109
116
|
|
110
117
|
@Override
|
111
118
|
public void close() {
|
112
|
-
|
119
|
+
builder.close();
|
113
120
|
}
|
114
121
|
|
115
122
|
@Override
|
116
123
|
public void add(Page page) {
|
117
124
|
reader.setPage(page);
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
builder.addRecord();
|
122
|
-
}
|
123
|
-
builder.finish();
|
125
|
+
while (reader.nextRecord()) {
|
126
|
+
setValue(builder);
|
127
|
+
builder.addRecord();
|
124
128
|
}
|
125
129
|
}
|
126
130
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-filter-kuromoji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- toyama0919
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -56,7 +56,7 @@ files:
|
|
56
56
|
- lib/embulk/filter/kuromoji.rb
|
57
57
|
- src/main/java/org/embulk/filter/kuromoji/KuromojiFilterPlugin.java
|
58
58
|
- src/test/java/org/embulk/filter/kuromoji/TestKuromojiFilterPlugin.java
|
59
|
-
- classpath/embulk-filter-kuromoji-0.
|
59
|
+
- classpath/embulk-filter-kuromoji-0.2.0.jar
|
60
60
|
- classpath/kuromoji-0.7.7.jar
|
61
61
|
homepage: https://github.com/toyama0919/embulk-filter-kuromoji
|
62
62
|
licenses:
|
Binary file
|