opener-pos-tagger-base 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pos-tagger-base +2 -9
- data/lib/opener/pos_taggers/base.rb +8 -4
- data/lib/opener/pos_taggers/base/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ff397d190a2ca5088e2c5bd6bf5ed49dac81f9a
|
4
|
+
data.tar.gz: 12de2f20b00a54ebeb6945d7d8ebc30d8dfa8a52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddbfedf3702d452a69efc6a9a4c2b1ff459fabee6baf0ead78b9dcb0653199228e23eca74dde9316d4fb76468770fed5293f45526e16585c3e2d78d333ea14c6
|
7
|
+
data.tar.gz: a0f0f69d69e8a51d490cbcaca1ce651d6326a3b61c6c14a23b639dff47affd52871029b2794108a9d43bf314bc7364baa6a5f4991bec2ec7453f2ef1ae84a044
|
data/bin/pos-tagger-base
CHANGED
@@ -9,13 +9,6 @@ else
|
|
9
9
|
input = STDIN.read
|
10
10
|
end
|
11
11
|
|
12
|
-
kernel
|
13
|
-
stdout, stderr, process = kernel.run(input)
|
12
|
+
kernel = Opener::POSTaggers::Base.new(:args => ARGV)
|
14
13
|
|
15
|
-
|
16
|
-
puts stdout
|
17
|
-
|
18
|
-
STDERR.puts(stderr) unless stderr.empty?
|
19
|
-
else
|
20
|
-
abort stderr
|
21
|
-
end
|
14
|
+
puts kernel.run(input)
|
@@ -39,10 +39,14 @@ module Opener
|
|
39
39
|
# process information.
|
40
40
|
#
|
41
41
|
# @param [String] input The input to tag.
|
42
|
-
# @return [
|
42
|
+
# @return [String]
|
43
43
|
#
|
44
44
|
def run(input)
|
45
|
-
|
45
|
+
stdout, stderr, process = capture(input)
|
46
|
+
|
47
|
+
raise stderr unless process.success?
|
48
|
+
|
49
|
+
return stdout
|
46
50
|
end
|
47
51
|
|
48
52
|
protected
|
@@ -53,9 +57,9 @@ module Opener
|
|
53
57
|
site_packages = File.join(core_dir, 'site-packages')
|
54
58
|
"env PYTHONPATH=#{site_packages}:$PYTHONPATH"
|
55
59
|
end
|
56
|
-
|
60
|
+
|
57
61
|
##
|
58
|
-
# capture3 method doesn't work properly with Jruby, so
|
62
|
+
# capture3 method doesn't work properly with Jruby, so
|
59
63
|
# this is a workaround
|
60
64
|
#
|
61
65
|
def capture(input)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opener-pos-tagger-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- development@olery.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|