Skip to main content

LiNT-II: readability assessment for Dutch

License: EUPL v1.2 Python 3.11 Python 3.12 Python 3.13 Binder

Table of contents

  1. Introduction
  2. Installation
  3. Usage
  4. What is LiNT-II?
  5. Data and Licensing
  6. Changelog (releases)
  7. References and Credits

Introduction

LiNT-II is a readability assessment tool for Dutch. The library:

LiNT-II is a new implementation of the original LiNT tool. The main differences between LiNT and LiNT-II are:

For detailed information, please refer to What is LiNT-II? and LiNT-II documentation.

⚠️ Licensing: LiNT-II code is licensed under EUPL-1.2, but the bundled linguistic data (SUBTLEX-NL, noun list) is not licensed for commercial use. See Data and Licensing.

Installation

Quick install

  1. Create an environment with Python 3.11[1]
  2. Run:
pip install lint_ii
python -m spacy download nl_core_news_lg

[1] Python 3.11 will trigger installation of spaCy 3.7, which is the recommended version for LiNT-II. For more details about this, see here.

Support for other Python versions

LiNT-II also supports Python 3.12 and 3.13, which install spaCy 3.8. Note that this is not the recommended configuration; for more details, see here.

Usage

Create ReadabilityAnalysis from text

>>> from lint_ii import ReadabilityAnalysis

>>> text = """De Oudegracht is het sfeervolle hart van de stad.
In de middeleeuwen was het hier een drukte van belang met de aan- en afvoer van goederen. 
Nu is het een prachtige plek om te winkelen en te lunchen of te dineren in de oude stadskastelen."""

>>> analysis = ReadabilityAnalysis.from_text(text)
Loading Dutch language model from spaCy... ✓ nl_core_news_lg

Note:

LiNT-II can process plain text or markdown. Other formats (e.g. html) or very "unclean" text might produce inaccurate results due to sentence segmentation issues.

Get LiNT-II score and difficulty level

You can see the score and difficulty level for the whole document and/or per sentence:

>>> analysis.lint.score
48.21821023715232

>>> analysis.lint.level
3

>>> analysis.lint_scores_per_sentence
[18.488663741182307, 54.29401862227567, 63.24784032931867]

Get linguistic features

All the linguistic features can be accessed on a text-level, a sentence-level, and a word-level (if applicable). This includes the 4 features used in the formula (e.g. word frequency), as well as additional features related to readability (e.g. passive constructions). For example:

Getting the mean word frequency for the whole text:

>>> analysis.mean_log_word_frequency
4.208347333820788

Getting the list of content words in each sentence:

>>> for sent in analysis.sentences:
      print([feat.text for feat in sent.content_words])
['oudegracht', 'sfeervolle', 'hart', 'stad']
['middeleeuwen', 'drukte', 'belang', 'afvoer', 'goederen']
['prachtige', 'plek', 'winkelen', 'lunchen', 'dineren', 'oude', 'stadskastelen']

Getting the word frequencies for each content word in the text:

>>> frequencies = {
    feat.text:freq
    for feat in analysis.word_features
    if (freq := feat.word_frequency) is not None
}
print(frequencies)
{'hart': 5.293120582960477, 'stad': 5.435577664689725, 'middeleeuwen': 3.423686536423184, 'drukte': 3.96775458077346, 'belang': 4.509063243912051, 'afvoer': 3.3845344124610364, 'goederen': 3.7985612410265284, 'prachtige': 4.7805033384066125, 'plek': 5.249034299064351, 'winkelen': 4.177454440810221, 'dineren': 3.893254653252401, 'oude': 5.436741798693928, 'stadskastelen': 1.359228547196266}

For a list of available properties, refer to the documentation in readability_analysis.py, sentence_analysis.py, and word_features.py.

Get dictionary with detailed analysis

For a human-readable dictionary with a detailed analysis, use the get_detailed_analysis() method. Note that running this method calculates all 13 features (core + additional), which might be a bit slow. If you need only some of the features, accessing them directly is faster.

>>> detailed_analysis = analysis.get_detailed_analysis()
>>> detailed_analysis.keys()
dict_keys(['document_stats', 'sentence_stats', 'contextually_new_words'])
>>> detailed_analysis['document_stats']
{'sentence_count': 3,
 'document_lint_score': 48.21821023715232,
 'document_difficulty_level': 3,
 'min_lint_score': 18.488663741182307,
 'max_lint_score': 63.24784032931867}
