class Copyleaks::ScoreWeights
Attributes
@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
@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
@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
@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
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
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
Source
# File lib/copyleaks/models/submissions/writing_assistant/score_weights.rb, line 50 def to_json(*options) as_json(*options).to_json(*options) end