mirror of
https://github.com/laosb/ReadabilityFramework.git
synced 2025-05-01 05:01:10 +00:00
fix: Public , public, public!
This commit is contained in:
parent
4343848549
commit
3a5ec5de50
2 changed files with 8 additions and 4 deletions
|
@ -9,10 +9,10 @@ import Foundation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
public struct RAScorerMeta {
|
public struct RAScorerMeta {
|
||||||
let name: String
|
public let name: String
|
||||||
let creator: String
|
public let creator: String
|
||||||
/** Should be in APA format. */
|
/** Should be in APA format. */
|
||||||
let citation: String
|
public let citation: String
|
||||||
}
|
}
|
||||||
|
|
||||||
public protocol RAScorer {
|
public protocol RAScorer {
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class RAScoringTask {
|
||||||
.fleschKincaidGrade: RAFleschKincaidGradeScorer.self
|
.fleschKincaidGrade: RAFleschKincaidGradeScorer.self
|
||||||
]
|
]
|
||||||
|
|
||||||
public var scorersToRun: Set<Scorer> = Set(Scorer.allCases)
|
public var scorersToRun: Set<Scorer>
|
||||||
|
|
||||||
/** Derived from `scorersToRun`. */
|
/** Derived from `scorersToRun`. */
|
||||||
public var scorers: [Scorer: RAScorer.Type] {
|
public var scorers: [Scorer: RAScorer.Type] {
|
||||||
|
@ -41,6 +41,10 @@ public class RAScoringTask {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public init(scorers: Set<Scorer> = Set(Scorer.allCases)) {
|
||||||
|
self.scorersToRun = scorers
|
||||||
|
}
|
||||||
|
|
||||||
public func run(on text: String) -> Results {
|
public func run(on text: String) -> Results {
|
||||||
var commonMetrics: RACommonMetricsCalculator.Results? = nil
|
var commonMetrics: RACommonMetricsCalculator.Results? = nil
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue