Class: VivlioStarter::CLI::Metrics::ReadabilityFeatures

Inherits:
Data
  • Object
show all
Defined in:
lib/vivlio_starter/cli/metrics/readability.rb

Overview

RS 算出に必要な生の特徴量(合算可能な素の集計値)。 平均ではなく「合計と個数」を保持することで、章をまたいだ合算後に 正しい平均(l*)を再構成できる。

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#alpha_char_totalObject (readonly)

Returns the value of attribute alpha_char_total

Returns:

  • (Object)

    the current value of 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_countObject (readonly)

Returns the value of attribute alpha_run_count

Returns:

  • (Object)

    the current value of 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_countObject (readonly)

Returns the value of attribute comma_count

Returns:

  • (Object)

    the current value of comma_count



38
39
40
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38

def comma_count
  @comma_count
end

#hira_char_totalObject (readonly)

Returns the value of attribute hira_char_total

Returns:

  • (Object)

    the current value of 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_countObject (readonly)

Returns the value of attribute hira_run_count

Returns:

  • (Object)

    the current value of 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_totalObject (readonly)

Returns the value of attribute kanji_char_total

Returns:

  • (Object)

    the current value of 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_countObject (readonly)

Returns the value of attribute kanji_run_count

Returns:

  • (Object)

    the current value of 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_totalObject (readonly)

Returns the value of attribute kata_char_total

Returns:

  • (Object)

    the current value of 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_countObject (readonly)

Returns the value of attribute kata_run_count

Returns:

  • (Object)

    the current value of 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_countObject (readonly)

Returns the value of attribute period_count

Returns:

  • (Object)

    the current value of period_count



38
39
40
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38

def period_count
  @period_count
end

#sentence_char_totalObject (readonly)

Returns the value of attribute sentence_char_total

Returns:

  • (Object)

    the current value of 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_countObject (readonly)

Returns the value of attribute sentence_count

Returns:

  • (Object)

    the current value of sentence_count



38
39
40
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 38

def sentence_count
  @sentence_count
end

Class Method Details

.zeroObject

すべて 0 の空特徴量(空章・合算の初期値)。



47
# File 'lib/vivlio_starter/cli/metrics/readability.rb', line 47

def self.zero = new(**members.to_h { [it, 0] })