what_you_say 0.4.0-x86_64-darwin → 0.4.1-x86_64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -6
- data/lib/what_you_say/3.1/what_you_say.bundle +0 -0
- data/lib/what_you_say/3.2/what_you_say.bundle +0 -0
- data/lib/what_you_say/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a77b5969f102a3eb35e065fdd04252d24cd5d76d19bc8705509244bb8c99c158
|
4
|
+
data.tar.gz: 3d4885a6d99a1fe589331ffdda49e69502691c775d8fb8bf132b94500b83a0c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c93676a9bd76fcd9db34f7c3ee26e93734569eab59aaaccfb74f0bfc3254298689d62c354fc2221b772319087904f37aa2cdab0f1e07f0ecaec0e4e190cc3d0
|
7
|
+
data.tar.gz: e8a8db87dd9c944a940b2d774b843ede853a82e83b30c59c532493f813888a7f0248c24eb6204e4182a5e9bc9f83d5f11ab01daefab262d69a54308958e46c27
|
data/README.md
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
# WhatYouSay
|
2
2
|
|
3
|
-
Quick and easy natural language detection wrapping the [
|
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
|
![What you say!!](https://user-images.githubusercontent.com/64050/224237944-ceb2570c-d544-474a-8c91-41433efdee43.png)
|
6
6
|
|
7
|
-
- Supports [
|
7
|
+
- Supports [69 languages](https://github.com/greyblake/whatlang-rs/blob/master/SUPPORTED_LANGUAGES.md) (nice!)
|
8
8
|
- Core library is written in Rust; this is a Ruby wrapper to it
|
9
9
|
- Lightweight, fast, and simple
|
10
|
+
- Recognizes not only a language, but also a script (Latin, Cyrillic, etc)
|
11
|
+
- Provides reliability information
|
10
12
|
|
11
13
|
## Installation
|
12
14
|
|
@@ -20,9 +22,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
20
22
|
|
21
23
|
## Usage
|
22
24
|
|
23
|
-
The method to call is `_?`. Why? Because
|
24
|
-
|
25
|
-
Pass in the text whose language you want to detect:
|
25
|
+
The method to call is `_?`. Why? Because. Pass in the text whose language you want to detect:
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
require "what_you_say"
|
@@ -32,7 +32,11 @@ text = "Ĉu vi ne volas eklerni Esperanton? Bonvolu! Estas unu de la plej bonaj
|
|
32
32
|
result = WhatYouSay._?(text)
|
33
33
|
|
34
34
|
assert_equal("epo", result.lang.code)
|
35
|
-
assert_equal("
|
35
|
+
assert_equal("Esperanto", result.lang.name)
|
36
|
+
assert_equal("Esperanto", result.lang.eng_name)
|
37
|
+
assert_equal("Latin", result.script)
|
38
|
+
assert_predicate(result, :reliable?)
|
39
|
+
assert_equal(1, result.confidence)
|
36
40
|
```
|
37
41
|
|
38
42
|
You also have to opportunity to `inspect` some output:
|
Binary file
|
Binary file
|
data/lib/what_you_say/version.rb
CHANGED