opener-chained-daemon 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opener/chained_daemon/version.rb +1 -1
- data/lib/opener/stanza/tokenizer_pos.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dafbc02ba750a4f1f2e360e5febf6521bdb3c5019c3c9bea961ec2a20b56ef3
|
4
|
+
data.tar.gz: '09915d7c540dd6932da9f5da8bee68fa259611ba628e53b6796c775b7ff73368'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f89040096bb0f6f9c755c0db9564cbc8a63e772352b5f05c0e4a4341f659e7bd8abdfe3b8b1aa87b6cccf7db17355628105079d95fd0679e4f650f504fcc41e
|
7
|
+
data.tar.gz: 3fbb26c4542fae6143077292a288e10ec0aba51c9b2f463f55355d3a3cab518b4c2f1135de978d6f8aeec6e2b30d06f50bc60da9d2cc0cb4ee072a3040e6f81a
|
@@ -43,7 +43,9 @@ module Opener
|
|
43
43
|
raise Core::UnsupportedLanguageError.new kaf.language
|
44
44
|
end
|
45
45
|
|
46
|
-
|
46
|
+
input = kaf.raw
|
47
|
+
input = input.gsub(/\,[^\ ]/, ', ')
|
48
|
+
response = Faraday.post BASE_URL, {lang: kaf.language, input: input}.to_query
|
47
49
|
raise Core::UnsupportedLanguageError, kaf.language if response.status == 406
|
48
50
|
raise response.body if response.status >= 400
|
49
51
|
tokens = JSON.parse response.body
|
@@ -62,14 +64,16 @@ module Opener
|
|
62
64
|
end
|
63
65
|
misc = word['misc'] || miscs[word['id']]
|
64
66
|
|
67
|
+
Rollbar.scoped({ input: input, params: params, tokens: tokens, word: word }) do
|
68
|
+
raise 'Missing misc'
|
69
|
+
end if misc.nil?
|
70
|
+
|
65
71
|
offset = misc.match(/start_char=(\d+)|/)[1].to_i
|
66
72
|
length = misc.match(/end_char=(\d+)/)[1].to_i - offset
|
67
73
|
|
68
74
|
u_pos = word['upos']
|
69
75
|
pos = POS[u_pos]
|
70
|
-
|
71
|
-
raise "Didn't find a map for #{u_pos}"
|
72
|
-
end if pos.nil?
|
76
|
+
raise "Didn't find a map for #{u_pos}" if pos.nil?
|
73
77
|
type = if POS_OPEN.include? pos then 'open' else 'close' end
|
74
78
|
|
75
79
|
params = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opener-chained-daemon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
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: 2020-11-
|
11
|
+
date: 2020-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|