Skip to main content

Detect AI writing patterns (slop) in your codebase

Project description

dslop

Detect AI writing patterns (slop) in your codebase.

dslop is a fast CLI linter for prose. It flags telltale LLM writing patterns (em-dashes, double-hyphen dashes, "it's not X, it's Y" constructions) and statistical tells (uniform sentence rhythm, flat word-frequency distributions) that human writing rarely produces.

Install

pip install dslop
# or
uvx dslop .

Use

dslop                       # check current directory
dslop README.md docs/       # check specific paths
dslop --config dslop.toml   # use a specific config

Exits non-zero on violations, so it drops into CI or pre-commit unchanged.

Pre-commit

repos:
  - repo: https://github.com/prefectlabs/dslop
    rev: v0.1.0
    hooks:
      - id: dslop

Configure

Create dslop.toml at your repo root:

[patterns]
em-dash = true
double-hyphen = true
contrastive = true

[metrics]
sentence-length-cv = 0.3
sentence-length-kurtosis = 1.5

[metrics.word-freq-dispersion]
threshold = 0.6
chunk-size = 200
top-n = 20

Each metric accepts a threshold (f64) or false to disable.

License

Apache-2.0. See LICENSE.

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

dslop-0.1.0.tar.gz (176.0 kB view details)

Uploaded Source

Built Distributions

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

dslop-0.1.0-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

dslop-0.1.0-py3-none-musllinux_1_2_x86_64.whl (1.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

dslop-0.1.0-py3-none-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

dslop-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

dslop-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

dslop-0.1.0-py3-none-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

dslop-0.1.0-py3-none-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file dslop-0.1.0.tar.gz.

File metadata

  • Download URL: dslop-0.1.0.tar.gz
  • Upload date:
  • Size: 176.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for dslop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77db1dcfcc379732ea13bafa187a3eb7eb7225fddb084e706cd93465b483cab1
MD5 09a05e5481cf9f01554cdf3669f7fa9b
BLAKE2b-256 ac7bab18b9034f8b8ee4937ce55731d97d48eda4aaefbb542eec52db299a1370

See more details on using hashes here.

File details

Details for the file dslop-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: dslop-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for dslop-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ac63b1951d809862c45f9e006f1ab2485a83d7e3e0cc154cdd4852292e2f33cc
MD5 1dd3f38b753d81b2ee2d4f66ad0afec5
BLAKE2b-256 b6017c0d38fb851449a5fc62ccd5aa122c894bc026e5fedbcfc355f094f77c54

See more details on using hashes here.

File details

Details for the file dslop-0.1.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for dslop-0.1.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2427d54aff2588f9cb817097ba91912798866d880aed15a5c74a2f821ce0873f
MD5 0e5645e152653abb161500b240a95cf8
BLAKE2b-256 9d7e4eec48a94db9175646641096f97b6377b3cddfcb9b8894e12d68c9cb84fd

See more details on using hashes here.

File details

Details for the file dslop-0.1.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for dslop-0.1.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 29918da54767ddf98c5b6bed7355541210234de3dcaef324f229b9fbb9517a80
MD5 5a22d0b987925c3893656fc261327776
BLAKE2b-256 957b7613628bd72cb3285c6320d83ac921c29c2774087a1ed59157dcdfa7ff4f

See more details on using hashes here.

File details

Details for the file dslop-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dslop-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 06c41dfcf11436222d7896cdf411b193fa7853fabea78c88f0ac150a16e0cd6a
MD5 73ab3a324a2228c674f1e0705c981b50
BLAKE2b-256 6ddfe0bb236dbce901746141fb29cb846316096c4ea01c75ea22c91f8f91f814

See more details on using hashes here.

File details

Details for the file dslop-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dslop-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6bbf37b20737b3e96c9a8af1037707ce229650ea31866f91b5232ece6bcbfe38
MD5 4545ab4aafd98cb6d011db1ce9c65274
BLAKE2b-256 fc21ce2ef72e239c2a673699c7e9c57771ff8016cadc0c06533c7b359b5a9476

See more details on using hashes here.

File details

Details for the file dslop-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dslop-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3612ddcb3264678f038e0875981f1dd600f236956a9f55459a45bde42c4d1233
MD5 06cc53986e73a2973359484d4a5d44ff
BLAKE2b-256 b1ccb54e99b81799473909c09ca02c6435f39f1c2dc019bd0493c6bb049b72c6

See more details on using hashes here.

File details

Details for the file dslop-0.1.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dslop-0.1.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0ba4491ecd9c4aaa44e1a4037e50571ed1c03474d3217d70cae16467354e5e59
MD5 33bde8b9b5eb5c5e37ade6395dbb1256
BLAKE2b-256 2cf149c21ce42da120486c8539bc868a12937758766e42e0a7ade0308b4d07b5

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