readability怎么使用
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,本篇内容介绍了"readability怎么使用"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!read
千家信息网最后更新 2026年11月02日readability怎么使用
本篇内容介绍了"readability怎么使用"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
readability文本可读性的公式最初都是为英语开发而来,所以目前仅支持英文文本数据。
安装
pip install readability
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting readability
Downloading https://mirrors.aliyun.com/pypi/packages/26/70/6f8750066255d4d2b82b813dd2550e0bd2bee99d026d14088a7b977cd0fc/readability-0.3.1.tar.gz (34 kB)
Building wheels for collected packages: readability
Building wheel for readability (setup.py) ... [?25ldone
[?25h Created wheel for readability: filename=readability-0.3.1-py3-none-any.whl size=35459 sha256=e920a8d6510bd1211df79a944ff03c94f2fea220ae4e5f430e930a52d75595ee
Stored in directory: /Users/thunderhit/Library/Caches/pip/wheels/90/29/a7/726a69748065b8c306b4a935ac2c57e9bc492cb23f355c8e03
Successfully built readability
Installing collected packages: readability
Successfully installed readability-0.3.1
快速上手
import readability
text = 'Note that tokens are separated by spaces and sentences by newlines.'
results = readability.getmeasures(text, lang='en')
results
OrderedDict([('readability grades',
OrderedDict([('Kincaid', 7.442500000000003),
('ARI', 5.825624999999999),
('Coleman-Liau', 9.532550312500003),
('FleschReadingEase', 55.95250000000002),
('GunningFogIndex', 10.700000000000001),
('LIX', 39.25),
('SMOGIndex', 9.70820393249937),
('RIX', 2.5),
('DaleChallIndex', 9.954550000000001)])),
('sentence info',
OrderedDict([('characters_per_word', 4.9375),
('syll_per_word', 1.6875),
('words_per_sentence', 8.0),
('sentences_per_paragraph', 2.0),
('type_token_ratio', 0.9375),
('characters', 79),
('syllables', 27),
('words', 16),
('wordtypes', 15),
('sentences', 2),
('paragraphs', 1),
('long_words', 5),
('complex_words', 3),
('complex_words_dc', 6)])),
('word usage',
OrderedDict([('tobeverb', 2),
('auxverb', 0),
('conjunction', 1),
('pronoun', 2),
('preposition', 2),
('nominalization', 1)])),
('sentence beginnings',
OrderedDict([('pronoun', 1),
('interrogative', 0),
('article', 0),
('subordination', 0),
('conjunction', 0),
('preposition', 0)]))])
返回的信息包括
readability grades可读性指标 sentence info 句子信息 word usage 词语使用 sentence beginnings句子开始
可读性指标
results['readability grades']
OrderedDict([('Kincaid', 7.442500000000003),
('ARI', 5.825624999999999),
('Coleman-Liau', 9.532550312500003),
('FleschReadingEase', 55.95250000000002),
('GunningFogIndex', 10.700000000000001),
('LIX', 39.25),
('SMOGIndex', 9.70820393249937),
('RIX', 2.5),
('DaleChallIndex', 9.954550000000001)]) 可读性Kincaid指标
results['readability grades']['Kincaid'] 7.442500000000003
"readability怎么使用"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!
可读性
指标
信息
内容
句子
文本
更多
知识
实用
学有所成
接下来
公式
困境
实际
情况
数据
文章
案例
编带
网站
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
喔噻互联网科技有限公司
科技互联网企业
深圳恒合互联网络科技有限公司
互联网科技保险
互联网巨头反垄断金融科技
互联网 科技创新
宜安科技 互联网金融
致聘互联网科技
郑州华宇互联网科技
国外互联网科技网站
中化能源互联网科技招聘
互联网科技研发水平
中国互联网十大科技股排名
国大互联网教育科技有限公司工作
南通创西澳互联网科技有限公司
杭州披云加互联网科技有限公司
山东大美朱楼互联网科技有限公司
北京军民互联网科技公司
互联网科技品牌
每日互联网科技新闻
耶加雪菲
智网互联网科技
易通互联网络科技有限公司
米客互联网科技
恒生科技互联网指数分析
南平创想时代互联网科技有限公司
黑科技闪耀互联网之光
工业互联网等科技实现智能化赋能
为客找房互联网科技公司怎么样
同城互联网络科技