what_you_say 0.3.0-arm64-darwin → 0.4.0-arm64-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 +6 -10
- 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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd487494668210573d029cf4899f27c9f25d05ebe07ca402039d7f8b162e90b0
|
4
|
+
data.tar.gz: '0284322ca0c0be959af645ec8d992879e70ee4442da6852669a9516a7831edd6'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f4f82e067ed8cf5ba3a9fd261d22c6885616510680c7debd58636cb651a9cefaca04f11b4796bfbba2eaaae923784626454fe3e6190866ace8196d98c1d441d
|
7
|
+
data.tar.gz: a5d3beed260c0f3dfd01d9f3a4efe90cd97e7a49b10232844361d750b0e4b52c4227ace36d1d47af93493f996e57f4a500554f9f0d926be9611f3708507fef12
|
data/README.md
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
# WhatYouSay
|
2
2
|
|
3
|
-
Quick and easy natural language detection wrapping the [
|
3
|
+
Quick and easy natural language detection wrapping the [lingua-rs Rust crate](https://github.com/pemistahl/lingua-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 [75+ languages](https://github.com/pemistahl/lingua-rs/tree/main#3-which-languages-are-supported)
|
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
|
12
10
|
|
13
11
|
## Installation
|
14
12
|
|
@@ -22,7 +20,9 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
The method to call is `_?`. Why? Because
|
23
|
+
The method to call is `_?`. Why? Because it looked nice.
|
24
|
+
|
25
|
+
Pass in the text whose language you want to detect:
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
require "what_you_say"
|
@@ -32,11 +32,7 @@ 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("
|
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)
|
35
|
+
assert_equal("esperanto", result.lang.eng_name)
|
40
36
|
```
|
41
37
|
|
42
38
|
You also have to opportunity to `inspect` some output:
|
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.4.0
|
5
5
|
platform: arm64-darwin
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|