what_you_say 0.1.1-x86_64-linux → 0.2.0-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/lib/what_you_say/3.1/what_you_say.so +0 -0
- data/lib/what_you_say/3.2/what_you_say.so +0 -0
- data/lib/what_you_say/version.rb +1 -1
- 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: b9c92bc8e8a9cce659eb411c93eec2dfccc801c3b66e8a67053c5ebb1cf031ac
|
4
|
+
data.tar.gz: 7e9b7e1dba17a7d937d8296a1cc579632f9fab4da8e25d0da7663a79a59aee86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1578a70a90c40ca47579e1a642e36f99d741831aaf2bec670d47b56656aa8c1e96c302ca2867dbc5707871ee04de23034eaf6959e4d27cc13cfca009f38edebe
|
7
|
+
data.tar.gz: aa0ec57cbb954d20bf751c9e1e11c846e679cbfb9f94a3df370d8eadd61fdf7a8727aec29311a0dc068b82ff152df1493a9988722ac43fc2d747e4c36dcb9464
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# WhatYouSay
|
2
2
|
|
3
|
-
Quick and easy natural language detection. Instantly identify the source language of a piece of text.
|
3
|
+
Quick and easy natural language detection wrapping the [Whatlang Rust crate](https://github.com/greyblake/whatlang-rs). Instantly identify the source language of a piece of text.
|
4
4
|
|
5
5
|

|
6
6
|
|
@@ -25,6 +25,8 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
25
25
|
The method to call is `_?`. Why? Because. Pass in the text whose language you want to detect:
|
26
26
|
|
27
27
|
```ruby
|
28
|
+
require "what_you_say"
|
29
|
+
|
28
30
|
text = "Ĉu vi ne volas eklerni Esperanton? Bonvolu! Estas unu de la plej bonaj aferoj!"
|
29
31
|
|
30
32
|
result = WhatYouSay._?(text)
|
@@ -37,6 +39,14 @@ assert_predicate(result, :reliable?)
|
|
37
39
|
assert_equal(1, result.confidence)
|
38
40
|
```
|
39
41
|
|
42
|
+
You also have to opportunity to `to_s` some output:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
text = "Եվ ահա ես ստանում եմ մի զանգ պատահական տղայից"
|
46
|
+
WhatYouSay._?(text).to_s
|
47
|
+
#=> #<WhatYouSay::Info lang=#<WhatYouSay::Lang code="hye" name="Հայերեն" eng_name="Armenian"> script="Armenian" reliable=true confidence=1>
|
48
|
+
```
|
49
|
+
|
40
50
|
## Development
|
41
51
|
|
42
52
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake compile test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
Binary file
|
Binary file
|
data/lib/what_you_say/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: what_you_say
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: x86_64-linux
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|