mirror of https://github.com/licensee/licensee.git
abstract confidence threshold
This commit is contained in:
parent
58f540a901
commit
f7ed24f8a8
|
@ -43,7 +43,7 @@ module Licensee
|
|||
|
||||
def matches
|
||||
@matches ||= matches_by_similarity.select do |_, similarity|
|
||||
similarity >= Licensee.confidence_threshold
|
||||
similarity >= minimum_confidence
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -51,6 +51,12 @@ module Licensee
|
|||
def confidence
|
||||
@confidence ||= match ? file.similarity(match) : 0
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def minimum_confidence
|
||||
Licensee.confidence_threshold
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue