that_language-service 0.1.0.pre2 → 0.1.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/that_language/service/application.rb +11 -5
- data/lib/that_language/service/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d63c06c2f42b1746e07690a0e571f4d8deb3e420
|
4
|
+
data.tar.gz: 4d4dfe0f19be9ce65f03930f9639bca44105b774
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f14931cd5a50778974ff20873b52a9ec4d51cfe631f891e047d92d9dce5de48a4ae5a089736d1fc16b24428e9392b523807628a2e83ca62fdccde68cc3bf7e0
|
7
|
+
data.tar.gz: b5919ba9f6656a21e9ba8d72203db23424b8d47eac532053265c9dd77fafb8e9ad913290fd4b7798b2d42ddd2e046ee4ae6a205fd5d1a8dde56103656d5dea85
|
@@ -13,11 +13,17 @@ module ThatLanguage
|
|
13
13
|
end
|
14
14
|
|
15
15
|
get '/detect' do
|
16
|
-
render_json(
|
16
|
+
render_json({
|
17
|
+
language_code: detect.language_code,
|
18
|
+
confidence: detect.confidence
|
19
|
+
})
|
17
20
|
end
|
18
21
|
|
19
22
|
post '/detect' do
|
20
|
-
render_json(
|
23
|
+
render_json({
|
24
|
+
language_code: detect.language_code,
|
25
|
+
confidence: detect.confidence
|
26
|
+
})
|
21
27
|
end
|
22
28
|
|
23
29
|
get '/details' do
|
@@ -35,15 +41,15 @@ module ThatLanguage
|
|
35
41
|
end
|
36
42
|
|
37
43
|
def language_code
|
38
|
-
ThatLanguage.language_code(text)
|
44
|
+
@language_code ||= ThatLanguage.language_code(text)
|
39
45
|
end
|
40
46
|
|
41
47
|
def detect
|
42
|
-
ThatLanguage.detect(text)
|
48
|
+
@detect ||= ThatLanguage.detect(text)
|
43
49
|
end
|
44
50
|
|
45
51
|
def details
|
46
|
-
ThatLanguage.details(text)
|
52
|
+
@details ||= ThatLanguage.details(text)
|
47
53
|
end
|
48
54
|
|
49
55
|
def text
|