Skip to main content

fl-style-transfer

Профиль-ориентированный перенос авторского стиля для LLM-агентов: по корпусу текстов автора строится профиль (признаки, эмбеддинги, словарь функций абзацев), а генерация новых текстов в этом профиле выполняется агентом с проверкой содержания и форматирования.

Пакет предназначен для использования из agent skill (см. candidate_skill/ в репозитории) и как библиотека CLI.

Установка

uvx fl-style-transfer --help
# или
pip install fl-style-transfer

Модели (Stanza ru, эмбеддинги) скачиваются при первом запуске: по умолчанию в XDG-кэш (~/.cache/fl-style-transfer), либо в папку, указанную переменными FL_STYLE_DATA_DIR (профили/индексы) и FL_STYLE_CACHE_DIR (модели).

CLI

# профиль автора из корпуса
fl-style-transfer profile build --input corpus/author1 --output profiles/author1 --config ru.yaml
fl-style-transfer profile inspect profiles/author1

# сравнение текста с профилем (диагностика, JSON)
fl-style-transfer compare --profile profiles/author1 --text draft.md --json

# skill-команды (автономный agent skill)
fl-style-transfer skill setup      --skill-dir . --corpus corpus/author1 --author author1
fl-style-transfer skill warmup
fl-style-transfer skill labels import --profile profiles/author1/ru-v1 --labels data/labels.jsonl
fl-style-transfer skill retrieve   --profile profiles/author1/ru-v1 --brief-file brief.md --plan-file plan.md --out prompt.md
fl-style-transfer skill check      --text candidate.md --brief-file brief.md --anchors anchors.json --profile profiles/author1/ru-v1

Первый запуск (skill)

  1. Положить тексты автора в corpus/<author_id>/ (txt/md/docx/odt/pdf).
  2. fl-style-transfer skill setup --skill-dir . --corpus corpus/<author_id> --author <author_id> — строит профиль, экспортирует задание на разметку абзацев (data/label_job.jsonl + data/labeler_prompt.md).
  3. Разметить абзацы своим LLM (формат JSONL: unit_id, dominant, secondary, confidence) и импортировать: fl-style-transfer skill labels import --profile profiles/<author_id>/ru-v1 --labels data/labels.jsonl.
  4. Дальше: skill retrieve собирает промпт для субагента (примеры автора + план), skill check проверяет кандидата (якоря, форматирование, шаблонные клише, англицизмы) и возвращает exit code 1 при провале.

Лицензия

MIT

Download files

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

Source Distribution

fl_style_transfer-0.2.0.tar.gz (85.3 kB view details)

Uploaded Source

Built Distribution

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

fl_style_transfer-0.2.0-py3-none-any.whl (115.5 kB view details)

Uploaded Python 3

File details

Details for the file fl_style_transfer-0.2.0.tar.gz.

File metadata

  • Download URL: fl_style_transfer-0.2.0.tar.gz
  • Upload date:
  • Size: 85.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fl_style_transfer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f347b546e31f4cf38f9bbcaaf6c454cabcea72faccf98e7377d95b80b10f3493
MD5 7165de582e3023da149d52530b6987f6
BLAKE2b-256 36981a4defa6babbcbd04763c422c37edf14e6f34a0204ab367d435410a8bd2b

See more details on using hashes here.

File details

Details for the file fl_style_transfer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fl_style_transfer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 115.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fl_style_transfer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03bbbeca2b3d2e9979316a39ebb0b3e932a752ff126e77b15276838d6d2fa3ca
MD5 e100461d675e8fa3c12b481f0dbf1f93
BLAKE2b-256 15da565986ec8d85ab657ca5efd4a11b4c725ef51a481b2f51a4771072e4a206

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 Sentry Error logging StatusPage Status page