>>> detailed_analysis['sentence_stats'][0]
{'text': 'De Oudegracht is het sfeervolle hart van de stad.',
'score': 18.488663741182307,
'level': 1,
'mean_log_word_frequency': 5.364349123825101,
'top_n_least_freq_words': [('hart', 5.293120582960477),
 ('stad', 5.435577664689725)],
'proportion_concrete_nouns': 0.5,
'concrete_nouns': ['stad'],
'abstract_nouns': [],
'undefined_nouns': ['hart'],
'unknown_nouns': ['oudegracht'],
'max_sdl': 3,
'sdls': [{'token': 'de', 'dep_length': 0, 'heads': ['Oudegracht']},
 {'token': 'oudegracht', 'dep_length': 3, 'heads': ['hart']},
 {'token': 'is', 'dep_length': 2, 'heads': ['hart']},
 {'token': 'het', 'dep_length': 1, 'heads': ['hart']},
 {'token': 'sfeervolle', 'dep_length': 0, 'heads': ['hart']},
 {'token': 'hart', 'dep_length': 0, 'heads': ['hart']},
 {'token': 'van', 'dep_length': 1, 'heads': ['stad']},
 {'token': 'de', 'dep_length': 0, 'heads': ['stad']},
 {'token': 'stad', 'dep_length': 2, 'heads': ['hart']}],
'content_words_per_clause': 4.0,
'content_words': ['oudegracht', 'sfeervolle', 'hart', 'stad'],
'finite_verbs': ['is'],
'sent_length': 9,
'mean_clause_length': 9.0,
'passives': [],
'n_subordinate_clauses': 0,
'subordinate_clauses': [],
'adjectival_modifiers_per_clause': 2.0,
'adjectival_modifiers': ['sfeervolle', 'van de stad'],
'coordinated_constituents_per_clause': 0.0,
'coordinated_constituents': [],
'pronouns_first_person': [],
'pronouns_second_person': [],
'pronouns_third_person': [],
'humans': []}

Visualization in Jupyter Notebook (Binder)

To visualize your readability analysis, you can use this notebook.

Note: The Binder notebook takes a while to build (~2 minutes). Alternatively, you can download the repo and set up a conda environment to run the notebook locally.

What is LiNT-II?

LiNT-II is a Python implementation of LiNT (Leesbaar­heids­instrument voor Nederlandse Teksten), a readability assessment tool that analyzes Dutch texts and estimates their difficulty.

Features used in the formula

LiNT-II readability score is based on 4 features:

Feature Description
word frequency Mean word frequency of all the content words in the text (excluding proper nouns).
➡ Less frequent words make a text more difficult.
syntactic dependency length Syntactic dependency length (SDL) is the number of words between a syntactic head and its dependent (e.g., verb-subject). We take the biggest SDL in each sentence, and calculate their mean value for the whole text.
➡ Bigger SDL's make a text more difficult.
content words per clause Mean number of content words per clause.
➡ Larger number of content words indicates dense information and makes a text more difficult.
proportion concrete nouns Mean proportion of concrete nouns out of all the nouns in the text.
➡ Smaller proportion of concrete nouns (i.e. many abstract nouns) makes a text more difficult.

Definitions

  • Content words are words that possess semantic content and contribute to the meaning of the sentence. We consider a word as a content word if it belongs to one of the following part-of-speech (POS): nouns (NOUN), proper nouns (PROPN), lexical verbs (VERB), adjectives (ADJ), or if it's a manner adverb (based on a custom list).
  • Clause: A clause is a group of words that contains a subject and a verb, functioning as a part of a sentence. In this library, the number of clauses is determined by the number of finite verbs (= verbs that show tense) in the sentence.

LiNT-II score

The readability score is calculated based on the following formula:

LiNT-II score = 

  100 - (
      - 4.30
      + (17.31 * word frequency)
      - (1.62  * syntactic dependency length)
      - (2.54  * content words per clause)
      + (15.95 * proportion concrete nouns)
  )

The formula's coefficients were estimated using a linear regression model fitted on empirical reading comprehension data from high school students. For more information about the regression analysis, see here.

