lingua-it-readability 1.1.6 → 1.1.7
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/CHANGELOG.md +4 -0
- data/README.md +6 -1
- data/lib/lingua/it/readability/version.rb +1 -1
- data/lib/lingua/it/readability.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 70d0c15fa6f6d656f1b9c469ff01f43f93e829cb
|
|
4
|
+
data.tar.gz: a05872a83574d05452b149dc1c26de9e9bd41e4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f90e12a1c086aa7c2159e72cc7c1a61aa852d7b8780f5385140b1d70250ccec8dee8f531682724bf20c3b372ebba0a85e4f11d62a6de4cdcbf09ab4ad522983f
|
|
7
|
+
data.tar.gz: e64f4d121377fc221a6d07731c9c1639bbef64ca3e37da8e946e676859ee1a50f3411b96457424dc4341765f5393284fd46fe5841cf196d6ebb0491bb927197e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# Lingua::It::Readability
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Inspired by _Lingua::EN::Readability_ and his perl original version _Lingua::EN::Fathom_, a gem focused on readability of Italian language texts.
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
@@ -24,11 +24,16 @@ Or install it yourself as:
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
26
26
|
```ruby
|
|
27
|
+
require 'lingua/it/readability'
|
|
28
|
+
|
|
27
29
|
text = 'Testo campione da analizzare con Gulpease e Flesch tarati su lingua Italiana.'
|
|
28
30
|
report = Lingua::IT::Readability.new(text)
|
|
29
31
|
report.num_sentences # 1
|
|
30
32
|
report.num_words # 12
|
|
31
33
|
report.num_syllables # 29
|
|
34
|
+
report.syllables # array containing all 29 syllables => ['Te', 'sto', 'cam', 'pio', 'ne', ... ,]
|
|
35
|
+
report.sentences # array containing all sentences => [...]
|
|
36
|
+
report.words # array containing all words => ['Testo', 'campione', 'da', 'analizzare', ... ,]
|
|
32
37
|
report.gulpease # 59
|
|
33
38
|
report.flesch # 36.92
|
|
34
39
|
report.report # a formatted summary of statistics and measures
|
|
@@ -12,6 +12,7 @@ module Lingua
|
|
|
12
12
|
attr_accessor :text
|
|
13
13
|
attr_accessor :paragraphs
|
|
14
14
|
attr_accessor :sentences
|
|
15
|
+
attr_accessor :syllables
|
|
15
16
|
attr_accessor :words
|
|
16
17
|
attr_accessor :frequencies
|
|
17
18
|
attr_reader :sentence
|
|
@@ -152,7 +153,7 @@ module Lingua
|
|
|
152
153
|
"Number of characters %d \n\n" <<
|
|
153
154
|
"Average words per sentence %.2f \n" <<
|
|
154
155
|
"Average syllables per word %.2f \n\n" <<
|
|
155
|
-
"Gulpease score %
|
|
156
|
+
"Gulpease score %d \n" <<
|
|
156
157
|
"Flesch score %2.2f \n",
|
|
157
158
|
sentence.delim_regex.gsub(/\\/,''), num_paragraphs, num_sentences,
|
|
158
159
|
num_words, num_characters, words_per_sentence,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lingua-it-readability
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrea Giacomo Baldan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|