Class: VivlioStarter::CLI::Metrics::ReadabilityFeatures
- Inherits:
-
Data
- Object
- Data
- VivlioStarter::CLI::Metrics::ReadabilityFeatures
- Defined in:
- lib/vivlio_starter/cli/metrics/readability.rb
Overview
RS 算出に必要な生の特徴量(合算可能な素の集計値)。 平均ではなく「合計と個数」を保持することで、章をまたいだ合算後に 正しい平均(l*)を再構成できる。
Instance Attribute Summary collapse
-
#alpha_char_total ⇒ Object
readonly
Returns the value of attribute alpha_char_total.
-
#alpha_run_count ⇒ Object
readonly
Returns the value of attribute alpha_run_count.
-
#comma_count ⇒ Object
readonly
Returns the value of attribute comma_count.
-
#hira_char_total ⇒ Object
readonly
Returns the value of attribute hira_char_total.
-
#hira_run_count ⇒ Object
readonly
Returns the value of attribute hira_run_count.
-
#kanji_char_total ⇒ Object
readonly
Returns the value of attribute kanji_char_total.
-
#kanji_run_count ⇒ Object
readonly
Returns the value of attribute kanji_run_count.
-
#kata_char_total ⇒ Object
readonly
Returns the value of attribute kata_char_total.
-
#kata_run_count ⇒ Object
readonly
Returns the value of attribute kata_run_count.
-
#period_count ⇒ Object
readonly
Returns the value of attribute period_count.
-
#sentence_char_total ⇒ Object
readonly
Returns the value of attribute sentence_char_total.
-
#sentence_count ⇒ Object
readonly
Returns the value of attribute sentence_count.
Class Method Summary collapse
-
.zero ⇒ Object
すべて 0 の空特徴量(空章・合算の初期値)。.
Instance Attribute Details
#alpha_char_total ⇒ Object (readonly)
Returns the value of attribute alpha_char_total
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def alpha_char_total @alpha_char_total end |
#alpha_run_count ⇒ Object (readonly)
Returns the value of attribute alpha_run_count
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def alpha_run_count @alpha_run_count end |
#comma_count ⇒ Object (readonly)
Returns the value of attribute comma_count
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def comma_count @comma_count end |
#hira_char_total ⇒ Object (readonly)
Returns the value of attribute hira_char_total
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def hira_char_total @hira_char_total end |
#hira_run_count ⇒ Object (readonly)
Returns the value of attribute hira_run_count
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def hira_run_count @hira_run_count end |
#kanji_char_total ⇒ Object (readonly)
Returns the value of attribute kanji_char_total
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def kanji_char_total @kanji_char_total end |
#kanji_run_count ⇒ Object (readonly)
Returns the value of attribute kanji_run_count
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def kanji_run_count @kanji_run_count end |
#kata_char_total ⇒ Object (readonly)
Returns the value of attribute kata_char_total
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def kata_char_total @kata_char_total end |
#kata_run_count ⇒ Object (readonly)
Returns the value of attribute kata_run_count
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def kata_run_count @kata_run_count end |
#period_count ⇒ Object (readonly)
Returns the value of attribute period_count
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def period_count @period_count end |
#sentence_char_total ⇒ Object (readonly)
Returns the value of attribute sentence_char_total
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def sentence_char_total @sentence_char_total end |
#sentence_count ⇒ Object (readonly)
Returns the value of attribute sentence_count
38 39 40 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38 def sentence_count @sentence_count end |
Class Method Details
.zero ⇒ Object
すべて 0 の空特徴量(空章・合算の初期値)。
47 |
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 47 def self.zero = new(**members.to_h { [it, 0] }) |