Determine readability and comprehension difficulty for contemporary English text.
- iOS reference platform, 10.3 minimum version.
- Example app and tests included.
- Automated Readability Index
- Coleman–Liau Index
- Flesch-Kincaid Grade Level
- Flesch Reading Ease
- Gunning Fog Index
- SMOG Grade
CocoaPods is the easiest way to use this project. Add the following to your project Podfile:
use_modular_headers!
pod 'Readability-Swift', :git => 'https://github.com/brackendev/Readability-Swift.git'
It is a good idea to specifiy the commit. For example:
pod 'Readability-Swift', :git => 'https://github.com/brackendev/Readability-Swift.git', commit => '31c183bcda89b205072bcee3d3bcd5f5ee1bd707'
-
Import it:
import Readability_Swift
-
Use it:
Readability.automatedReadabilityIndexForString("Test") Readability.colemanLiauIndexForString("Test") Readability.fleschKincaidGradeLevelForString("Test") Readability.fleschReadingEaseForString("Test") Readability.gunningFogScoreForString("Test") Readability.smogGradeForString("Test")
Note: See the example view controller.
This project makes use of the following third-party libraries:
Bracken Spencer
Readability-Swift is released under the MIT license. See the LICENSE file for more info.