Class: Copyleaks::Score

Inherits:
Object
  • Object
show all
Defined in:
lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identicalWords: nil, minorChangedWords: nil, relatedMeaningWords: nil, aggregatedScore: nil) ⇒ Score

Returns a new instance of Score.

Parameters:

  • $identicalWords (int)
    • Number of words which matched exactly.

  • $relatedMeaningWords (int)
    • Number of paraphrased words showing similar ideas with different words.

  • $aggregatedScore (float)
    • The percentage of similar words from all results. The calculation does not include excluded references, quotations, etc.

  • $minorChangedWords (int)
    • Number of nearly identical words with small differences like ‘slow’ and ‘slowly’.



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb', line 28

def initialize(
  identicalWords: nil,
  minorChangedWords: nil,
  relatedMeaningWords: nil,
  aggregatedScore: nil
)
  @identicalWords = identicalWords
  @minorChangedWords = minorChangedWords
  @relatedMeaningWords = relatedMeaningWords
  @aggregatedScore = aggregatedScore
end

Instance Attribute Details

#aggregatedScoreObject (readonly)

Returns the value of attribute aggregatedScore.



22
23
24
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb', line 22

def aggregatedScore
  @aggregatedScore
end

#identicalWordsObject (readonly)

Returns the value of attribute identicalWords.



22
23
24
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb', line 22

def identicalWords
  @identicalWords
end

#minorChangedWordsObject (readonly)

Returns the value of attribute minorChangedWords.



22
23
24
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb', line 22

def minorChangedWords
  @minorChangedWords
end

#relatedMeaningWordsObject (readonly)

Returns the value of attribute relatedMeaningWords.



22
23
24
# File 'lib/copyleaks/models/submissions/webhooks/HelperModels/ResultsModels/Score.rb', line 22

def relatedMeaningWords
  @relatedMeaningWords
end