Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Flesch Kincaid readability score for text
A Python module implementation of the Flesch Kincaid readability score algorithm.
The source code is released under the MIT License.
pip3 install fkscore
For text in python represented as a string.
Takes text as string datatype. Words can be on same or different lines. Current version is English language only. Email for support.
import fkscore
text = '...blah blah blah...'
f = fkscore.fkscore(text)
print(f.stats)
print(f.score)
OR
from fkscore import fkscore
text = '...blah blah blah...'
f = fkscore(text)
print(f.stats)
print(f.score)
Output includes 2 dictionaries of information as follows:
Releases and additions will push to PyPi as needed. If there is a feature in master not built/pushed, and you want it to be, just ping me. Note that the validation and many examples for this algorithm implement lines of text for analysis. It is not required to use single lines. One classic example of this is the text of Moby Dick, which is evaluated to posess a readability score of 58. This module is pure python and works with all python versions >= 3.5. It likely works with older versions but has yet been tested.
This is maintained as an implementation of the Flesch-Kincaid algorithm which initially developed in 1948 by Rudolph Flesch. It was later revised by J. Peter Kincaid and his team for the U.S. Navy in 1975. The F–K formula was first used by the Army for assessing the difficulty of technical manuals in 1978 and soon after became a United States Military Standard. The goal of the algorithm is to provide an empirical basis for assessing the difficuly of understanding text.
There are 2 algorithms providing output and associated text statistics as follows:
The cat sat on the mat.
scores 116 and is considered VERY easy to read with a single sentence of single syllable words.
The quick red fox jumped over the lazy brown dog.
is a low grade difficulty sentence scoring 86.705.
This sentence, taken as a reading passage unto itself, is being used to prove a point.
has a readability of 69.
The Australian platypus is seemingly a hybrid of a mammal and reptilian creature.
possesses a readability of 37.455.
Feel free to contact for questions, comments, concerns or interact directly via the GitHub repository.
Randall Shane PhD
Randall@NumbersAndTech.com
https://github.com/RandallShanePhD/fkscore
Thank you!
FAQs
Flesch Kincaid readability scoring algorithm
We found that fkscore demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.