ReadabilityFramework/Sources/Readability/Scorer.swift
2022-05-20 12:45:26 +08:00

24 lines
471 B
Swift

//
// ReadabilityScorer.swift
// Readability
//
// Created by Shibo Lyu on 2022/5/19.
//
import Foundation
import SwiftUI
struct RAScorerMeta {
let name: String
let creator: String
/** Should be in APA format. */
let citation: String
}
protocol RAScorer {
static var meta: RAScorerMeta { get }
static var requiresCommonMetrics: Set<RACommonMetric>? { get }
init()
func score(_ text: String, metrics: RACommonMetricsCalculator.Results?) -> Double
}