DeepSeek Harness Remote
DeepSeek Harness Remote 可將手機或另一台電腦與你運行 DeepSeek Harness 的電腦安全連接,隨時隨地繼續你的工作,方便隨時查看進度並繼續工作。
AI 翻譯
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Six classic English readability formulas in Swift: Flesch Reading Ease, Flesch-Kincaid, Gunning Fog, SMOG, Coleman-Liau and ARI. No dependencies.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Six classic English readability formulas in Swift, with no dependencies and no data files.
import ReadabilityScoreKit
if let scores = Readability.score("The cat sat on the mat. The dog ran.") {
print(scores.fleschReadingEase) // 117.66750000000002
print(scores.readingEaseBand) // veryEasy
print(scores.averageGradeLevel) // -1.6140688888888892
}
| Score | Published as | Formula |
|---|---|---|
fleschReadingEase | Flesch, 1948 | 206.835 - 1.015 x (words / sentences) - 84.6 x (syllables / words) |
fleschKincaidGrade | Kincaid et al., 1975 | 0.39 x (words / sentences) + 11.8 x (syllables / words) - 15.59 |
gunningFog | Gunning, 1952 | 0.4 x [(words / sentences) + 100 x (complex words / words)] |
smogIndex | McLaughlin, 1969 | 1.0430 x sqrt(polysyllables x (30 / sentences)) + 3.1291 |
colemanLiauIndex | Coleman and Liau, 1975 | 0.0588 x L - 0.296 x S - 15.8 |
automatedReadabilityIndex | Smith and Senter, 1967 | 4.71 x (characters / words) + 0.5 x (words / sentences) - 21.43 |
Five of the six are expressed as a U.S. school grade. Flesch Reading Ease is a 0-100-ish scale where higher means easier; it is unbounded, so very short simple sentences can score above 100 and very dense ones below zero.
averageGradeLevel is the mean of the five grade formulas, which is steadier than any one
of them on short text.
.package(url: "https://github.com/theluckystrike/ReadabilityScoreKit.git", from: "1.0.0")
.target(name: "YourTarget", dependencies: ["ReadabilityScoreKit"])
Every formula reads from one TextStatistics value, so two scores for the same text always
agree about how many words it contains. You can inspect or supply the counts yourself:
let stats = Readability.statistics(for: text)
stats.wordCount
stats.sentenceCount
stats.syllableCount
stats.polysyllableCount // three or more syllables
let scores = ReadabilityScores(statistics: stats)
-- is not counted.., ! or ?. Wait!!! is one break, not three. Text with no
terminal punctuation is treated as a single sentence so headlines still score.Readability.score returns nil for text with no words, rather than zero, so
"unmeasurable" stays distinguishable from "scored zero".
The syllable count is a heuristic, not a dictionary lookup. It counts maximal vowel runs,
drops a silent trailing e, and adds one back for a consonant + le ending, with plurals
normalised so circles scores the same as circle. That gets ordinary English words right
most of the time, and gets some of them wrong: names, loanwords, and words where a vowel pair
spans a syllable boundary such as cre-ate. Flesch, Flesch-Kincaid, Gunning Fog and SMOG all
inherit that error. Coleman-Liau and ARI are character-based and do not.
Gunning's original definition of a "complex word" also excluded proper nouns, familiar jargon,
compounds, and words made polysyllabic only by an -es or -ed suffix. This implementation
applies none of those exclusions, so gunningFog reads a little high on text full of names.
Markdown, HTML tags and code are not stripped. Strip them before scoring or they are counted as words.
Treat every score as a band, not a measurement.
Pure Swift with no dependencies and no Foundation requirement in the scoring path. Builds anywhere a Swift 5.9 toolchain runs.
swift test
The formula tests use fixed counts so each constant is checked against the published formula by hand, rather than against this package's own tokenizer. The tokenizer and syllable counter are tested separately.
The same six formulas, implemented as hosted web tools:
Useful for sanity-checking this library's output against an independent implementation.
MIT. See LICENSE.