Difficulty levels

LiNT-II scores are mapped to 4 difficulty levels. For each level, it is estimated which percentage of adult Dutch readers have difficulty understanding texts on this level.

Score Difficulty level Proportion of adults who have difficulty understanding this level
[0-34) 1 14%
[34-46) 2 29%
[46-58) 3 53%
[58-100] 4 78%

For more information, please refer to the LiNT-II documentation.

Additional features

LiNT-II outputs additional linguistic features, which are not part of the formula, but can be relevant for readability.

Feature Description Release
sentence length The number of words in a sentence, excluding punctuation. v0.1.1
pronouns All the pronouns in the text, categorized into 1st / 2nd / 3rd person. v0.1.1
passives Passive voice constructions.
Example: Het boek is gepubliceerd nadat de auteur was overleden. "The book was published after the author's death"
v0.1.1
subordinate clauses A subordinate clause cannot stand alone as a complete sentence and relies on a main clause for its meaning. It adds additional information to the main clause.
Example: Mijn broer, die in Leuven woont, is morgen jarig. "My brother, who lives in Leuven, has his birthday tomorrow."
v0.1.1
mean clause length The number of words in a sentence, divided by the number of clauses in the sentence. v0.1.2
adjectival modifiers per clause The number of adjectival modifiers in a sentence, divided by the number of clauses in the sentence. Adjectival modifiers are words or phrases that describe nouns, providing additional information about them.
Example: De man [met hoed] [die daar loopt] is mijn vriend. "The man [with the hat] [walking there] is my friend." (Two adjectival modifiers; one clause).
v0.1.2
coordinated constituents per clause Coordination is a syntactic structure that links two or more elements using words like "and", "or", "but". We count the number of coordinated constituents in a sentence (excluding coordinated verbs or clauses), divided by the number of clauses in the sentence.
Example: Daar horen Schotland, [Wales] en [Noord-Ierland] ook bij. "Scotland, Wales, and Northern Ireland are also part of it." (Two coordinated constituents; one clause. Note that the first conjunct - the head of the coordination, Schotland - is not counted.)
v0.1.2
humans All the words that refer to people (including pronouns). v0.1.2
contextually new words Entities and situations that are new in the text, i.e. that were not mentioned in the preceding 50 words. v0.1.2

The feature contextually new words is available on the ReadabilityAnalysis level. The other 8 additional features are available on a SentenceAnalysis level.

Data and Licensing

LiNT-II code is licensed under the EUPL-1.2.

The package also contains linguistic data files based on third-party resources. These files are not covered by the EUPL and are subject to their own terms, which do not allow commercial use without permission from the rights holders.

Data Files Source Terms
Word frequencies subtlex_wordfreq.parquet SUBTLEX-NL CC BY-NC-SA 4.0
Noun list (semantic types) nouns_sem_types_*.parquet Partly based on the Referentiebestand Nederlands (RBN) See below
Other data manner_adverbs_*.parquet, measurement_units.parquet, subtlex_wordfreq_skiplist.parquet LiNT-II authors EUPL-1.2

SUBTLEX-NL

The word frequencies are derived from SUBTLEX-NL (Keuleers, Brysbaert & New, 2010), licensed under CC BY-NC-SA 4.0. These files are distributed under the same licence. Commercial use requires permission from the SUBTLEX-NL authors (Marc Brysbaert, Ghent University).

Keuleers, E., Brysbaert, M., & New, B. (2010). SUBTLEX-NL: A new measure for Dutch word frequency based on film subtitles. Behavior Research Methods, 42(3), 643–650. https://doi.org/10.3758/BRM.42.3.643

Noun list

The noun list contains 92,757 nouns with their semantic type. It was originally based on the Referentiebestand Nederlands (RBN), and has since been substantially extended and revised by the LiNT authors: 38,477 nouns also occur in the RBN, of which 23,240 have the same semantic type as in the RBN.

The RBN is made available by the Instituut voor de Nederlandse Taal (INT) under a non-commercial licence. We are in contact with the INT about the terms for distributing this list. Do not use the noun list for commercial purposes; for commercial use, please contact the INT.

Referentiebestand Nederlands - RBN (Version 2.0.1) (2014) [Data set]. Available at the Dutch Language Institute: http://hdl.handle.net/10032/tm-a2-n2

Commercial use

LiNT-II score uses both word frequency and proportion of concrete nouns, and the formula's coefficients were fitted on these specific data files. Replacing the files changes the scores. LiNT-II can therefore currently not be used for commercial purposes without permission from both rights holders.

Changelog

New in 0.1.4

  • Clarified licensing of bundled data (SUBTLEX-NL, RBN-based noun list); no functional changes.

New in 0.1.3

  • LiNT-II now supports Python 3.12 and Python 3.13; these versions install spaCy 3.8. We recommend using Python 3.11 and spaCy 3.7, if possible; see here.

New in 0.1.2

  • Added 5 new linguistic features (not used of the formula); see here.
  • Updated the NOUN_DATA list: the semantic type of words related to kabinet/regering (cabinet/government) was changed to human.

New in 0.1.1

  • Added 4 new linguistic features (not used of the formula); see here.
  • Refactored return types: return WordFeatures instead of flattened text everywhere.

References and Credits

LiNT-II

LiNT-II was developed by Jenia Kim (Hogeschool Utrecht, VU Amsterdam), in collaboration with Henk Pander Maat (Utrecht University).

If you use this library, please cite as follows:

@software{lint_ii,
  author = {Kim, Jenia and Pander Maat, Henk},
  title = {{LiNT-II: readability assessment for Dutch}},
  year = {2025},
  url = {https://github.com/vanboefer/lint_ii},
  version = {0.1.4},
  note = {Python package}
}
  • Special thanks to Antal van den Bosch (Utrecht University) for setting up and facilitating the collaboration.
  • Special thanks to Lawrence Vriend for his work on the LiNT-II Visualizer and other invaluable help with the code.
  • The code for LiNT-II was inspired by a spaCy implementation of LiNT by the City of Amsterdam: alletaal-lint.

Original LiNT

The first version of LiNT was developed in the NWO project Toward a validated reading level tool for Dutch (2012-2017). Later versions were developed in the Digital Humanities Lab of Utrecht University.

More details about the original LiNT can be found on:

The readability research on which LiNT is based is described in the PhD thesis of Suzanne Kleijn (English) and in Pander Maat et al. 2023 (Dutch). Please cite as follows:

@article{pander2023lint,
  title={{LiNT}: een leesbaarheidsformule en een leesbaarheidsinstrument},
  author={Pander Maat, Henk and Kleijn, Suzanne and Frissen, Servaas},
  journal={Tijdschrift voor Taalbeheersing},
  volume={45},
  number={1},
  pages={2--39},
  year={2023},
  publisher={Amsterdam University Press Amsterdam}
}
@phdthesis{kleijn2018clozing,
  title={Clozing in on readability: How linguistic features affect and predict text comprehension and on-line processing},
  author={Kleijn, Suzanne},
  year={2018},
  school={Utrecht University}
}

Metadata

Release files for lint_ii 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lint_ii 0.1.4
File Size Uploaded Provenance Actions
lint_ii-0.1.4.tar.gz 8.4 MB Without provenance Details for lint_ii-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lint_ii 0.1.4
File Interpreter ABI Platform Actions
lint_ii-0.1.4-py3-none-any.whl Python 3 none any Details for lint_ii-0.1.4-py3-none-any.whl

Total release size: 16.8 MB

Release files / lint_ii-0.1.4.tar.gz

Download URL lint_ii-0.1.4.tar.gz
Size 8.4 MB
Tags Source
SHA-256 checksum
How to use checksums
15d12968e995533dd7c3b8e5f9e3437e1bb521ead0a3412d60616db09dd942a3
BLAKE2b-256 checksum
How to use checksums
a8957eab3fd6a5501096a878fc383f4b80c23bdb277a749cb7fe131b1f3fe361
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.14

Release files / lint_ii-0.1.4-py3-none-any.whl

Download URL lint_ii-0.1.4-py3-none-any.whl
Size 8.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a0269b87eebac2d73cb9a6160386d67b79193e7f7afce4a100fc5e17210e8d77
BLAKE2b-256 checksum
How to use checksums
f23f3fd2fa2c46dc71aa44f5984a5cbf79f9b4deb06eedb99894f0474a2f4f54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.14

Security for lint_ii 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page