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

# Read from stdin:
echo "It's not a tool — it's a platform." | dslop -
pbpaste | dslop                                         # clipboard
git show HEAD:README.md | dslop                         # a past revision

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.2.tar.gz (176.9 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.2-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

dslop-0.1.2-py3-none-musllinux_1_2_aarch64.whl (1.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

dslop-0.1.2-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.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dslop-0.1.2-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.2.tar.gz.

File metadata

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

File hashes

Hashes for dslop-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2dc59779d2b39d2e0fdceed0d8f37e65ffbf6ffca8447f2b497b39d6e645adfa
MD5 8d18146ef5e646f516c37d14213b0027
BLAKE2b-256 0bc50eab61adc0402fa06ef780ad4b2b51a0d22ffaa61b153772dac53a46f872

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dslop-0.1.2-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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d2de86d495aeb5163ca83820bbd392341d97542f95c9d956790a9509caa888a3
MD5 91c5df32022fee10924ea772a98dc214
BLAKE2b-256 2bd79540817d00a44ab6f066566ea6d876931e71c582e0384726d851840b4ae1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.1.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e8e545ce2399298fa8dc3616890e3df7cef321e149e11d5b44b2e6f0a3c32f19
MD5 507451c883e50c2c67255fa043b0f303
BLAKE2b-256 8dec60c477ecd3e739c1a9a09b0918ffd1f474bfae6d036b3017ac459f77a32b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.1.2-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6b4feea4fe125be6b3defeb147e139033ca5d8a6e640ed03d9dbd2d98ff5a92d
MD5 3023506d10c6f96448b8db27f5f25d15
BLAKE2b-256 0af68025521f7fffe602609e04159eeb6cfa94d1aff192f3c98d0d33c4c96527

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 163058354b8b0650c4246f59e2d99697f58a9d4d12e9fa5ab8c890a9f65117e6
MD5 da14f4fc7bcbf344a52d20b580b0bd1e
BLAKE2b-256 211ba4e0b18c7de4038e5f7338afb4510468970e5897841130addda837112e5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e0ea59c4a6b4d880f5da0108f1525fda4c2d7a78e79dbc7f5ea04c5b6bb6a9fe
MD5 2ca7a277ede0718fa4e556fba9b8b4af
BLAKE2b-256 f6d0b992b8cbd059ec245d91bd3e326d6d2d7059a4985997679f31c78e6f3dcb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.1.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 80ed0e2825b798394eedf5c5906325abbb168bef6c6668239ce43eff33bb3a0c
MD5 985de8117ef280e1c4e927b7761c5b59
BLAKE2b-256 dd04a9248a2f2e0ab67d6cf82b1fd9946688a839a1539dcdb5f72871eece0424

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.1.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1a586dc63a8d316423e966fdc8a7ef9f9e820af2b2e8d875825319ce04888943
MD5 ecb54e748f4762e006fb5b84273e35b6
BLAKE2b-256 b591101c9edb144c73dbacdba4e24f733d5f3f1412b8ec0eb3f3477e2630559d

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