mirror of
https://github.com/laosb/ReadabilityFramework.git
synced 2025-05-01 05:01:10 +00:00
fix: Make all classes, structs, enums & protocols public.
This commit is contained in:
parent
d3dcfc84de
commit
73b8996beb
6 changed files with 8 additions and 8 deletions
|
@ -8,7 +8,7 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import SyllableCounter
|
import SyllableCounter
|
||||||
|
|
||||||
enum RACommonMetric {
|
public enum RACommonMetric {
|
||||||
case sentenceCount
|
case sentenceCount
|
||||||
case wordCount
|
case wordCount
|
||||||
case syllableCount
|
case syllableCount
|
||||||
|
@ -16,7 +16,7 @@ enum RACommonMetric {
|
||||||
case avgSyllablesPerWord
|
case avgSyllablesPerWord
|
||||||
}
|
}
|
||||||
|
|
||||||
struct RACommonMetricsCalculator {
|
public struct RACommonMetricsCalculator {
|
||||||
typealias Results = [RACommonMetric: Double]
|
typealias Results = [RACommonMetric: Double]
|
||||||
|
|
||||||
private var metrics: Set<RACommonMetric>
|
private var metrics: Set<RACommonMetric>
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct RAScorerMeta {
|
public struct RAScorerMeta {
|
||||||
let name: String
|
let name: String
|
||||||
let creator: String
|
let creator: String
|
||||||
/** Should be in APA format. */
|
/** Should be in APA format. */
|
||||||
let citation: String
|
let citation: String
|
||||||
}
|
}
|
||||||
|
|
||||||
protocol RAScorer {
|
public protocol RAScorer {
|
||||||
static var meta: RAScorerMeta { get }
|
static var meta: RAScorerMeta { get }
|
||||||
static var requiresCommonMetrics: Set<RACommonMetric>? { get }
|
static var requiresCommonMetrics: Set<RACommonMetric>? { get }
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct RAFleschKincaidGradeScorer: RAScorer {
|
public struct RAFleschKincaidGradeScorer: RAScorer {
|
||||||
static let requiresCommonMetrics: Set<RACommonMetric>? = [
|
static let requiresCommonMetrics: Set<RACommonMetric>? = [
|
||||||
.avgWordsPerSentence,
|
.avgWordsPerSentence,
|
||||||
.avgSyllablesPerWord
|
.avgSyllablesPerWord
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct RAFleschReadingEaseScorer: RAScorer {
|
public struct RAFleschReadingEaseScorer: RAScorer {
|
||||||
static let requiresCommonMetrics: Set<RACommonMetric>? = [
|
static let requiresCommonMetrics: Set<RACommonMetric>? = [
|
||||||
.avgWordsPerSentence,
|
.avgWordsPerSentence,
|
||||||
.avgSyllablesPerWord
|
.avgSyllablesPerWord
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
class RAScoringTask {
|
public class RAScoringTask {
|
||||||
typealias Results = [Scorer: Double]
|
typealias Results = [Scorer: Double]
|
||||||
|
|
||||||
enum Scorer: Hashable, CaseIterable, Comparable {
|
enum Scorer: Hashable, CaseIterable, Comparable {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import NaturalLanguage
|
import NaturalLanguage
|
||||||
|
|
||||||
struct RATokenizer {
|
public struct RATokenizer {
|
||||||
private var unit: NLTokenUnit
|
private var unit: NLTokenUnit
|
||||||
private var text: String
|
private var text: String
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue