Skip to main content

Linguistic feature extraction and annotation utilities for text.

Project description

PyLift is the Python branch of the LiFT library.

Installation

Core package:

pip install py_lift

Optional tooling dependencies (examples/workbench):

poetry install --with examples

spaCy language models are optional and must be installed separately when using Spacy_Preprocessor with the default model names:

python -m py_lift.model_setup --languages en de fr sl tr

For Turkish (tr_core_news_md) and for SE_AbstractnessAnnotator (lift-resources-lists), install the required internal packages from your organization's package source.

py_lift.model_setup supports language-specific wheel URLs via built-in defaults and overrides. Turkish currently uses this built-in URL by default:

https://pypi.cats.fernuni-hagen.de/packages/tr_core_news_md-1.0-py3-none-any.whl

You can override sources for any language via environment variables:

export PY_LIFT_MODEL_URL_TR="https://your-internal-source/tr_core_news_md-1.0-py3-none-any.whl"
python -m py_lift.model_setup --languages tr

Or via CLI:

python -m py_lift.model_setup --languages tr --model-url tr=https://your-internal-source/tr_core_news_md-1.0-py3-none-any.whl

You can also let the preprocessor auto-install missing models at runtime:

from py_lift.preprocessing import Spacy_Preprocessor

prep = Spacy_Preprocessor("en", auto_install_models=True)

Standalone Python example

Run a non-visual end-to-end pipeline example:

python examples/pure_python_pipeline.py

The script is located at examples/pure_python_pipeline.py and demonstrates:

  • language detection
  • spaCy preprocessing
  • spelling anomaly annotation
  • readability + count feature extraction
  • plain stdout output (no visualization)

Other examples (now also in top-level examples/):

  • examples/visualization_streamlit.py
  • examples/visualization_notebook.ipynb

Release (PyPI)

Short release checklist:

  1. Update the version in pyproject.toml.

  2. Run tests:

    poetry install --with dev
    poetry run pytest
    

Model-dependent tests (for example py_lift/tests/test_preprocessing.py) are marked as requires_models and skipped by default. Run them explicitly with:

poetry run pytest --run-model-tests
  1. Build distribution artifacts:

    poetry build
    
  2. Publish:

    export POETRY_PYPI_TOKEN_PYPI="pypi-XXXXXXXXXXXXXXXXXXXX"
    poetry publish
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lift_linguistic_features_py-0.1.1.tar.gz (206.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lift_linguistic_features_py-0.1.1-py3-none-any.whl (228.7 kB view details)

Uploaded Python 3

File details

Details for the file lift_linguistic_features_py-0.1.1.tar.gz.

File metadata

  • Download URL: lift_linguistic_features_py-0.1.1.tar.gz
  • Upload date:
  • Size: 206.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.0 Darwin/25.5.0

File hashes

Hashes for lift_linguistic_features_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1cba5c1d4e7c91355f26ebdef97efcbfe61e4676db14246df4e634263a83e1cd
MD5 4b9497fe6e4a7686b7f167534da2c255
BLAKE2b-256 e6cc6bd91ae184ef743fbba98ef16fb6dfa87cdbeaad81115ea6845afcb5e42c

See more details on using hashes here.

File details

Details for the file lift_linguistic_features_py-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lift_linguistic_features_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ecdefe23300e4291796fda98644f6f612d818dd3f2cfd6217199c3abe62e17e
MD5 91637abd2fb005a82540b4e0eb15c097
BLAKE2b-256 09b9d35fd849d52cb0b8906dfc514d8700eed1d860fb5c10152d8fcb2774d2db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page