@opacedev/astro-ai-content-checker 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +138 -0
- package/LICENSE +9 -0
- package/README.md +236 -0
- package/SBOM.cdx.json +172 -0
- package/SECURITY.md +9 -0
- package/THIRD_PARTY_NOTICES.md +36 -0
- package/dist/build-report-html.d.ts +3 -0
- package/dist/highlight.js +155 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +43 -0
- package/dist/options.d.ts +21 -0
- package/dist/options.js +6 -0
- package/dist/receipt.d.ts +15 -0
- package/dist/receipt.js +100 -0
- package/dist/report.d.ts +55 -0
- package/dist/report.js +12 -0
- package/dist/sections.js +181 -0
- package/dist/share.d.ts +47 -0
- package/dist/share.js +72 -0
- package/dist/shared-EX54KI6H.js +1503 -0
- package/dist/shared-MMXWTX2U.js +43 -0
- package/dist/toolbar.js +13478 -0
- package/node_modules/@opacedev/ai-content-checker-browser/LICENSE +21 -0
- package/node_modules/@opacedev/ai-content-checker-browser/README.md +145 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/dom/visible-text.d.ts +14 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/dom/visible-text.js +47 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/index.d.ts +3 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/index.js +99 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/client.d.ts +12 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/client.js +17 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/entry.d.ts +1 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/entry.js +3984 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/protocol.d.ts +30 -0
- package/node_modules/@opacedev/ai-content-checker-browser/dist/worker/protocol.js +1 -0
- package/node_modules/@opacedev/ai-content-checker-browser/package.json +60 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/LICENSE +21 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/README.md +93 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/dist/index.d.ts +58 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/dist/index.js +17 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/package.json +57 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/analysis-request.schema.d.ts +44 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/analysis-result.schema.d.ts +122 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/candidate.schema.d.ts +81 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/capabilities.schema.d.ts +24 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/checker-result.schema.d.ts +342 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/common.schema.d.ts +10 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/envelope.schema.d.ts +14 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/gate-result.schema.d.ts +19 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/integrity-receipt.schema.d.ts +122 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/job.schema.d.ts +188 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/method-result.schema.d.ts +39 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/pattern-finding.schema.d.ts +26 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/protected-span.schema.d.ts +35 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/generated/rewrite-request.schema.d.ts +65 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/index.ts +63 -0
- package/node_modules/@opacedev/ai-content-checker-contracts/src/semantic-validation.mjs +32 -0
- package/node_modules/@opacedev/ai-content-checker-core/LICENSE +21 -0
- package/node_modules/@opacedev/ai-content-checker-core/README.md +186 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/bundle.js +4744 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/capabilities.d.ts +16 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/capabilities.js +7 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/diff/diff.d.ts +17 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/diff/diff.js +76 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/fixes/preview.d.ts +27 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/fixes/preview.js +47 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/gates/policy.d.ts +14 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/gates/policy.js +16 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/index.d.ts +15 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/index.js +15 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/inspect.d.ts +8 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/inspect.js +84 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-gb-v1.d.ts +12 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-gb-v1.js +68 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2-data.d.ts +73 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2-data.js +499 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2.d.ts +76 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v2.js +1067 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3-data.d.ts +165 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3-data.js +614 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3.d.ts +19 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v3.js +542 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-corpus.d.ts +40 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-corpus.js +40 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-data.d.ts +138 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4-data.js +200 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4.d.ts +71 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/patterns/en-signals-v4.js +388 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/protected/extract.d.ts +17 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/protected/extract.js +75 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/protected/validate.d.ts +3 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/protected/validate.js +17 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/provenance/c2pa-text.d.ts +55 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/provenance/c2pa-text.js +86 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/receipts/build.d.ts +48 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/receipts/build.js +61 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/report/checker-result.d.ts +241 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/report/checker-result.js +419 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/source/offsets.d.ts +34 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/source/offsets.js +51 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/source/utf8.d.ts +3 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/source/utf8.js +58 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/source/visible-text.d.ts +12 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/source/visible-text.js +30 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/data.d.ts +22 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/data.js +137 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/inspect.d.ts +16 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/unicode/inspect.js +84 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/verdict/combine.d.ts +162 -0
- package/node_modules/@opacedev/ai-content-checker-core/dist/verdict/combine.js +501 -0
- package/node_modules/@opacedev/ai-content-checker-core/package.json +62 -0
- package/node_modules/canonicalize/LICENSE +201 -0
- package/node_modules/canonicalize/README.md +65 -0
- package/node_modules/canonicalize/bin/canonicalize.js +17 -0
- package/node_modules/canonicalize/lib/canonicalize.d.ts +2 -0
- package/node_modules/canonicalize/lib/canonicalize.js +74 -0
- package/node_modules/canonicalize/package.json +64 -0
- package/node_modules/entities/LICENSE +11 -0
- package/node_modules/entities/lib/decode.d.ts +211 -0
- package/node_modules/entities/lib/decode.d.ts.map +1 -0
- package/node_modules/entities/lib/decode.js +536 -0
- package/node_modules/entities/lib/decode.js.map +1 -0
- package/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
- package/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
- package/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/node_modules/entities/lib/encode.d.ts +22 -0
- package/node_modules/entities/lib/encode.d.ts.map +1 -0
- package/node_modules/entities/lib/encode.js +77 -0
- package/node_modules/entities/lib/encode.js.map +1 -0
- package/node_modules/entities/lib/escape.d.ts +43 -0
- package/node_modules/entities/lib/escape.d.ts.map +1 -0
- package/node_modules/entities/lib/escape.js +122 -0
- package/node_modules/entities/lib/escape.js.map +1 -0
- package/node_modules/entities/lib/esm/decode.d.ts +211 -0
- package/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/decode.js +496 -0
- package/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
- package/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/node_modules/entities/lib/esm/encode.d.ts +22 -0
- package/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/encode.js +69 -0
- package/node_modules/entities/lib/esm/encode.js.map +1 -0
- package/node_modules/entities/lib/esm/escape.d.ts +43 -0
- package/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/escape.js +116 -0
- package/node_modules/entities/lib/esm/escape.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
- package/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
- package/node_modules/entities/lib/esm/index.d.ts +96 -0
- package/node_modules/entities/lib/esm/index.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/index.js +99 -0
- package/node_modules/entities/lib/esm/index.js.map +1 -0
- package/node_modules/entities/lib/esm/package.json +1 -0
- package/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/encode-html.js +12 -0
- package/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/node_modules/entities/lib/index.d.ts +96 -0
- package/node_modules/entities/lib/index.d.ts.map +1 -0
- package/node_modules/entities/lib/index.js +126 -0
- package/node_modules/entities/lib/index.js.map +1 -0
- package/node_modules/entities/package.json +90 -0
- package/node_modules/entities/readme.md +122 -0
- package/package.json +91 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* en-signals 2026.08.5 — shipped human reference corpus.
|
|
3
|
+
*
|
|
4
|
+
* A ~50KB varied-register corpus of verified-HUMAN English prose used as the
|
|
5
|
+
* conditional prior for the conditional-compression signal and as the source
|
|
6
|
+
* of the lexical-register reference profile (see en-signals-v4.ts). It ships
|
|
7
|
+
* inside the engine so both measurements run fully offline and byte-identically
|
|
8
|
+
* on every surface.
|
|
9
|
+
*
|
|
10
|
+
* Provenance (all public domain, published pre-1929 — and therefore also
|
|
11
|
+
* pre-2022, i.e. contamination-proof against LLM output; assembled 2026-08-28
|
|
12
|
+
* from Project Gutenberg plain-text files, fetched over HTTPS; scheme omitted below for the no-network source gate):
|
|
13
|
+
* - austen-pride-1813: Jane Austen, “Pride and Prejudice” (1813); register: fiction/dialogue;
|
|
14
|
+
* source file www.gutenberg.org/cache/epub/1342/pg1342.txt, slice from char offset 90000 (length 9600, 9144 chars after cleanup).
|
|
15
|
+
* - darwin-origin-1859: Charles Darwin, “On the Origin of Species” (1859); register: scientific argument;
|
|
16
|
+
* source file www.gutenberg.org/cache/epub/2009/pg2009.txt, slice from char offset 100000 (length 7600, 6900 chars after cleanup).
|
|
17
|
+
* - franklin-autobio-1791: Benjamin Franklin, “Autobiography” (1791); register: first-person memoir;
|
|
18
|
+
* source file www.gutenberg.org/cache/epub/148/pg148.txt, slice from char offset 30000 (length 7600, 6482 chars after cleanup).
|
|
19
|
+
* - twain-innocents-1869: Mark Twain, “The Innocents Abroad” (1869); register: travel journalism;
|
|
20
|
+
* source file www.gutenberg.org/cache/epub/3176/pg3176.txt, slice from char offset 60000 (length 7600, 7324 chars after cleanup).
|
|
21
|
+
* - federalist-1788: Hamilton/Madison/Jay, “The Federalist Papers” (1788); register: formal argument;
|
|
22
|
+
* source file www.gutenberg.org/cache/epub/1404/pg1404.txt, slice from char offset 32000 (length 7600, 7369 chars after cleanup).
|
|
23
|
+
* - beeton-household-1861: Isabella Beeton, “The Book of Household Management” (1861); register: practical instruction;
|
|
24
|
+
* source file www.gutenberg.org/cache/epub/10136/pg10136.txt, slice from char offset 150000 (length 7600, 6487 chars after cleanup).
|
|
25
|
+
* - smith-wealth-1776: Adam Smith, “The Wealth of Nations” (1776); register: economics;
|
|
26
|
+
* source file www.gutenberg.org/cache/epub/3300/pg3300.txt, slice from char offset 130000 (length 7600, 6558 chars after cleanup).
|
|
27
|
+
*
|
|
28
|
+
* Each slice was taken from a fixed character offset in the source file,
|
|
29
|
+
* snapped inward to paragraph boundaries, hard-wrap unwrapped, whitespace
|
|
30
|
+
* normalised, and illustration markers / chapter headings removed. The
|
|
31
|
+
* assembly script is retained at tests/battery/README-corpus provenance note;
|
|
32
|
+
* regeneration is deterministic given the source files.
|
|
33
|
+
*
|
|
34
|
+
* Known register caveat (documented, deliberate): every source predates 1929,
|
|
35
|
+
* so the corpus skews to formal period prose. The signals built on it are
|
|
36
|
+
* calibrated against MODERN human fixtures (see tests/battery/calibrate.mjs)
|
|
37
|
+
* precisely so that this register gap cannot by itself flag modern human
|
|
38
|
+
* writing; thresholds may only be tightened after re-calibration.
|
|
39
|
+
*/
|
|
40
|
+
export const REFERENCE_CORPUS = "At five o’clock the two ladies retired to dress, and at half-past six Elizabeth was summoned to dinner. To the civil inquiries which then poured in, and amongst which she had the pleasure of distinguishing the much superior solicitude of Mr. Bingley, she could not make a very favourable answer. Jane was by no means better. The sisters, on hearing this, repeated three or four times how much they were grieved, how shocking it was to have a bad cold, and how excessively they disliked being ill themselves; and then thought no more of the matter: and their indifference towards Jane, when not immediately before them, restored Elizabeth to the enjoyment of all her original dislike.\n\nTheir brother, indeed, was the only one of the party whom she could regard with any complacency. His anxiety for Jane was evident, and his attentions to herself most pleasing; and they prevented her feeling herself so much an intruder as she believed she was considered by the others. She had very little notice from any but him. Miss Bingley was engrossed by Mr. Darcy, her sister scarcely less so; and as for Mr. Hurst, by whom Elizabeth sat, he was an indolent man, who lived only to eat, drink, and play at cards, who, when he found her prefer a plain dish to a ragout, had nothing to say to her.\n\nWhen dinner was over, she returned directly to Jane, and Miss Bingley began abusing her as soon as she was out of the room. Her manners were pronounced to be very bad indeed,--a mixture of pride and impertinence: she had no conversation, no style, no taste, no beauty. Mrs. Hurst thought the same, and added,--\n\n“She has nothing, in short, to recommend her, but being an excellent walker. I shall never forget her appearance this morning. She really looked almost wild.”\n\n“She did indeed, Louisa. I could hardly keep my countenance. Very nonsensical to come at all! Why must _she_ be scampering about the country, because her sister had a cold? Her hair so untidy, so blowzy!”\n\n“Yes, and her petticoat; I hope you saw her petticoat, six inches deep in mud, I am absolutely certain, and the gown which had been let down to hide it not doing its office.”\n\n“Your picture may be very exact, Louisa,” said Bingley; “but this was all lost upon me. I thought Miss Elizabeth Bennet looked remarkably well when she came into the room this morning. Her dirty petticoat quite escaped my notice.”\n\n“_You_ observed it, Mr. Darcy, I am sure,” said Miss Bingley; “and I am inclined to think that you would not wish to see _your sister_ make such an exhibition.”\n\n“To walk three miles, or four miles, or five miles, or whatever it is, above her ancles in dirt, and alone, quite alone! what could she mean by it? It seems to me to show an abominable sort of conceited independence, a most country-town indifference to decorum.”\n\n“It shows an affection for her sister that is very pleasing,” said Bingley.\n\n“I am afraid, Mr. Darcy,” observed Miss Bingley, in a half whisper, “that this adventure has rather affected your admiration of her fine eyes.”\n\n“Not at all,” he replied: “they were brightened by the exercise.” A short pause followed this speech, and Mrs. Hurst began again,--\n\n“I have an excessive regard for Jane Bennet,--she is really a very sweet girl,--and I wish with all my heart she were well settled. But with such a father and mother, and such low connections, I am afraid there is no chance of it.”\n\n“I think I have heard you say that their uncle is an attorney in Meryton?”\n\n“Yes; and they have another, who lives somewhere near Cheapside.”\n\n“That is capital,” added her sister; and they both laughed heartily.\n\n“If they had uncles enough to fill _all_ Cheapside,” cried Bingley, “it would not make them one jot less agreeable.”\n\n“But it must very materially lessen their chance of marrying men of any consideration in the world,” replied Darcy.\n\nTo this speech Bingley made no answer; but his sisters gave it their hearty assent, and indulged their mirth for some time at the expense of their dear friend’s vulgar relations.\n\nWith a renewal of tenderness, however, they repaired to her room on leaving the dining-parlour, and sat with her till summoned to coffee. She was still very poorly, and Elizabeth would not quit her at all, till late in the evening, when she had the comfort of seeing her asleep, and when it appeared to her rather right than pleasant that she should go down stairs herself. On entering the drawing-room, she found the whole party at loo, and was immediately invited to join them; but suspecting them to be playing high, she declined it, and making her sister the excuse, said she would amuse herself, for the short time she could stay below, with a book. Mr. Hurst looked at her with astonishment.\n\n“Do you prefer reading to cards?” said he; “that is rather singular.”\n\n“Miss Eliza Bennet,” said Miss Bingley, “despises cards. She is a great reader, and has no pleasure in anything else.”\n\n“I deserve neither such praise nor such censure,” cried Elizabeth; “I am _not_ a great reader, and I have pleasure in many things.”\n\n“In nursing your sister I am sure you have pleasure,” said Bingley; “and I hope it will soon be increased by seeing her quite well.”\n\nElizabeth thanked him from her heart, and then walked towards a table where a few books were lying. He immediately offered to fetch her others; all that his library afforded.\n\n“And I wish my collection were larger for your benefit and my own credit; but I am an idle fellow; and though I have not many, I have more than I ever looked into.”\n\nElizabeth assured him that she could suit herself perfectly with those in the room.\n\n“I am astonished,” said Miss Bingley, “that my father should have left so small a collection of books. What a delightful library you have at Pemberley, Mr. Darcy!”\n\n“It ought to be good,” he replied: “it has been the work of many generations.”\n\n“And then you have added so much to it yourself--you are always buying books.”\n\n“I cannot comprehend the neglect of a family library in such days as these.”\n\n“Neglect! I am sure you neglect nothing that can add to the beauties of that noble place. Charles, when you build _your_ house, I wish it may be half as delightful as Pemberley.”\n\n“But I would really advise you to make your purchase in that neighbourhood, and take Pemberley for a kind of model. There is not a finer county in England than Derbyshire.”\n\n“With all my heart: I will buy Pemberley itself, if Darcy will sell it.”\n\n“I am talking of possibilities, Charles.”\n\n“Upon my word, Caroline, I should think it more possible to get Pemberley by purchase than by imitation.”\n\nElizabeth was so much caught by what passed, as to leave her very little attention for her book; and, soon laying it wholly aside, she drew near the card-table, and stationed herself between Mr. Bingley and his eldest sister, to observe the game.\n\n“Is Miss Darcy much grown since the spring?” said Miss Bingley: “will she be as tall as I am?”\n\n“I think she will. She is now about Miss Elizabeth Bennet’s height, or rather taller.”\n\n“How I long to see her again! I never met with anybody who delighted me so much. Such a countenance, such manners, and so extremely accomplished for her age! Her performance on the pianoforte is exquisite.”\n\n“It is amazing to me,” said Bingley, “how young ladies can have patience to be so very accomplished as they all are.”\n\n“All young ladies accomplished! My dear Charles, what do you mean?”\n\n“Yes, all of them, I think. They all paint tables, cover screens, and net purses. I scarcely know any one who cannot do all this; and I am sure I never heard a young lady spoken of for the first time, without being informed that she was very accomplished.”\n\n“Your list of the common extent of accomplishments,” said Darcy, “has too much truth. The word is applied to many a woman who deserves it no otherwise than by netting a purse or covering a screen; but I am very far from agreeing with you in your estimation of ladies in general. I cannot boast of knowing more than half-a-dozen in the whole range of my acquaintance that are really accomplished.”\n\n“Then,” observed Elizabeth, “you must comprehend a great deal in your idea of an accomplished woman.”\n\n“Yes; I do comprehend a great deal in it.”\n\n“Oh, certainly,” cried his faithful assistant, “no one can be really esteemed accomplished who does not greatly surpass what is usually met with. A woman must have a thorough knowledge of music, singing, drawing, dancing, and the modern languages, to deserve the word; and, besides all this, she must possess a certain something in her air and manner of walking, the tone of her voice, her address and expressions, or the word will be but half deserved.”\n\n“All this she must possess,” added Darcy; “and to all she must yet add something more substantial in the improvement of her mind by extensive reading.”\n\n“I am no longer surprised at your knowing _only_ six accomplished women. I rather wonder now at your knowing _any_.”\n\n“Are you so severe upon your own sex as to doubt the possibility of all this?”\n\n“_I_ never saw such a woman. _I_ never saw such capacity, and taste, and application, and elegance, as you describe, united.”.\n\nAt the present time, eminent breeders try by methodical selection, with a distinct object in view, to make a new strain or sub-breed, superior to anything of the kind in the country. But, for our purpose, a form of selection, which may be called unconscious, and which results from every one trying to possess and breed from the best individual animals, is more important. Thus, a man who intends keeping pointers naturally tries to get as good dogs as he can, and afterwards breeds from his own best dogs, but he has no wish or expectation of permanently altering the breed. Nevertheless we may infer that this process, continued during centuries, would improve and modify any breed, in the same way as Bakewell, Collins, &c., by this very same process, only carried on more methodically, did greatly modify, even during their lifetimes, the forms and qualities of their cattle. Slow and insensible changes of this kind could never be recognised unless actual measurements or careful drawings of the breeds in question have been made long ago, which may serve for comparison. In some cases, however, unchanged, or but little changed, individuals of the same breed exist in less civilised districts, where the breed has been less improved. There is reason to believe that King Charles’ spaniel has been unconsciously modified to a large extent since the time of that monarch. Some highly competent authorities are convinced that the setter is directly derived from the spaniel, and has probably been slowly altered from it. It is known that the English pointer has been greatly changed within the last century, and in this case the change has, it is believed, been chiefly effected by crosses with the foxhound; but what concerns us is, that the change has been effected unconsciously and gradually, and yet so effectually that, though the old Spanish pointer certainly came from Spain, Mr. Borrow has not seen, as I am informed by him, any native dog in Spain like our pointer.\n\nBy a similar process of selection, and by careful training, English race-horses have come to surpass in fleetness and size the parent Arabs, so that the latter, by the regulations for the Goodwood Races, are favoured in the weights which they carry. Lord Spencer and others have shown how the cattle of England have increased in weight and in early maturity, compared with the stock formerly kept in this country. By comparing the accounts given in various old treatises of the former and present state of carrier and tumbler pigeons in Britain, India, and Persia, we can trace the stages through which they have insensibly passed, and come to differ so greatly from the rock-pigeon.\n\nYouatt gives an excellent illustration of the effects of a course of selection which may be considered as unconscious, in so far that the breeders could never have expected, or even wished, to produce the result which ensued—namely, the production of the distinct strains. The two flocks of Leicester sheep kept by Mr. Buckley and Mr. Burgess, as Mr. Youatt remarks, “Have been purely bred from the original stock of Mr. Bakewell for upwards of fifty years. There is not a suspicion existing in the mind of any one at all acquainted with the subject that the owner of either of them has deviated in any one instance from the pure blood of Mr. Bakewell’s flock, and yet the difference between the sheep possessed by these two gentlemen is so great that they have the appearance of being quite different varieties.”\n\nIf there exist savages so barbarous as never to think of the inherited character of the offspring of their domestic animals, yet any one animal particularly useful to them, for any special purpose, would be carefully preserved during famines and other accidents, to which savages are so liable, and such choice animals would thus generally leave more offspring than the inferior ones; so that in this case there would be a kind of unconscious selection going on. We see the value set on animals even by the barbarians of Tierra del Fuego, by their killing and devouring their old women, in times of dearth, as of less value than their dogs.\n\nIn plants the same gradual process of improvement through the occasional preservation of the best individuals, whether or not sufficiently distinct to be ranked at their first appearance as distinct varieties, and whether or not two or more species or races have become blended together by crossing, may plainly be recognised in the increased size and beauty which we now see in the varieties of the heartsease, rose, pelargonium, dahlia, and other plants, when compared with the older varieties or with their parent-stocks. No one would ever expect to get a first-rate heartsease or dahlia from the seed of a wild plant. No one would expect to raise a first-rate melting pear from the seed of a wild pear, though he might succeed from a poor seedling growing wild, if it had come from a garden-stock. The pear, though cultivated in classical times, appears, from Pliny’s description, to have been a fruit of very inferior quality. I have seen great surprise expressed in horticultural works at the wonderful skill of gardeners in having produced such splendid results from such poor materials; but the art has been simple, and, as far as the final result is concerned, has been followed almost unconsciously. It has consisted in always cultivating the best known variety, sowing its seeds, and, when a slightly better variety chanced to appear, selecting it, and so onwards. But the gardeners of the classical period, who cultivated the best pears which they could procure, never thought what splendid fruit we should eat; though we owe our excellent fruit in some small degree to their having naturally chosen and preserved the best varieties they could anywhere find.\n\nA large amount of change, thus slowly and unconsciously accumulated, explains, as I believe, the well-known fact, that in a number of cases we cannot recognise, and therefore do not know, the wild parent-stocks of the plants which have been longest cultivated in our flower and kitchen gardens. If it has taken centuries or thousands of years to improve or modify most of our plants up to their present standard of usefulness to man, we can understand how it is that neither Australia, the Cape of Good Hope, nor any other region inhabited by quite uncivilised man, has afforded us a single plant worth culture. It is not that these countries, so rich in species, do not by a strange chance possess the aboriginal stocks of any useful plants, but that the native plants have not been improved by continued selection up to a standard of perfection comparable with that acquired by the plants in countries anciently civilised.\n\nIn regard to the domestic animals kept by uncivilised man, it should not be overlooked that they almost always have to struggle for their own food, at least during certain seasons.\n\nAbout this time I met with an odd volume of the Spectator. It was the third. I had never before seen any of them. I bought it, read it over and over, and was much delighted with it. I thought the writing excellent, and wished, if possible, to imitate it. With this view I took some of the papers, and, making short hints of the sentiment in each sentence, laid them by a few days, and then, without looking at the book, try'd to compleat the papers again, by expressing each hinted sentiment at length, and as fully as it had been expressed before, in any suitable words that should come to hand. Then I compared my Spectator with the original, discovered some of my faults, and corrected them. But I found I wanted a stock of words, or a readiness in recollecting and using them, which I thought I should have acquired before that time if I had gone on making verses; since the continual occasion for words of the same import, but of different length, to suit the measure, or of different sound for the rhyme, would have laid me under a constant necessity of searching for variety, and also have tended to fix that variety in my mind, and make me master of it. Therefore I took some of the tales and turned them into verse; and, after a time, when I had pretty well forgotten the prose, turned them back again. I also sometimes jumbled my collections of hints into confusion, and after some weeks endeavored to reduce them into the best order, before I began to form the full sentences and compleat the paper. This was to teach me method in the arrangement of thoughts. By comparing my work afterwards with the original, I discovered many faults and amended them; but I sometimes had the pleasure of fancying that, in certain particulars of small import, I had been lucky enough to improve the method or the language, and this encouraged me to think I might possibly in time come to be a tolerable English writer, of which I was extremely ambitious. My time for these exercises and for reading was at night, after work or before it began in the morning, or on Sundays, when I contrived to be in the printing-house alone, evading as much as I could the common attendance on public worship which my father used to exact on me when I was under his care, and which indeed I still thought a duty, though I could not, as it seemed to me, afford time to practise it.\n\nWhen about 16 years of age I happened to meet with a book, written by one Tryon, recommending a vegetable diet. I determined to go into it. My brother, being yet unmarried, did not keep house, but boarded himself and his apprentices in another family. My refusing to eat flesh occasioned an inconveniency, and I was frequently chid for my singularity. I made myself acquainted with Tryon's manner of preparing some of his dishes, such as boiling potatoes or rice, making hasty pudding, and a few others, and then proposed to my brother, that if he would give me, weekly, half the money he paid for my board, I would board myself. He instantly agreed to it, and I presently found that I could save half what he paid me. This was an additional fund for buying books. But I had another advantage in it. My brother and the rest going from the printing-house to their meals, I remained there alone, and, despatching presently my light repast, which often was no more than a bisket or a slice of bread, a handful of raisins or a tart from the pastry-cook's, and a glass of water, had the rest of the time till their return for study, in which I made the greater progress, from that greater clearness of head and quicker apprehension which usually attend temperance in eating and drinking.\n\nAnd now it was that, being on some occasion made asham'd of my ignorance in figures, which I had twice failed in learning when at school, I took Cocker's book of Arithmetick, and went through the whole by myself with great ease. I also read Seller's and Shermy's books of Navigation, and became acquainted with the little geometry they contain; but never proceeded far in that science. And I read about this time Locke On Human Understanding, and the Art of Thinking, by Messrs. du Port Royal.\n\nWhile I was intent on improving my language, I met with an English grammar (I think it was Greenwood's), at the end of which there were two little sketches of the arts of rhetoric and logic, the latter finishing with a specimen of a dispute in the Socratic method; and soon after I procur'd Xenophon's Memorable Things of Socrates, wherein there are many instances of the same method. I was charm'd with it, adopted it, dropt my abrupt contradiction and positive argumentation, and put on the humble inquirer and doubter. And being then, from reading Shaftesbury and Collins, become a real doubter in many points of our religious doctrine, I found this method safest for myself and very embarrassing to those against whom I used it; therefore I took a delight in it, practis'd it continually, and grew very artful and expert in drawing people, even of superior knowledge, into concessions, the consequences of which they did not foresee, entangling them in difficulties out of which they could not extricate themselves, and so obtaining victories that neither myself nor my cause always deserved. I continu'd this method some few years, but gradually left it, retaining only the habit of expressing myself in terms of modest diffidence; never using, when I advanced any thing that may possibly be disputed, the words certainly, undoubtedly, or any others that give the air of positiveness to an opinion; but rather say, I conceive or apprehend a thing to be so and so; it appears to me, or I should think it so or so, for such and such reasons; or I imagine it to be so; or it is so, if I am not mistaken. This habit, I believe, has been of great advantage to me when I have had occasion to inculcate my opinions, and persuade men into measures that I have been from time to time engag'd in promoting; and, as the chief ends of conversation are to inform or to be informed, to please or to persuade, I wish well-meaning, sensible men would not lessen their power of doing good by a positive, assuming manner, that seldom fails to disgust, tends to create opposition, and to defeat every one of those purposes for which speech was given to us, to wit, giving or receiving information or pleasure. For, if you would inform, a positive and dogmatical manner in advancing your sentiments may provoke contradiction and prevent a candid attention.\n\n“Oh, everything. Latitude and longitude, noon every day; and how many miles we made last twenty-four hours; and all the domino games I beat and horse billiards; and whales and sharks and porpoises; and the text of the sermon Sundays (because that'll tell at home, you know); and the ships we saluted and what nation they were; and which way the wind was, and whether there was a heavy sea, and what sail we carried, though we don't ever carry any, principally, going against a head wind always--wonder what is the reason of that?--and how many lies Moult has told--Oh, every thing! I've got everything down. My father told me to keep that journal. Father wouldn't take a thousand dollars for it when I get it done.”\n\n“No, Jack; it will be worth more than a thousand dollars--when you get it done.”\n\n“Do you?--no, but do you think it will, though?\n\n“Yes, it will be worth at least as much as a thousand dollars--when you get it done. May be more.”\n\n“Well, I about half think so, myself. It ain't no slouch of a journal.”\n\nBut it shortly became a most lamentable “slouch of a journal.” One night in Paris, after a hard day's toil in sightseeing, I said:\n\n“Now I'll go and stroll around the cafes awhile, Jack, and give you a chance to write up your journal, old fellow.”\n\n“Well, no, you needn't mind. I think I won't run that journal anymore. It is awful tedious. Do you know--I reckon I'm as much as four thousand pages behind hand. I haven't got any France in it at all. First I thought I'd leave France out and start fresh. But that wouldn't do, would it? The governor would say, 'Hello, here--didn't see anything in France? That cat wouldn't fight, you know. First I thought I'd copy France out of the guide-book, like old Badger in the for'rard cabin, who's writing a book, but there's more than three hundred pages of it. Oh, I don't think a journal's any use--do you? They're only a bother, ain't they?”\n\n“Yes, a journal that is incomplete isn't of much use, but a journal properly kept is worth a thousand dollars--when you've got it done.”\n\n“A thousand!--well, I should think so. I wouldn't finish it for a million.”\n\nHis experience was only the experience of the majority of that industrious night school in the cabin. If you wish to inflict a heartless and malignant punishment upon a young person, pledge him to keep a journal a year.\n\nA good many expedients were resorted to to keep the excursionists amused and satisfied. A club was formed, of all the passengers, which met in the writing school after prayers and read aloud about the countries we were approaching and discussed the information so obtained.\n\nSeveral times the photographer of the expedition brought out his transparent pictures and gave us a handsome magic-lantern exhibition. His views were nearly all of foreign scenes, but there were one or two home pictures among them. He advertised that he would “open his performance in the after cabin at 'two bells' (nine P.M.) and show the passengers where they shall eventually arrive”--which was all very well, but by a funny accident the first picture that flamed out upon the canvas was a view of Greenwood Cemetery!\n\nOn several starlight nights we danced on the upper deck, under the awnings, and made something of a ball-room display of brilliancy by hanging a number of ship's lanterns to the stanchions. Our music consisted of the well-mixed strains of a melodeon which was a little asthmatic and apt to catch its breath where it ought to come out strong, a clarinet which was a little unreliable on the high keys and rather melancholy on the low ones, and a disreputable accordion that had a leak somewhere and breathed louder than it squawked--a more elegant term does not occur to me just now. However, the dancing was infinitely worse than the music. When the ship rolled to starboard the whole platoon of dancers came charging down to starboard with it, and brought up in mass at the rail; and when it rolled to port they went floundering down to port with the same unanimity of sentiment. Waltzers spun around precariously for a matter of fifteen seconds and then went scurrying down to the rail as if they meant to go overboard. The Virginia reel, as performed on board the __Quaker City__, had more genuine reel about it than any reel I ever saw before, and was as full of interest to the spectator as it was full of desperate chances and hairbreadth escapes to the participant. We gave up dancing, finally.\n\nWe celebrated a lady's birthday anniversary with toasts, speeches, a poem, and so forth. We also had a mock trial. No ship ever went to sea that hadn't a mock trial on board. The purser was accused of stealing an overcoat from stateroom No. 10. A judge was appointed; also clerks, a crier of the court, constables, sheriffs; counsel for the State and for the defendant; witnesses were subpoenaed, and a jury empaneled after much challenging. The witnesses were stupid and unreliable and contradictory, as witnesses always are. The counsel were eloquent, argumentative, and vindictively abusive of each other, as was characteristic and proper. The case was at last submitted and duly finished by the judge with an absurd decision and a ridiculous sentence.\n\nThe acting of charades was tried on several evenings by the young gentlemen and ladies, in the cabins, and proved the most distinguished success of all the amusement experiments.\n\nAn attempt was made to organize a debating club, but it was a failure. There was no oratorical talent in the ship.\n\nWe all enjoyed ourselves--I think I can safely say that, but it was in a rather quiet way. We very, very seldom played the piano; we played the flute and the clarinet together, and made good music, too, what there was of it, but we always played the same old tune; it was a very pretty tune --how well I remember it--I wonder when I shall ever get rid of it. We never played either the melodeon or the organ except at devotions--but I am too fast: young Albert did know part of a tune something about “O Something-Or-Other How Sweet It Is to Know That He's His What's-his-Name” (I do not remember the exact title of it, but it was very plaintive and full of sentiment); Albert played that pretty much all the time until we contracted with him to restrain himself. But nobody ever sang by moonlight on the upper deck, and the congregational singing at church and prayers was not of a superior order of architecture. I put up with it as long as I could and then joined in and tried to improve it, but this encouraged young George to join in too, and that made a failure of it; because George's voice was just “turning,” and when he was singing a dismal sort of bass it was apt to fly off the handle and startle everybody with a most discordant cackle on the upper notes. George didn't know the tunes, either, which was also a drawback to his performances. I said:\n\n“Come, now, George, don't improvise. It looks too egotistical. It will provoke remark. Just stick to 'Coronation,' like the others. It is a good tune--you can't improve it any, just off-hand, in this way.”\n\n“Why, I'm not trying to improve it--and I am singing like the others --just as it is in the notes.”\n\nAnd he honestly thought he was, too; and so he had no one to blame but himself when his voice caught on the center occasionally and gave him the lockjaw.\n\nIn the trade to China and India, we interfere with more than one nation, inasmuch as it enables us to partake in advantages which they had in a manner monopolized, and as we thereby supply ourselves with commodities which we used to purchase from them.\n\nThe extension of our own commerce in our own vessels cannot give pleasure to any nations who possess territories on or near this continent, because the cheapness and excellence of our productions, added to the circumstance of vicinity, and the enterprise and address of our merchants and navigators, will give us a greater share in the advantages which those territories afford, than consists with the wishes or policy of their respective sovereigns.\n\nSpain thinks it convenient to shut the Mississippi against us on the one side, and Britain excludes us from the Saint Lawrence on the other; nor will either of them permit the other waters which are between them and us to become the means of mutual intercourse and traffic.\n\nFrom these and such like considerations, which might, if consistent with prudence, be more amplified and detailed, it is easy to see that jealousies and uneasinesses may gradually slide into the minds and cabinets of other nations, and that we are not to expect that they should regard our advancement in union, in power and consequence by land and by sea, with an eye of indifference and composure.\n\nThe people of America are aware that inducements to war may arise out of these circumstances, as well as from others not so obvious at present, and that whenever such inducements may find fit time and opportunity for operation, pretenses to color and justify them will not be wanting. Wisely, therefore, do they consider union and a good national government as necessary to put and keep them in SUCH A SITUATION as, instead of INVITING war, will tend to repress and discourage it. That situation consists in the best possible state of defense, and necessarily depends on the government, the arms, and the resources of the country.\n\nAs the safety of the whole is the interest of the whole, and cannot be provided for without government, either one or more or many, let us inquire whether one good government is not, relative to the object in question, more competent than any other given number whatever.\n\nOne government can collect and avail itself of the talents and experience of the ablest men, in whatever part of the Union they may be found. It can move on uniform principles of policy. It can harmonize, assimilate, and protect the several parts and members, and extend the benefit of its foresight and precautions to each. In the formation of treaties, it will regard the interest of the whole, and the particular interests of the parts as connected with that of the whole. It can apply the resources and power of the whole to the defense of any particular part, and that more easily and expeditiously than State governments or separate confederacies can possibly do, for want of concert and unity of system. It can place the militia under one plan of discipline, and, by putting their officers in a proper line of subordination to the Chief Magistrate, will, as it were, consolidate them into one corps, and thereby render them more efficient than if divided into thirteen or into three or four distinct independent companies.\n\nWhat would the militia of Britain be if the English militia obeyed the government of England, if the Scotch militia obeyed the government of Scotland, and if the Welsh militia obeyed the government of Wales? Suppose an invasion; would those three governments (if they agreed at all) be able, with all their respective forces, to operate against the enemy so effectually as the single government of Great Britain would?\n\nWe have heard much of the fleets of Britain, and the time may come, if we are wise, when the fleets of America may engage attention. But if one national government, had not so regulated the navigation of Britain as to make it a nursery for seamen--if one national government had not called forth all the national means and materials for forming fleets, their prowess and their thunder would never have been celebrated. Let England have its navigation and fleet--let Scotland have its navigation and fleet--let Wales have its navigation and fleet--let Ireland have its navigation and fleet--let those four of the constituent parts of the British empire be under four independent governments, and it is easy to perceive how soon they would each dwindle into comparative insignificance.\n\nApply these facts to our own case. Leave America divided into thirteen or, if you please, into three or four independent governments--what armies could they raise and pay--what fleets could they ever hope to have? If one was attacked, would the others fly to its succor, and spend their blood and money in its defense? Would there be no danger of their being flattered into neutrality by its specious promises, or seduced by a too great fondness for peace to decline hazarding their tranquillity and present safety for the sake of neighbors, of whom perhaps they have been jealous, and whose importance they are content to see diminished? Although such conduct would not be wise, it would, nevertheless, be natural. The history of the states of Greece, and of other countries, abounds with such instances, and it is not improbable that what has so often happened would, under similar circumstances, happen again.\n\nBut admit that they might be willing to help the invaded State or confederacy. How, and when, and in what proportion shall aids of men and money be afforded? Who shall command the allied armies, and from which of them shall he receive his orders? Who shall settle the terms of peace, and in case of disputes what umpire shall decide between them and compel acquiescence? Various difficulties and inconveniences would be inseparable from such a situation; whereas one government, watching over the general and common interests, and combining and directing the powers and resources of the whole, would be free from all these embarrassments, and conduce far more to the safety of the people.\n\nBut whatever may be our situation, whether firmly united under one national government, or split into a number of confederacies, certain it is, that foreign nations will know and view it exactly as it is; and they will act toward us accordingly. If they see that our national government is efficient and well administered, our trade prudently regulated, our militia properly organized and disciplined, our resources and finances discreetly managed, our credit re-established, our people free, contented, and united, they will be much more disposed to cultivate our friendship than provoke our resentment. If, on the other hand, they find us either destitute of an effectual government (each State doing right or wrong, as to its rulers may seem convenient), or split into three or four independent and probably discordant republics or confederacies, one inclining to Britain, another to France, and a third to Spain, and perhaps played off against each other by the three, what a poor, pitiful figure will America make in their eyes! How liable would she become not only to their contempt but to their outrage, and how soon would dear-bought experience proclaim that when a people or family so divide, it never fails to be against themselves.\n\n\"The world was sad! the garden was a wild! And man the hermit sigh'd, till _woman_ smiled.\"\n\nLet her prove herself, then, the happy companion of man, and able to take unto herself the praises of the pious prelate, Jeremy Taylor, who says,--\"A good wife is Heaven's last best gift to man,--his angel and minister of graces innumerable,--his gem of many virtues,--his casket of jewels--her voice is sweet music--her smiles his brightest day;--her kiss, the guardian of his innocence;--her arms, the pale of his safety, the balm of his health, the balsam of his life;--her industry, his surest wealth;--her economy, his safest steward;--her lips, his faithful counsellors;--her bosom, the softest pillow of his cares; and her prayers, the ablest advocates of Heaven's blessings on his head.\"\n\nCherishing, then, in her breast the respected utterances of the good and the great, let the mistress of every house rise to the responsibility of its management; so that, in doing her duty to all around her, she may receive the genuine reward of respect, love, and affection!\n\nAlthough the choice of a house must be dependent on so many different circumstances with different people, that to give any specific directions on this head would be impossible and useless; yet it will be advantageous, perhaps, to many, if we point out some of those general features as to locality, soil, aspect, &c., to which the attention of all house-takers should be carefully directed.\n\nRegarding the locality, we may say, speaking now more particularly of a town house, that it is very important to the health and comfort of a family, that the neighbourhood of all factories of any kind, producing unwholesome effluvia or smells, should be strictly avoided. Neither is it well to take a house in the immediate vicinity of where a noisy trade is carried on, as it is unpleasant to the feelings, and tends to increase any existing irritation of the system.\n\nReferring to soils; it is held as a rule, that a gravel soil is superior to any other, as the rain drains through it very quickly, and it is consequently drier and less damp than clay, upon which water rests a far longer time. A clay country, too, is not so pleasant for walking exercise as one in which gravel predominates.\n\nThe aspect of the house should be well considered, and it should be borne in mind that the more sunlight that comes into the house, the healthier is the habitation. The close, fetid smell which assails one on entering a narrow court, or street, in towns, is to be assigned to the want of light, and, consequently, air. A house with a south or south-west aspect, is lighter, warmer, drier, and consequently more healthy, than one facing the north or north-east.\n\nGreat advances have been made, during the last few years, in the principles of sanitary knowledge, and one most essential point to be observed in reference to a house, is its \"drainage,\" as it has been proved in an endless number of cases, that bad or defective drainage is as certain to destroy health as the taking of poisons. This arises from its injuriously affecting the atmosphere; thus rendering the air we breathe unwholesome and deleterious. Let it be borne in mind, then, that unless a house is effectually drained, the health of its inhabitants is sure to suffer; and they will be susceptible of ague, rheumatism, diarrhoea, fevers, and cholera.\n\nWe now come to an all-important point,--that of the water supply. The value of this necessary article has also been lately more and more recognized in connection with the question of health and life; and most houses are well supplied with every convenience connected with water. Let it, however, be well understood, that no house, however suitable in other respects, can be desirable, if this grand means of health and comfort is, in the slightest degree, scarce or impure. No caution can be too great to see that it is pure and good, as well as plentiful; for, knowing, as we do, that not a single part of our daily food is prepared without it, the importance of its influence on the health of the inmates of a house cannot be over-rated.\n\nVentilation is another feature which must not be overlooked. In a general way, enough of air is admitted by the cracks round the doors and windows; but if this be not the case, the chimney will smoke; and other plans, such as the placing of a plate of finely-perforated zinc in the upper part of the window, must be used. Cold air should never be admitted under the doors, or at the bottom of a room, unless it be close to the fire or stove; for it will flow along the floor towards the fireplace, and thus leave the foul air in the upper part of the room, unpurified, cooling, at the same time, unpleasantly and injuriously, the feet and legs of the inmates.\n\nThe rent of a house, it has been said, should not exceed one-eighth of the whole income of its occupier; and, as a general rule, we are disposed to assent to this estimate, although there may be many circumstances which would not admit of its being considered infallible.\n\n55. AS SECOND IN COMMAND IN THE HOUSE, except in large establishments, where there is a house steward, the housekeeper must consider herself as the immediate representative of her mistress, and bring, to the management of the household, all those qualities of honesty, industry, and vigilance, in the same degree as if she were at the head of her _own_ family. Constantly on the watch to detect any wrong-doing on the part of any of the domestics, she will overlook all that goes on in the house, and will see that every department is thoroughly attended to, and that the servants are comfortable, at the same time that their various duties are properly performed.\n\nCleanliness, punctuality, order, and method, are essentials in the character of a good housekeeper. Without the first, no household can be said to be well managed. The second is equally all-important; for those who are under the housekeeper will take their \"cue\" from her; and in the same proportion as punctuality governs her movements, so will it theirs. Order, again, is indispensable; for by it we wish to be understood that \"there should be a place for everything, and everything in its place.\" Method, too, is most necessary; for when the work is properly contrived, and each part arranged in regular succession, it will be done more quickly and more effectually.\n\n56. A NECESSARY QUALIFICATION FOR A HOUSEKEEPER is, that she should thoroughly understand accounts.\n\nCommon farmers seldom employ any overseer to direct the general operations of the farm. They generally, too, work a good deal with their own hands, as ploughmen, harrowers, etc. What remains of the crop, after paying the rent, therefore, should not only replace to them their stock employed in cultivation, together with its ordinary profits, but pay them the wages which are due to them, both as labourers and overseers. Whatever remains, however, after paying the rent and keeping up the stock, is called profit. But wages evidently make a part of it. The farmer, by saving these wages, must necessarily gain them. Wages, therefore, are in this case confounded with profit.\n\nAn independent manufacturer, who has stock enough both to purchase materials, and to maintain himself till he can carry his work to market, should gain both the wages of a journeyman who works under a master, and the profit which that master makes by the sale of that journeyman’s work. His whole gains, however, are commonly called profit, and wages are, in this case, too, confounded with profit.\n\nA gardener who cultivates his own garden with his own hands, unites in his own person the three different characters, of landlord, farmer, and labourer. His produce, therefore, should pay him the rent of the first, the profit of the second, and the wages of the third. The whole, however, is commonly considered as the earnings of his labour. Both rent and profit are, in this case, confounded with wages.\n\nAs in a civilized country there are but few commodities of which the exchangeable value arises from labour only, rent and profit contributing largely to that of the far greater part of them, so the annual produce of its labour will always be sufficient to purchase or command a much greater quantity of labour than what was employed in raising, preparing, and bringing that produce to market. If the society were annually to employ all the labour which it can annually purchase, as the quantity of labour would increase greatly every year, so the produce of every succeeding year would be of vastly greater value than that of the foregoing. But there is no country in which the whole annual produce is employed in maintaining the industrious. The idle everywhere consume a great part of it; and, according to the different proportions in which it is annually divided between those two different orders of people, its ordinary or average value must either annually increase or diminish, or continue the same from one year to another.\n\nThere is in every society or neighbourhood an ordinary or average rate, both of wages and profit, in every different employment of labour and stock. This rate is naturally regulated, as I shall shew hereafter, partly by the general circumstances of the society, their riches or poverty, their advancing, stationary, or declining condition, and partly by the particular nature of each employment.\n\nThere is likewise in every society or neighbourhood an ordinary or average rate of rent, which is regulated, too, as I shall shew hereafter, partly by the general circumstances of the society or neighbourhood in which the land is situated, and partly by the natural or improved fertility of the land.\n\nThese ordinary or average rates may be called the natural rates of wages, profit and rent, at the time and place in which they commonly prevail.\n\nWhen the price of any commodity is neither more nor less than what is sufficient to pay the rent of the land, the wages of the labour, and the profits of the stock employed in raising, preparing, and bringing it to market, according to their natural rates, the commodity is then sold for what may be called its natural price.\n\nThe commodity is then sold precisely for what it is worth, or for what it really costs the person who brings it to market; for though, in common language, what is called the prime cost of any commodity does not comprehend the profit of the person who is to sell it again, yet, if he sells it at a price which does not allow him the ordinary rate of profit in his neighbourhood, he is evidently a loser by the trade; since, by employing his stock in some other way, he might have made that profit. His profit, besides, is his revenue, the proper fund of his subsistence. As, while he is preparing and bringing the goods to market, he advances to his workmen their wages, or their subsistence; so he advances to himself, in the same manner, his own subsistence, which is generally suitable to the profit which he may reasonably expect from the sale of his goods. Unless they yield him this profit, therefore, they do not repay him what they may very properly be said to have really cost him.\n\nThough the price, therefore, which leaves him this profit, is not always the lowest at which a dealer may sometimes sell his goods, it is the lowest at which he is likely to sell them for any considerable time; at least where there is perfect liberty, or where he may change his trade as often as he pleases.\n\nThe actual price at which any commodity is commonly sold, is called its market price. It may either be above, or below, or exactly the same with its natural price.\n\nThe market price of every particular commodity is regulated by the proportion between the quantity which is actually brought to market, and the demand of those who are willing to pay the natural price of the commodity, or the whole value of the rent, labour, and profit, which must be paid in order to bring it thither. Such people may be called the effectual demanders, and their demand the effectual demand; since it maybe sufficient to effectuate the bringing of the commodity to market. It is different from the absolute demand. A very poor man may be said, in some sense, to have a demand for a coach and six; he might like to have it; but his demand is not an effectual demand, as the commodity can never be brought to market in order to satisfy it.\n\nWhen the quantity of any commodity which is brought to market falls short of the effectual demand, all those who are willing to pay the whole value of the rent, wages, and profit, which must be paid in order to bring it thither, cannot be supplied with the quantity which they want. Rather than want it altogether, some of them will be willing to give more. A competition will immediately begin among them, and the market price will rise more or less above the natural price, according as either the greatness of the deficiency, or the wealth and wanton luxury of the competitors, happen to animate more or less the eagerness of the competition.";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule data for the en-signals 2026.08.5 measured-stylometrics + owner-rhythm
|
|
3
|
+
* pack.
|
|
4
|
+
*
|
|
5
|
+
* Sources:
|
|
6
|
+
* - research/CLEAN-PROSE-DETECTION-PLAN.md §2 (the empiricist run's three
|
|
7
|
+
* surviving cheap signals: window-corrected sentence-length spectral
|
|
8
|
+
* flatness, conditional compression against a shipped human reference
|
|
9
|
+
* corpus, lexical register distance) and §3.1 (Tier 1 framing: continuous
|
|
10
|
+
* "machine-pattern evidence", never a standalone AI verdict).
|
|
11
|
+
* - research/OWNER-RHYTHM-NOTES.md (punchline-fragment density, mic-drop
|
|
12
|
+
* paragraph shape, contrast-construction density, rhetorical-vs-procedural
|
|
13
|
+
* ratio) including its guardrail: skilled human copywriters legitimately
|
|
14
|
+
* use punchlines, so every rule here is corroboration-weight (tier B), low
|
|
15
|
+
* severity, density/threshold-based, and never fires on a single instance.
|
|
16
|
+
*
|
|
17
|
+
* Binding constraints honoured (do not relax without re-reading the plan):
|
|
18
|
+
* - The plan's §2.3 combo trap: hand thresholds calibrated on a handful of
|
|
19
|
+
* human controls overfit. Every threshold below is chosen FP-first with
|
|
20
|
+
* margin against all repository human fixtures via
|
|
21
|
+
* tests/battery/calibrate.mjs, and is PROVISIONAL until the 30-50-sample
|
|
22
|
+
* genre-matched human corpus (tests/battery/human-corpus-v1.json) confirms
|
|
23
|
+
* it. Thresholds may be loosened freely; tightening requires a calibration
|
|
24
|
+
* re-run over that corpus.
|
|
25
|
+
* - The stylometric cap in en-signals-v2.ts applies to every category here:
|
|
26
|
+
* rhythm measurements can never dominate a verdict (Stanford TOEFL
|
|
27
|
+
* correction, AI-TELLS-MEGA-PACK §6).
|
|
28
|
+
* - For the finding-breadth escalation, all 2026.08.5 categories count as ONE
|
|
29
|
+
* combined stylometric contribution (wired in en-signals-v2.ts): four
|
|
30
|
+
* rhythm rules alone must never escalate a classification.
|
|
31
|
+
*
|
|
32
|
+
* All categories are era "evergreen" (they measure structure, not vocabulary
|
|
33
|
+
* fashions) and carry `corroboration: true`.
|
|
34
|
+
*/
|
|
35
|
+
/** The 2026.08.5 categories. One set drives corroboration metadata, the
|
|
36
|
+
* stylometric score cap, and the combined-breadth treatment. */
|
|
37
|
+
export declare const V4_RHYTHM_CATEGORIES: ReadonlySet<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Calibrated thresholds, exported by name so tests/battery/calibrate.mjs can
|
|
40
|
+
* print every fixture's measured value against the shipped gate. Values are
|
|
41
|
+
* chosen FP-first: below/above the worst human fixture with margin (see the
|
|
42
|
+
* calibration table in the workstream report). PROVISIONAL pending the
|
|
43
|
+
* 40-sample human corpus.
|
|
44
|
+
*/
|
|
45
|
+
export declare const V4_THRESHOLDS: {
|
|
46
|
+
/** Fixed window length in sentences for the spectral estimator — the
|
|
47
|
+
* plan's length-artefact correction: flatness is only compared between
|
|
48
|
+
* equal-length series. */
|
|
49
|
+
readonly spectralWindowSentences: 12;
|
|
50
|
+
/** Minimum number of full windows before the signal is computed. */
|
|
51
|
+
readonly spectralMinWindows: 2;
|
|
52
|
+
/** Fire when the window-averaged spectral flatness falls below this. */
|
|
53
|
+
readonly spectralFlatnessMax: 0.28;
|
|
54
|
+
/** Conditional compression is computed only inside this word band: the
|
|
55
|
+
* gain statistic falls with document length for EVERY author (the plan's
|
|
56
|
+
* length-confound warning), so out-of-band documents are exempt rather
|
|
57
|
+
* than mis-thresholded. */
|
|
58
|
+
readonly compressionMinWords: 250;
|
|
59
|
+
readonly compressionMaxWords: 900;
|
|
60
|
+
/** Fire when the relative gain from the human-corpus prior falls below
|
|
61
|
+
* this. Calibrated in-band: the lowest human sample measured 0.177; the
|
|
62
|
+
* chat-export-furniture positive measures ~0.10. */
|
|
63
|
+
readonly compressionGainMin: 0.14;
|
|
64
|
+
/** Minimum words before the register profile is computed (the L1 distance
|
|
65
|
+
* is noisy on short texts — a 50-word human note measures >0.5). */
|
|
66
|
+
readonly registerMinWords: 300;
|
|
67
|
+
/** Fire when function-word L1 distance from the human reference profile
|
|
68
|
+
* exceeds this AND the long-word share exceeds the reference by the
|
|
69
|
+
* delta below (both must hold — the genre-confound guard). Calibrated:
|
|
70
|
+
* the highest human fixture measured funcL1 0.266 / longΔ 0.058. */
|
|
71
|
+
readonly registerFuncL1Min: 0.3;
|
|
72
|
+
readonly registerLongWordDeltaMin: 0.1;
|
|
73
|
+
/** Punchline fragments: at least this many, at at least this share of
|
|
74
|
+
* sentences, with at least this many paragraph-final. */
|
|
75
|
+
readonly punchlineMinCount: 4;
|
|
76
|
+
readonly punchlineMinRate: 0.18;
|
|
77
|
+
readonly punchlineMinParagraphFinal: 2;
|
|
78
|
+
/** Mic-drop paragraphs required before the rule fires (never one). */
|
|
79
|
+
readonly micDropMinParagraphs: 2;
|
|
80
|
+
/** Contrast constructions: minimum count AND minimum per-1000-words rate. */
|
|
81
|
+
readonly contrastMinCount: 4;
|
|
82
|
+
readonly contrastMinPer1000: 4;
|
|
83
|
+
/** Rhetorical/procedural: minimum sentences, minimum abstract-claim
|
|
84
|
+
* sentences, minimum abstract share, maximum concrete sentences. */
|
|
85
|
+
readonly ratioMinSentences: 12;
|
|
86
|
+
readonly ratioMinAbstract: 9;
|
|
87
|
+
readonly ratioMinShare: 0.7;
|
|
88
|
+
readonly ratioMaxConcrete: 2;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Abstract-punchline cue: a ≤8-word declarative counts as a punchline
|
|
92
|
+
* fragment only when it opens on an abstract deictic ("That's…", "It was…")
|
|
93
|
+
* or carries an abstract pay-off noun. Concrete short sentences ("Two were
|
|
94
|
+
* wrong.", "Dave complained.") deliberately do not match.
|
|
95
|
+
*/
|
|
96
|
+
export declare const ABSTRACT_PUNCH_RE: RegExp;
|
|
97
|
+
/**
|
|
98
|
+
* Contrast cue for the mic-drop closer — the closer must carry the two-sided
|
|
99
|
+
* turn ("not", "but", "It was…", "difference", "instead", "who/what/why").
|
|
100
|
+
*/
|
|
101
|
+
export declare const MIC_DROP_CONTRAST_RE: RegExp;
|
|
102
|
+
/**
|
|
103
|
+
* Additional not-X-but-Y variants beyond the v2 NOT_JUST_CONTRAST dash forms
|
|
104
|
+
* and the v3 NEG_PARALLELISM_RE: the sentence-pair contrast ("The difference
|
|
105
|
+
* was not X. It was Y.") and the "isn't about X. It's about Y." shape.
|
|
106
|
+
*/
|
|
107
|
+
export declare const CONTRAST_VARIANT_RES: readonly RegExp[];
|
|
108
|
+
/**
|
|
109
|
+
* Concrete-action verbs for the rhetorical/procedural classifier: verbs that
|
|
110
|
+
* name a specific, checkable act on a specific object. The heuristic
|
|
111
|
+
* (documented in en-signals-v4.ts) treats a sentence as CONCRETE when it
|
|
112
|
+
* contains a digit/currency/percent token, a mid-sentence capitalised word
|
|
113
|
+
* (proper-noun proxy), or one of these verbs.
|
|
114
|
+
*/
|
|
115
|
+
export declare const CONCRETE_ACTION_VERB_RE: RegExp;
|
|
116
|
+
/**
|
|
117
|
+
* Abstract-claim cue for the rhetorical side of the ratio: a linking verb in
|
|
118
|
+
* the sentence together with an intangible pay-off word.
|
|
119
|
+
*/
|
|
120
|
+
export declare const ABSTRACT_CLAIM_RE: RegExp;
|
|
121
|
+
/**
|
|
122
|
+
* Function-word inventory for the lexical-register profile: high-frequency
|
|
123
|
+
* closed-class English words whose relative frequencies are stable across
|
|
124
|
+
* topics (the classic stylometric basis). The text's frequency vector over
|
|
125
|
+
* this list is compared (L1) with the same vector computed from the shipped
|
|
126
|
+
* human reference corpus.
|
|
127
|
+
*/
|
|
128
|
+
export declare const REGISTER_FUNCTION_WORDS: readonly string[];
|
|
129
|
+
/** Tokens at or above this length count as "long words" for the register
|
|
130
|
+
* component (formal/latinate register proxy from the empiricist's wlMean). */
|
|
131
|
+
export declare const REGISTER_LONG_WORD_LEN = 7;
|
|
132
|
+
export declare const V4_ISSUE_WEIGHTS: Record<string, number>;
|
|
133
|
+
export interface V4CategoryMeta {
|
|
134
|
+
severity: "note" | "low";
|
|
135
|
+
message: string;
|
|
136
|
+
suggestion: string;
|
|
137
|
+
}
|
|
138
|
+
export declare const V4_CATEGORY_META: Record<string, V4CategoryMeta>;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rule data for the en-signals 2026.08.5 measured-stylometrics + owner-rhythm
|
|
3
|
+
* pack.
|
|
4
|
+
*
|
|
5
|
+
* Sources:
|
|
6
|
+
* - research/CLEAN-PROSE-DETECTION-PLAN.md §2 (the empiricist run's three
|
|
7
|
+
* surviving cheap signals: window-corrected sentence-length spectral
|
|
8
|
+
* flatness, conditional compression against a shipped human reference
|
|
9
|
+
* corpus, lexical register distance) and §3.1 (Tier 1 framing: continuous
|
|
10
|
+
* "machine-pattern evidence", never a standalone AI verdict).
|
|
11
|
+
* - research/OWNER-RHYTHM-NOTES.md (punchline-fragment density, mic-drop
|
|
12
|
+
* paragraph shape, contrast-construction density, rhetorical-vs-procedural
|
|
13
|
+
* ratio) including its guardrail: skilled human copywriters legitimately
|
|
14
|
+
* use punchlines, so every rule here is corroboration-weight (tier B), low
|
|
15
|
+
* severity, density/threshold-based, and never fires on a single instance.
|
|
16
|
+
*
|
|
17
|
+
* Binding constraints honoured (do not relax without re-reading the plan):
|
|
18
|
+
* - The plan's §2.3 combo trap: hand thresholds calibrated on a handful of
|
|
19
|
+
* human controls overfit. Every threshold below is chosen FP-first with
|
|
20
|
+
* margin against all repository human fixtures via
|
|
21
|
+
* tests/battery/calibrate.mjs, and is PROVISIONAL until the 30-50-sample
|
|
22
|
+
* genre-matched human corpus (tests/battery/human-corpus-v1.json) confirms
|
|
23
|
+
* it. Thresholds may be loosened freely; tightening requires a calibration
|
|
24
|
+
* re-run over that corpus.
|
|
25
|
+
* - The stylometric cap in en-signals-v2.ts applies to every category here:
|
|
26
|
+
* rhythm measurements can never dominate a verdict (Stanford TOEFL
|
|
27
|
+
* correction, AI-TELLS-MEGA-PACK §6).
|
|
28
|
+
* - For the finding-breadth escalation, all 2026.08.5 categories count as ONE
|
|
29
|
+
* combined stylometric contribution (wired in en-signals-v2.ts): four
|
|
30
|
+
* rhythm rules alone must never escalate a classification.
|
|
31
|
+
*
|
|
32
|
+
* All categories are era "evergreen" (they measure structure, not vocabulary
|
|
33
|
+
* fashions) and carry `corroboration: true`.
|
|
34
|
+
*/
|
|
35
|
+
/** The 2026.08.5 categories. One set drives corroboration metadata, the
|
|
36
|
+
* stylometric score cap, and the combined-breadth treatment. */
|
|
37
|
+
export const V4_RHYTHM_CATEGORIES = new Set([
|
|
38
|
+
"sentence-length-spectral-flatness",
|
|
39
|
+
"conditional-compression",
|
|
40
|
+
"lexical-register-distance",
|
|
41
|
+
"punchline-fragment-density",
|
|
42
|
+
"mic-drop-paragraph",
|
|
43
|
+
"contrast-density",
|
|
44
|
+
"rhetorical-procedural-ratio",
|
|
45
|
+
]);
|
|
46
|
+
/**
|
|
47
|
+
* Calibrated thresholds, exported by name so tests/battery/calibrate.mjs can
|
|
48
|
+
* print every fixture's measured value against the shipped gate. Values are
|
|
49
|
+
* chosen FP-first: below/above the worst human fixture with margin (see the
|
|
50
|
+
* calibration table in the workstream report). PROVISIONAL pending the
|
|
51
|
+
* 40-sample human corpus.
|
|
52
|
+
*/
|
|
53
|
+
export const V4_THRESHOLDS = {
|
|
54
|
+
/** Fixed window length in sentences for the spectral estimator — the
|
|
55
|
+
* plan's length-artefact correction: flatness is only compared between
|
|
56
|
+
* equal-length series. */
|
|
57
|
+
spectralWindowSentences: 12,
|
|
58
|
+
/** Minimum number of full windows before the signal is computed. */
|
|
59
|
+
spectralMinWindows: 2,
|
|
60
|
+
/** Fire when the window-averaged spectral flatness falls below this. */
|
|
61
|
+
spectralFlatnessMax: 0.28,
|
|
62
|
+
/** Conditional compression is computed only inside this word band: the
|
|
63
|
+
* gain statistic falls with document length for EVERY author (the plan's
|
|
64
|
+
* length-confound warning), so out-of-band documents are exempt rather
|
|
65
|
+
* than mis-thresholded. */
|
|
66
|
+
compressionMinWords: 250,
|
|
67
|
+
compressionMaxWords: 900,
|
|
68
|
+
/** Fire when the relative gain from the human-corpus prior falls below
|
|
69
|
+
* this. Calibrated in-band: the lowest human sample measured 0.177; the
|
|
70
|
+
* chat-export-furniture positive measures ~0.10. */
|
|
71
|
+
compressionGainMin: 0.14,
|
|
72
|
+
/** Minimum words before the register profile is computed (the L1 distance
|
|
73
|
+
* is noisy on short texts — a 50-word human note measures >0.5). */
|
|
74
|
+
registerMinWords: 300,
|
|
75
|
+
/** Fire when function-word L1 distance from the human reference profile
|
|
76
|
+
* exceeds this AND the long-word share exceeds the reference by the
|
|
77
|
+
* delta below (both must hold — the genre-confound guard). Calibrated:
|
|
78
|
+
* the highest human fixture measured funcL1 0.266 / longΔ 0.058. */
|
|
79
|
+
registerFuncL1Min: 0.3,
|
|
80
|
+
registerLongWordDeltaMin: 0.1,
|
|
81
|
+
/** Punchline fragments: at least this many, at at least this share of
|
|
82
|
+
* sentences, with at least this many paragraph-final. */
|
|
83
|
+
punchlineMinCount: 4,
|
|
84
|
+
punchlineMinRate: 0.18,
|
|
85
|
+
punchlineMinParagraphFinal: 2,
|
|
86
|
+
/** Mic-drop paragraphs required before the rule fires (never one). */
|
|
87
|
+
micDropMinParagraphs: 2,
|
|
88
|
+
/** Contrast constructions: minimum count AND minimum per-1000-words rate. */
|
|
89
|
+
contrastMinCount: 4,
|
|
90
|
+
contrastMinPer1000: 4,
|
|
91
|
+
/** Rhetorical/procedural: minimum sentences, minimum abstract-claim
|
|
92
|
+
* sentences, minimum abstract share, maximum concrete sentences. */
|
|
93
|
+
ratioMinSentences: 12,
|
|
94
|
+
ratioMinAbstract: 9,
|
|
95
|
+
ratioMinShare: 0.7,
|
|
96
|
+
ratioMaxConcrete: 2,
|
|
97
|
+
};
|
|
98
|
+
// ─── Owner-rhythm word/pattern data ──────────────────────────────────
|
|
99
|
+
/**
|
|
100
|
+
* Abstract-punchline cue: a ≤8-word declarative counts as a punchline
|
|
101
|
+
* fragment only when it opens on an abstract deictic ("That's…", "It was…")
|
|
102
|
+
* or carries an abstract pay-off noun. Concrete short sentences ("Two were
|
|
103
|
+
* wrong.", "Dave complained.") deliberately do not match.
|
|
104
|
+
*/
|
|
105
|
+
export const ABSTRACT_PUNCH_RE = /^(?:(?:and\s+)?(?:that|this|it)['’]?s?\b)|\b(?:matters?|everything|nothing|difference|point|result|future|answer|story|truth|shift|mindset|game|lesson|magic|secret|power|possible|real\s+\w+)\b/i;
|
|
106
|
+
/**
|
|
107
|
+
* Contrast cue for the mic-drop closer — the closer must carry the two-sided
|
|
108
|
+
* turn ("not", "but", "It was…", "difference", "instead", "who/what/why").
|
|
109
|
+
*/
|
|
110
|
+
export const MIC_DROP_CONTRAST_RE = /\bnot\b|n[’']t\b|\bbut\b|\b(?:it|that|this)\s+(?:is|was)\b|\bdifference\b|\bmatters?\b|\binstead\b|\bwho\b|\bwhat\b|\bwhy\b|\bjust\b/i;
|
|
111
|
+
/**
|
|
112
|
+
* Additional not-X-but-Y variants beyond the v2 NOT_JUST_CONTRAST dash forms
|
|
113
|
+
* and the v3 NEG_PARALLELISM_RE: the sentence-pair contrast ("The difference
|
|
114
|
+
* was not X. It was Y.") and the "isn't about X. It's about Y." shape.
|
|
115
|
+
*/
|
|
116
|
+
export const CONTRAST_VARIANT_RES = [
|
|
117
|
+
/\b\w+\s+(?:is|was|are|were)\s+not\s+(?:about\s+|just\s+|only\s+)?[^.!?\n]{1,50}[.!?]\s+(?:It|They|That|This)\s+(?:is|was|are|were)\b/g,
|
|
118
|
+
/\b(?:this|it)\s+(?:is|was)\s*n[’']t\s+about\s+[^.!?\n]{1,50}[.;—]\s*[Ii]t['’]s\s+about\b/g,
|
|
119
|
+
/\b(?:this|it)\s+isn[’']t\s+[^.!?\n]{1,50}[.!?]\s+It['’]s\b/g,
|
|
120
|
+
];
|
|
121
|
+
/**
|
|
122
|
+
* Concrete-action verbs for the rhetorical/procedural classifier: verbs that
|
|
123
|
+
* name a specific, checkable act on a specific object. The heuristic
|
|
124
|
+
* (documented in en-signals-v4.ts) treats a sentence as CONCRETE when it
|
|
125
|
+
* contains a digit/currency/percent token, a mid-sentence capitalised word
|
|
126
|
+
* (proper-noun proxy), or one of these verbs.
|
|
127
|
+
*/
|
|
128
|
+
export const CONCRETE_ACTION_VERB_RE = /\b(?:moved|installed|checked|rang|phoned|emailed|sent|built|wrote|ordered|fixed|booked|painted|measured|delivered|signed|printed|uploaded|configured|tested|deployed|migrated|invoiced|quoted|packed|shipped|cleaned|repaired|replaced|bought|paid|hired|visited|opened|closed|launched|updated|added|removed|reviewed|approved|submitted|filed|called|drove|attended|arranged|cancelled|refunded|scheduled|recorded|photographed|wired|plumbed|stocked|priced|posted|drafted|edited|published)\b/i;
|
|
129
|
+
/**
|
|
130
|
+
* Abstract-claim cue for the rhetorical side of the ratio: a linking verb in
|
|
131
|
+
* the sentence together with an intangible pay-off word.
|
|
132
|
+
*/
|
|
133
|
+
export const ABSTRACT_CLAIM_RE = /\b(?:is|are|was|were|isn[’']t|aren[’']t|means|matters|becomes?|feels?|represents?)\b[^.!?\n]{0,80}\b(?:important|essential|critical|everything|nothing|different|possible|powerful|real|value|success|growth|potential|future|journey|transformation|opportunity|mindset|game|advantage|key|vital|crucial|remarkable|extraordinary|leadership|innovation|vision|impact|change)\b/i;
|
|
134
|
+
// ─── Register-profile data ───────────────────────────────────────────
|
|
135
|
+
/**
|
|
136
|
+
* Function-word inventory for the lexical-register profile: high-frequency
|
|
137
|
+
* closed-class English words whose relative frequencies are stable across
|
|
138
|
+
* topics (the classic stylometric basis). The text's frequency vector over
|
|
139
|
+
* this list is compared (L1) with the same vector computed from the shipped
|
|
140
|
+
* human reference corpus.
|
|
141
|
+
*/
|
|
142
|
+
export const REGISTER_FUNCTION_WORDS = [
|
|
143
|
+
"the", "of", "and", "a", "to", "in", "is", "it", "that", "was",
|
|
144
|
+
"he", "for", "on", "are", "as", "with", "his", "they", "i", "at",
|
|
145
|
+
"be", "this", "have", "from", "or", "one", "had", "by", "not", "but",
|
|
146
|
+
"what", "all", "were", "we", "when", "your", "can", "there", "an", "which",
|
|
147
|
+
"their", "if", "will", "so", "no", "would", "who", "them", "these", "than",
|
|
148
|
+
];
|
|
149
|
+
/** Tokens at or above this length count as "long words" for the register
|
|
150
|
+
* component (formal/latinate register proxy from the empiricist's wlMean). */
|
|
151
|
+
export const REGISTER_LONG_WORD_LEN = 7;
|
|
152
|
+
// ─── Weights / metadata ──────────────────────────────────────────────
|
|
153
|
+
// Conservative: every category is tier-B corroboration at weight 2 and low
|
|
154
|
+
// severity; the stylometric cap in en-signals-v2.ts bounds the group.
|
|
155
|
+
export const V4_ISSUE_WEIGHTS = {
|
|
156
|
+
"sentence-length-spectral-flatness": 2,
|
|
157
|
+
"conditional-compression": 2,
|
|
158
|
+
"lexical-register-distance": 2,
|
|
159
|
+
"punchline-fragment-density": 2,
|
|
160
|
+
"mic-drop-paragraph": 2,
|
|
161
|
+
"contrast-density": 2,
|
|
162
|
+
"rhetorical-procedural-ratio": 2,
|
|
163
|
+
};
|
|
164
|
+
export const V4_CATEGORY_META = {
|
|
165
|
+
"sentence-length-spectral-flatness": {
|
|
166
|
+
severity: "low",
|
|
167
|
+
message: "Sentence lengths follow a pattern that is more regular than most writing this long. We only measure it on fixed-size chunks, so short pieces are skipped. Careful human editing produces the same shape.",
|
|
168
|
+
suggestion: "Nothing to change unless the other checks agree. Varying sentence length is a choice, not a rule.",
|
|
169
|
+
},
|
|
170
|
+
"conditional-compression": {
|
|
171
|
+
severity: "low",
|
|
172
|
+
message: "Held up against a sample of varied human writing, this text has less in common with it than most. Copy written to a tight template scores the same way.",
|
|
173
|
+
suggestion: "Nothing to change on its own. If the other checks agree, vary phrasing you have repeated.",
|
|
174
|
+
},
|
|
175
|
+
"lexical-register-distance": {
|
|
176
|
+
severity: "low",
|
|
177
|
+
message: "The mix of small joining words, and the length of the words, sits a long way from our sample of everyday human writing. Worth knowing: that sample is general writing, so academic, legal and technical pieces land far away quite fairly.",
|
|
178
|
+
suggestion: "Nothing to change on its own. Plainer wording moves it closer if the other checks agree.",
|
|
179
|
+
},
|
|
180
|
+
"punchline-fragment-density": {
|
|
181
|
+
severity: "low",
|
|
182
|
+
message: "Very short, abstract closing lines keep turning up, especially at the end of paragraphs: \"That's the point.\" Good copywriters use punchlines on purpose, which is why we only count how many there are.",
|
|
183
|
+
suggestion: "Keep the punchlines that earn their place. Turn the rest into full sentences.",
|
|
184
|
+
},
|
|
185
|
+
"mic-drop-paragraph": {
|
|
186
|
+
severity: "low",
|
|
187
|
+
message: "Several paragraphs are built the same way: a few medium sentences, then a much shorter line to land on. One paragraph like that is ordinary. It is the repeat that stands out.",
|
|
188
|
+
suggestion: "Let some paragraphs finish on their facts instead of a quotable line.",
|
|
189
|
+
},
|
|
190
|
+
"contrast-density": {
|
|
191
|
+
severity: "low",
|
|
192
|
+
message: "Two-sided contrasts keep coming back: \"not X, but Y\"; \"It wasn't A. It was B.\" One is ordinary writing. It is the rate that stands out.",
|
|
193
|
+
suggestion: "Keep the strongest contrast and say the rest plainly.",
|
|
194
|
+
},
|
|
195
|
+
"rhetorical-procedural-ratio": {
|
|
196
|
+
severity: "low",
|
|
197
|
+
message: "Sentences making broad claims heavily outnumber sentences naming a real action, object or number. We count a sentence as concrete when it holds a number, a name, or a specific action verb. Opinion and vision pieces are broad on purpose.",
|
|
198
|
+
suggestion: "Back more claims with a specific action, name or figure if the other checks agree.",
|
|
199
|
+
},
|
|
200
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* en-signals 2026.08.5 measured-stylometrics + owner-rhythm rule logic.
|
|
3
|
+
*
|
|
4
|
+
* Implements the Tier 1 measured signals from research/
|
|
5
|
+
* CLEAN-PROSE-DETECTION-PLAN.md (§2 empirically surviving cheap signals,
|
|
6
|
+
* §3.1 framing) and the four owner-rhythm candidate tells from research/
|
|
7
|
+
* OWNER-RHYTHM-NOTES.md, on top of the v2 engine. Called from
|
|
8
|
+
* en-signals-v2.ts inside analyse(); findings flow through the same dedup,
|
|
9
|
+
* weighting (stylometric cap), scoring and envelope as every other rule.
|
|
10
|
+
*
|
|
11
|
+
* Every rule here is tier-B corroboration evidence at low severity: a
|
|
12
|
+
* density/threshold measurement, never a single-instance flag and never an
|
|
13
|
+
* authorship verdict (BRIEF.md §5, §21). Thresholds live in
|
|
14
|
+
* en-signals-v4-data.ts and are re-checkable via tests/battery/calibrate.mjs.
|
|
15
|
+
*
|
|
16
|
+
* Deliberate deviation, documented: the plan's conditional-compression signal
|
|
17
|
+
* is specified with zlib. This engine is a synchronous, dependency-free,
|
|
18
|
+
* platform-neutral bundle (no node:zlib; the Web CompressionStream API is
|
|
19
|
+
* async), so the signal ships with a deterministic pure-TypeScript LZ77
|
|
20
|
+
* cost ESTIMATOR (greedy longest-match against a hash-chain dictionary with
|
|
21
|
+
* a deflate-like bit-cost model). It is an approximation of the zlib ratio,
|
|
22
|
+
* not zlib itself; the calibration script measures the estimator that
|
|
23
|
+
* actually ships, so thresholds and estimator always agree.
|
|
24
|
+
*/
|
|
25
|
+
import type { V3Ctx } from "./en-signals-v3.js";
|
|
26
|
+
export declare function spectralFlatness(sentenceWordCounts: readonly number[]): number | null;
|
|
27
|
+
/**
|
|
28
|
+
* Estimated LZ77 cost in bits of `target`, optionally conditioned on the
|
|
29
|
+
* shipped reference corpus as a pre-loaded dictionary.
|
|
30
|
+
*/
|
|
31
|
+
export declare function lzCostBits(target: string, withCorpusPrior: boolean): number;
|
|
32
|
+
/** Relative compression gain from the human-corpus prior (0 = no gain). */
|
|
33
|
+
export declare function compressionGain(text: string): number;
|
|
34
|
+
export interface RegisterProfile {
|
|
35
|
+
/** Frequency (per token) of each REGISTER_FUNCTION_WORDS entry. */
|
|
36
|
+
func: number[];
|
|
37
|
+
/** Share of tokens with length >= REGISTER_LONG_WORD_LEN. */
|
|
38
|
+
longWordShare: number;
|
|
39
|
+
tokenCount: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function registerProfile(text: string): RegisterProfile;
|
|
42
|
+
export declare function referenceRegisterProfile(): RegisterProfile;
|
|
43
|
+
export declare function registerDistance(text: string): {
|
|
44
|
+
funcL1: number;
|
|
45
|
+
longWordDelta: number;
|
|
46
|
+
};
|
|
47
|
+
export interface V4Metrics {
|
|
48
|
+
wordCount: number;
|
|
49
|
+
sentenceCount: number;
|
|
50
|
+
spectralFlatness: number | null;
|
|
51
|
+
compressionGain: number | null;
|
|
52
|
+
registerFuncL1: number;
|
|
53
|
+
registerLongWordDelta: number;
|
|
54
|
+
punchlineCount: number;
|
|
55
|
+
punchlineRate: number;
|
|
56
|
+
punchlineParagraphFinal: number;
|
|
57
|
+
micDropParagraphs: number;
|
|
58
|
+
contrastCount: number;
|
|
59
|
+
contrastPer1000: number;
|
|
60
|
+
ratioSentences: number;
|
|
61
|
+
ratioAbstract: number;
|
|
62
|
+
ratioConcrete: number;
|
|
63
|
+
ratioAbstractShare: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Standalone metric computation for the calibration script
|
|
67
|
+
* (tests/battery/calibrate.mjs). Mirrors exactly what collectV4Issues
|
|
68
|
+
* measures; not part of the public package API.
|
|
69
|
+
*/
|
|
70
|
+
export declare function computeV4Metrics(text: string): V4Metrics;
|
|
71
|
+
export declare function collectV4Issues(ctx: V3Ctx): void;
|