class Copyleaks::ScoreWeights

Attributes

grammar_score_weight[RW]

@param [Float] Grammar correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Mechanics correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Sentence structure correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Word choice correction category weight in the overall score. 0.0 >= weight <= 1.0

mechanics_score_weight[RW]

@param [Float] Grammar correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Mechanics correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Sentence structure correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Word choice correction category weight in the overall score. 0.0 >= weight <= 1.0

sentence_structure_score_weight[RW]

@param [Float] Grammar correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Mechanics correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Sentence structure correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Word choice correction category weight in the overall score. 0.0 >= weight <= 1.0

word_choice_score_weight[RW]

@param [Float] Grammar correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Mechanics correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Sentence structure correction category weight in the overall score. 0.0 >= weight <= 1.0 @param [Float] Word choice correction category weight in the overall score. 0.0 >= weight <= 1.0

Public Class Methods

new(grammar_score_weight, mechanics_score_weight, sentence_structure_score_weight, word_choice_score_weight) click to toggle source
# File lib/copyleaks/models/submissions/writing_assistant/score_weights.rb, line 34
def initialize(grammar_score_weight, mechanics_score_weight, sentence_structure_score_weight, word_choice_score_weight)
  @grammar_score_weight = grammar_score_weight
  @mechanics_score_weight = mechanics_score_weight
  @sentence_structure_score_weight = sentence_structure_score_weight
  @word_choice_score_weight = word_choice_score_weight
end

Public Instance Methods

as_json(*_args) click to toggle source
# File lib/copyleaks/models/submissions/writing_assistant/score_weights.rb, line 41
def as_json(*_args)
  {
    grammarScoreWeight: @grammar_score_weight,
    mechanicsScoreWeight: @mechanics_score_weight,
    sentenceStructureScoreWeight: @sentence_structure_score_weight,
    wordChoiceScoreWeight: @word_choice_score_weight
  }.reject { |_k, v| v.nil? }
end
to_json(*options) click to toggle source
# File lib/copyleaks/models/submissions/writing_assistant/score_weights.rb, line 50
def to_json(*options)
  as_json(*options).to_json(*options)
end