File size: 3,184 Bytes
a09f110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312c142
32508e6
312c142
 
ffb5352
 
 
a09f110
 
24a79a8
 
 
a09f110
 
24a79a8
c1447cb
24a79a8
 
c1447cb
 
 
 
 
 
 
 
 
 
 
 
 
 
a09f110
 
 
 
 
 
 
 
 
c1447cb
 
 
a09f110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
APP_TITLE=ZuZu Writer
HOST=0.0.0.0
PORT=7860
SPACY_MODEL=en_core_web_sm
MAX_CHARS=1000000

# Self-hosted LanguageTool (ZuZu Grammar — full sentence grammar)
# Local LT sidecar:  docker compose up languagetool -d
# Then:              LANGUAGE_TOOL_URL=http://127.0.0.1:8010
# HF Space / Docker image: embedded LT starts automatically (LANGUAGE_TOOL_EMBEDDED=true)
LANGUAGE_TOOL_URL=http://127.0.0.1:8010
LANGUAGE_TOOL_LANGUAGE=en-US
LANGUAGE_TOOL_ENABLED=true
LANGUAGE_TOOL_TIMEOUT=90
LANGUAGE_TOOL_CHUNK_CHARS=1800
GRAMMAR_MAX_CHARS=50000
LANGUAGE_TOOL_EMBEDDED=true
# LANGUAGETOOL_JAVA_OPTS=-Xms256m -Xmx1024m

# Grammar cleanup runs after successful sentence reordering only.
GRAMMAR_FIX_OUTPUT=true

# Structural engine
ENGINE_BATCH_PARAS=20
ENGINE_MIN_CONFIDENCE=0.55
ENGINE_SAFETY_MIN=0.80
# When false, phrase/lexical use classical collocation brakes (no MiniLM).
ENGINE_USE_MINILM_SAFETY=false
# When MiniLM is off: aggressive wording each pass (option 2). false = tight anti-drift.
ENGINE_CLASSICAL_AGGRESSIVE=true
# Rotate between equally-ranked structures so repeat requests differ.
# false = deterministic output (same input always rewrites the same way).
ENGINE_STRUCTURAL_VARIATION=true
MINILM_MODEL=sentence-transformers/all-MiniLM-L6-v2

# Local CPU paraphraser — ON for generative pass divergence (needs torch + T5).
ENGINE_PARAPHRASE=true
ENGINE_PARAPHRASE_PRIMARY=true
ENGINE_PARAPHRASE_MODEL=Vamsi/T5_Paraphrase_Paws
ENGINE_PARAPHRASE_MIN_SIM=0.72
ENGINE_PARAPHRASE_NUM_RETURN=6
ENGINE_PARAPHRASE_MAX_NEW_TOKENS=72
ENGINE_PARAPHRASE_MAX_SURFACE=0.70
ENGINE_PARAPHRASE_MIN_DIVERGENCE=0.30

# Phrase-level rewrite (verb–object spans via WordNet hyponyms + optional T5)
ENGINE_PHRASE_REWRITE=true
# 0 = dynamic (1 normally, 2 with polish). Set 1–4 to hard-cap.
ENGINE_PHRASE_MAX_CHANGES=0
ENGINE_PHRASE_MIN_SIM=0.74
# Keep T5 span paraphrase off by default (WordNet phrase path is safer).
ENGINE_PHRASE_USE_T5=false

# Keep rewrite length near the source; trim only when clearly bloated.
ENGINE_PRESERVE_LENGTH=true
# Split long sentences on clause joins during structural fallback.
ENGINE_SPLIT_LONG=true
ENGINE_SPLIT_MIN_WORDS=16

# Legacy fixed cleft fallback (off by default)
ENGINE_FORCE_REWRITE=false

# Require rewriteable sentences to change wording when a safe option exists
ENGINE_REQUIRE_WORDING_CHANGE=true

# Low-impact vocabulary refinement after structure/paraphrase
ENGINE_LEXICAL_REFINEMENT=true
# 0 = fully dynamic synonym budget from sentence length (recommended).
# Set >0 only to hard-cap the dynamic budget (max 15).
ENGINE_LEXICAL_MAX_CHANGES=0
ENGINE_LEXICAL_MIN_WSD=0.14
ENGINE_LEXICAL_MIN_ZIPF=4.0
ENGINE_LEXICAL_MAX_FREQUENCY_GAP=0.60
# Prefer everyday (higher-frequency) synonyms via wordfreq, not word lists.
ENGINE_LEXICAL_PREFER_SIMPLER=true
ENGINE_LEXICAL_MAX_SIMPLER_GAP=2.5
ENGINE_LEXICAL_MAX_HARDER_GAP=0.15
ENGINE_WORDNET_LEXICON=oewn:2025

# Existing UI authentication and quotas (leave blank for open local mode)
GUEST_DAILY_REWRITES=1000
GUEST_MAX_WORDS=100
GUEST_DAILY_WORD_CAP=100
SESSION_IDLE_MINUTES=30

SUPABASE_URL=https://YOUR_PROJECT.supabase.co
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
SUPABASE_JWT_SECRET=