@houtini/voice-analyser 1.1.0 → 1.2.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/LICENSE +190 -0
- package/README.md +147 -131
- package/dist/analyzers/argument-flow.d.ts +50 -0
- package/dist/analyzers/argument-flow.d.ts.map +1 -0
- package/dist/analyzers/argument-flow.js +398 -0
- package/dist/analyzers/argument-flow.js.map +1 -0
- package/dist/analyzers/paragraph-transitions.d.ts +35 -0
- package/dist/analyzers/paragraph-transitions.d.ts.map +1 -0
- package/dist/analyzers/paragraph-transitions.js +241 -0
- package/dist/analyzers/paragraph-transitions.js.map +1 -0
- package/dist/analyzers/specificity-patterns.d.ts +27 -0
- package/dist/analyzers/specificity-patterns.d.ts.map +1 -0
- package/dist/analyzers/specificity-patterns.js +171 -0
- package/dist/analyzers/specificity-patterns.js.map +1 -0
- package/dist/analyzers/voice-markers.d.ts +5 -0
- package/dist/analyzers/voice-markers.d.ts.map +1 -1
- package/dist/analyzers/voice-markers.js +28 -1
- package/dist/analyzers/voice-markers.js.map +1 -1
- package/dist/analyzers/vulnerability-patterns.d.ts +22 -0
- package/dist/analyzers/vulnerability-patterns.d.ts.map +1 -0
- package/dist/analyzers/vulnerability-patterns.js +206 -0
- package/dist/analyzers/vulnerability-patterns.js.map +1 -0
- package/dist/index.js +18 -51
- package/dist/index.js.map +1 -1
- package/dist/tools/analyze-corpus.d.ts +1 -0
- package/dist/tools/analyze-corpus.d.ts.map +1 -1
- package/dist/tools/analyze-corpus.js +21 -137
- package/dist/tools/analyze-corpus.js.map +1 -1
- package/dist/tools/collect-corpus.d.ts +1 -0
- package/dist/tools/collect-corpus.d.ts.map +1 -1
- package/dist/tools/collect-corpus.js +2 -2
- package/dist/tools/collect-corpus.js.map +1 -1
- package/dist/tools/generate-narrative-guide.d.ts +25 -0
- package/dist/tools/generate-narrative-guide.d.ts.map +1 -0
- package/dist/tools/generate-narrative-guide.js +942 -0
- package/dist/tools/generate-narrative-guide.js.map +1 -0
- package/dist/utils/advanced-statistics.d.ts.map +1 -1
- package/dist/utils/advanced-statistics.js +8 -9
- package/dist/utils/advanced-statistics.js.map +1 -1
- package/dist/utils/micro-rhythm.d.ts +37 -0
- package/dist/utils/micro-rhythm.d.ts.map +1 -0
- package/dist/utils/micro-rhythm.js +260 -0
- package/dist/utils/micro-rhythm.js.map +1 -0
- package/dist/utils/zscore.d.ts +2 -8
- package/dist/utils/zscore.d.ts.map +1 -1
- package/dist/utils/zscore.js +3 -19
- package/dist/utils/zscore.js.map +1 -1
- package/package.json +2 -2
- package/dist/analyzers/char-ngrams.d.ts +0 -54
- package/dist/analyzers/char-ngrams.d.ts.map +0 -1
- package/dist/analyzers/char-ngrams.js +0 -208
- package/dist/analyzers/char-ngrams.js.map +0 -1
- package/dist/analyzers/detection-risk.d.ts +0 -28
- package/dist/analyzers/detection-risk.d.ts.map +0 -1
- package/dist/analyzers/detection-risk.js +0 -237
- package/dist/analyzers/detection-risk.js.map +0 -1
- package/dist/analyzers/lexical-diversity.d.ts +0 -36
- package/dist/analyzers/lexical-diversity.d.ts.map +0 -1
- package/dist/analyzers/lexical-diversity.js +0 -120
- package/dist/analyzers/lexical-diversity.js.map +0 -1
- package/dist/analyzers/pos-ngrams.d.ts +0 -59
- package/dist/analyzers/pos-ngrams.d.ts.map +0 -1
- package/dist/analyzers/pos-ngrams.js +0 -249
- package/dist/analyzers/pos-ngrams.js.map +0 -1
- package/dist/analyzers/syntactic-patterns.d.ts +0 -47
- package/dist/analyzers/syntactic-patterns.d.ts.map +0 -1
- package/dist/analyzers/syntactic-patterns.js +0 -186
- package/dist/analyzers/syntactic-patterns.js.map +0 -1
- package/dist/analyzers/word-ngrams.d.ts +0 -59
- package/dist/analyzers/word-ngrams.d.ts.map +0 -1
- package/dist/analyzers/word-ngrams.js +0 -259
- package/dist/analyzers/word-ngrams.js.map +0 -1
- package/dist/tools/generate-enhanced-guide.d.ts +0 -65
- package/dist/tools/generate-enhanced-guide.d.ts.map +0 -1
- package/dist/tools/generate-enhanced-guide.js +0 -1072
- package/dist/tools/generate-enhanced-guide.js.map +0 -1
- package/dist/tools/generate-guide.d.ts +0 -16
- package/dist/tools/generate-guide.d.ts.map +0 -1
- package/dist/tools/generate-guide.js +0 -228
- package/dist/tools/generate-guide.js.map +0 -1
- package/dist/utils/delta.d.ts +0 -56
- package/dist/utils/delta.d.ts.map +0 -1
- package/dist/utils/delta.js +0 -124
- package/dist/utils/delta.js.map +0 -1
- package/dist/utils/ngrams.d.ts +0 -72
- package/dist/utils/ngrams.d.ts.map +0 -1
- package/dist/utils/ngrams.js +0 -154
- package/dist/utils/ngrams.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2025 Houtini Ltd
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
# Voice Analyser
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@houtini/voice-analyser)
|
|
4
|
-
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
> **Experimental library** for extracting statistical voice models from your published writing. Generates immersive style guides that teach LLMs to replicate how you actually write - not through rules, but through examples and rhythm patterns.
|
|
7
|
+
|
|
8
|
+
## Why This Exists
|
|
9
|
+
|
|
10
|
+
Traditional style guides list rules: "Use short sentences. Vary paragraph length. Include personal anecdotes."
|
|
11
|
+
|
|
12
|
+
This doesn't work. Writers don't follow rules - they channel voice.
|
|
13
|
+
|
|
14
|
+
This tool extracts the statistical fingerprint of your writing and presents it as immersive examples with annotations showing *what makes each passage feel human*. The goal is voice replication through pattern recognition, not rule compliance.
|
|
15
|
+
|
|
16
|
+
**Status:** Experimental. The approach works but is under active development.
|
|
7
17
|
|
|
8
18
|
## Installation
|
|
9
19
|
|
|
@@ -33,162 +43,189 @@ Restart Claude Desktop after saving.
|
|
|
33
43
|
|
|
34
44
|
- Node.js 20+
|
|
35
45
|
|
|
36
|
-
##
|
|
46
|
+
## Quick Start
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
### 1. Create an Output Directory
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
- Sentence length distributions (not averages - the full histogram)
|
|
42
|
-
- Function word fingerprints (z-scores showing your over-use/avoidance patterns)
|
|
43
|
-
- First-person density and hedging patterns
|
|
44
|
-
- Punctuation habits and British/American markers
|
|
45
|
-
- N-gram patterns at character, word, and part-of-speech levels
|
|
46
|
-
- AI clichés already present in YOUR writing
|
|
50
|
+
First, create a directory where your corpus and analysis will be stored:
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
```
|
|
53
|
+
C:\writing\voice-models\ (Windows)
|
|
54
|
+
~/writing/voice-models/ (Mac/Linux)
|
|
55
|
+
```
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
This directory will contain:
|
|
58
|
+
- Collected articles (markdown)
|
|
59
|
+
- Analysis JSON files
|
|
60
|
+
- Generated voice guides
|
|
51
61
|
|
|
52
|
-
###
|
|
62
|
+
### 2. Collect Your Writing
|
|
53
63
|
|
|
54
64
|
```
|
|
55
|
-
Collect corpus from https://yoursite.com/post-sitemap.xml
|
|
65
|
+
Collect corpus from https://yoursite.com/post-sitemap.xml
|
|
66
|
+
Save as "my-voice" in "C:\writing\voice-models"
|
|
56
67
|
```
|
|
57
68
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
The tool needs:
|
|
70
|
+
- `sitemap_url` - Your XML sitemap URL
|
|
71
|
+
- `output_name` - A name for this corpus (e.g., "my-voice", "blog-posts")
|
|
72
|
+
- `output_dir` - The directory you created above
|
|
61
73
|
|
|
74
|
+
**Example with all parameters:**
|
|
62
75
|
```
|
|
63
|
-
|
|
76
|
+
Collect corpus from https://example.com/post-sitemap.xml
|
|
77
|
+
Output name: "technical-writing"
|
|
78
|
+
Output directory: "C:\writing\voice-models"
|
|
79
|
+
Maximum articles: 50
|
|
64
80
|
```
|
|
65
81
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
### 3. Generate Voice Model
|
|
82
|
+
### 3. Analyse Patterns
|
|
69
83
|
|
|
70
84
|
```
|
|
71
|
-
|
|
85
|
+
Analyse corpus "my-voice" in directory "C:\writing\voice-models"
|
|
72
86
|
```
|
|
73
87
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
## Usage Examples
|
|
88
|
+
This runs 14 analysers covering vocabulary, sentence structure, voice markers, argument flow, and paragraph transitions.
|
|
77
89
|
|
|
78
|
-
###
|
|
90
|
+
### 4. Generate Voice Guide
|
|
79
91
|
|
|
80
|
-
**XML Sitemap:**
|
|
81
92
|
```
|
|
82
|
-
|
|
93
|
+
Generate narrative guide for "my-voice" in directory "C:\writing\voice-models"
|
|
83
94
|
```
|
|
84
95
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Collect corpus from https://example.com/feed/ as "writer-name"
|
|
88
|
-
```
|
|
96
|
+
Creates an immersive style guide with annotated examples at:
|
|
97
|
+
`C:\writing\voice-models\my-voice\writing_style_my-voice_narrative.md`
|
|
89
98
|
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
Collect corpus from https://example.com/sitemap.xml as "writer-name" filtering URLs matching "blog"
|
|
93
|
-
```
|
|
99
|
+
## Using the Voice Guide
|
|
94
100
|
|
|
95
|
-
|
|
101
|
+
Once generated, the voice guide can be loaded into any LLM conversation to help it write in your voice.
|
|
96
102
|
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
Analyse corpus "writer-name" with full analysis
|
|
100
|
-
```
|
|
103
|
+
### Loading the Guide
|
|
101
104
|
|
|
102
|
-
**Quick iteration:**
|
|
103
105
|
```
|
|
104
|
-
|
|
106
|
+
Load the file C:\writing\voice-models\my-voice\writing_style_my-voice_narrative.md
|
|
107
|
+
and use it as a reference for all writing in this conversation.
|
|
105
108
|
```
|
|
106
109
|
|
|
107
|
-
###
|
|
110
|
+
### Example Prompts for Content Generation
|
|
108
111
|
|
|
109
|
-
**
|
|
112
|
+
**Blog post:**
|
|
110
113
|
```
|
|
111
|
-
|
|
114
|
+
Using the voice guide as your reference, write a blog post about [topic].
|
|
115
|
+
|
|
116
|
+
Key requirements:
|
|
117
|
+
- Match the sentence rhythm patterns shown in the examples
|
|
118
|
+
- Use the conversational devices naturally (not forced)
|
|
119
|
+
- Include the micro-rhythms: mid-thought pivots, embedded uncertainty, present-tense immediacy
|
|
120
|
+
- Vary sentence length as shown in the statistical targets
|
|
121
|
+
- Use British/American spelling as indicated in the guide
|
|
112
122
|
```
|
|
113
123
|
|
|
114
|
-
**
|
|
124
|
+
**Technical article:**
|
|
115
125
|
```
|
|
116
|
-
|
|
126
|
+
Reference the voice guide and write a technical explanation of [concept].
|
|
127
|
+
|
|
128
|
+
Channel the voice by:
|
|
129
|
+
- Opening with the pattern shown in "Opening Moves" section
|
|
130
|
+
- Using specific product/tool names, not generic references
|
|
131
|
+
- Including admissions of complexity or uncertainty where authentic
|
|
132
|
+
- Following the argument flow patterns from the guide
|
|
133
|
+
- Matching the punctuation habits (especially dash usage)
|
|
117
134
|
```
|
|
118
135
|
|
|
119
|
-
**
|
|
136
|
+
**Product review:**
|
|
120
137
|
```
|
|
121
|
-
|
|
138
|
+
Using the loaded voice guide, write a review of [product].
|
|
139
|
+
|
|
140
|
+
Capture the voice by:
|
|
141
|
+
- Starting with personal context (why you tested this)
|
|
142
|
+
- Blending technical specs with practical implications
|
|
143
|
+
- Using the transition patterns between paragraphs
|
|
144
|
+
- Including the "human tells" - parenthetical asides, mid-thought corrections
|
|
145
|
+
- Ending with the closing patterns shown in examples
|
|
122
146
|
```
|
|
123
147
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
Z-scores reveal unconscious patterns:
|
|
129
|
-
|
|
130
|
-
| Z-Score | Meaning | Example |
|
|
131
|
-
|---------|---------|---------|
|
|
132
|
-
| +2.0+ | Highly distinctive | "whilst" +5.7 (British marker) |
|
|
133
|
-
| +1.0 to +2.0 | Distinctive | "you" +1.75 (direct engagement) |
|
|
134
|
-
| -1.0 to +1.0 | Normal range | Typical usage |
|
|
135
|
-
| -2.0 to -1.0 | Avoided | "the" -1.48 (prefer specific) |
|
|
136
|
-
| -2.0- | Highly avoided | "was" -2.46 (avoid passive) |
|
|
137
|
-
|
|
138
|
-
These patterns are invisible whilst writing but obvious when absent. That's why AI content feels "off" even when grammatically correct.
|
|
139
|
-
|
|
140
|
-
### Sentence Patterns
|
|
148
|
+
**Email/communication:**
|
|
149
|
+
```
|
|
150
|
+
Write an email about [subject] using the voice patterns from the guide.
|
|
141
151
|
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
152
|
+
Focus on:
|
|
153
|
+
- Conversational markers appearing naturally
|
|
154
|
+
- Sentence length variation (some punchy, some complex)
|
|
155
|
+
- The hedging/confidence balance shown in statistics
|
|
156
|
+
- First-person usage matching the corpus frequency
|
|
157
|
+
```
|
|
145
158
|
|
|
146
|
-
###
|
|
159
|
+
### Validation After Writing
|
|
147
160
|
|
|
148
|
-
|
|
149
|
-
- Hedging language frequency ("I think", "seems to")
|
|
150
|
-
- Equipment specificity ("my Simucube 2 Pro" vs "a wheelbase")
|
|
161
|
+
The guide includes statistical targets. After writing, check:
|
|
151
162
|
|
|
152
|
-
|
|
163
|
+
```
|
|
164
|
+
Review what you just wrote against the voice guide metrics:
|
|
165
|
+
- Does sentence length variation match the target standard deviation?
|
|
166
|
+
- Is first-person frequency within the expected range?
|
|
167
|
+
- Are conversational markers present but not overused?
|
|
168
|
+
- Does the rhythm feel like the extended examples?
|
|
169
|
+
```
|
|
153
170
|
|
|
154
|
-
|
|
155
|
-
- "but I" (contrast marker)
|
|
156
|
-
- "in my" (authority phrase)
|
|
157
|
-
- Transitional phrases
|
|
171
|
+
## What Gets Analysed
|
|
158
172
|
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
173
|
+
### Core Voice Patterns
|
|
174
|
+
- **Vocabulary** - Word choice, British/American markers, domain specificity
|
|
175
|
+
- **Sentence structure** - Length distribution, openers, complexity patterns
|
|
176
|
+
- **Voice markers** - First-person usage, hedging language, conversational markers
|
|
177
|
+
- **Punctuation** - Dash types, comma density, parenthetical frequency
|
|
163
178
|
|
|
164
|
-
###
|
|
179
|
+
### Argument & Flow Patterns
|
|
180
|
+
- **Argument flow** - How you open, build, and close arguments
|
|
181
|
+
- **Paragraph transitions** - How ideas connect across paragraphs
|
|
182
|
+
- **Conversational devices** - "look", "frankly", "actually" and when they appear
|
|
165
183
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
184
|
+
### Micro-Rhythm Detection
|
|
185
|
+
The guide annotates examples with invisible patterns that make writing feel human:
|
|
186
|
+
- Mid-thought pivots (comma before "and", "but", "so")
|
|
187
|
+
- Present-tense immediacy ("Right now, it's...")
|
|
188
|
+
- Embedded uncertainty ("I think", "probably")
|
|
189
|
+
- Casual sentence starters ("So,", "And,", "But,")
|
|
190
|
+
- Parenthetical asides
|
|
191
|
+
- Punchy fragments contrasting with longer sentences
|
|
170
192
|
|
|
171
193
|
## Output Structure
|
|
172
194
|
|
|
173
195
|
```
|
|
174
|
-
|
|
175
|
-
└──
|
|
176
|
-
├── articles/
|
|
177
|
-
├── corpus.json
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
196
|
+
your-output-directory/
|
|
197
|
+
└── corpus-name/
|
|
198
|
+
├── articles/ # Collected markdown files
|
|
199
|
+
├── corpus.json # Metadata
|
|
200
|
+
├── analysis/ # JSON analysis files
|
|
201
|
+
│ ├── vocabulary.json
|
|
202
|
+
│ ├── sentence.json
|
|
203
|
+
│ ├── voice.json
|
|
204
|
+
│ ├── paragraph.json
|
|
205
|
+
│ ├── punctuation.json
|
|
206
|
+
│ ├── function-words.json
|
|
207
|
+
│ ├── argument-flow.json
|
|
208
|
+
│ └── paragraph-transitions.json
|
|
209
|
+
└── writing_style_[name]_narrative.md # The voice guide
|
|
182
210
|
```
|
|
183
211
|
|
|
212
|
+
## Minimum Corpus Size
|
|
213
|
+
|
|
214
|
+
- **Minimum:** 15,000 words (~20 articles)
|
|
215
|
+
- **Recommended:** 30,000 words
|
|
216
|
+
- **Ideal:** 50,000+ words
|
|
217
|
+
|
|
218
|
+
Below 15k words, statistical patterns become unreliable.
|
|
219
|
+
|
|
184
220
|
## Tools Reference
|
|
185
221
|
|
|
186
222
|
### collect_corpus
|
|
187
223
|
|
|
188
224
|
| Parameter | Required | Description |
|
|
189
225
|
|-----------|----------|-------------|
|
|
190
|
-
| `sitemap_url` | Yes | XML sitemap
|
|
191
|
-
| `output_name` | Yes | Corpus identifier |
|
|
226
|
+
| `sitemap_url` | Yes | XML sitemap URL |
|
|
227
|
+
| `output_name` | Yes | Corpus identifier (e.g., "my-voice") |
|
|
228
|
+
| `output_dir` | Yes | Directory to store corpus |
|
|
192
229
|
| `max_articles` | No | Limit (default: 100) |
|
|
193
230
|
| `article_pattern` | No | Regex filter for URLs |
|
|
194
231
|
|
|
@@ -197,53 +234,32 @@ templates/
|
|
|
197
234
|
| Parameter | Required | Description |
|
|
198
235
|
|-----------|----------|-------------|
|
|
199
236
|
| `corpus_name` | Yes | Name from collect_corpus |
|
|
237
|
+
| `corpus_dir` | Yes | Directory containing corpus |
|
|
200
238
|
| `analysis_type` | No | full, quick, vocabulary, syntax |
|
|
201
239
|
|
|
202
|
-
###
|
|
240
|
+
### generate_narrative_guide
|
|
203
241
|
|
|
204
242
|
| Parameter | Required | Description |
|
|
205
243
|
|-----------|----------|-------------|
|
|
206
244
|
| `corpus_name` | Yes | Name from analyze_corpus |
|
|
207
|
-
| `
|
|
208
|
-
|
|
209
|
-
### generate_tov_guide
|
|
210
|
-
|
|
211
|
-
Legacy basic guide generation. Use `generate_enhanced_guide` for production.
|
|
212
|
-
|
|
213
|
-
## Minimum Corpus Size
|
|
214
|
-
|
|
215
|
-
- **Minimum:** 15,000 words (20 articles)
|
|
216
|
-
- **Recommended:** 30,000 words
|
|
217
|
-
- **Ideal:** 50,000+ words
|
|
218
|
-
|
|
219
|
-
Below 15k words, you're measuring noise, not signal.
|
|
220
|
-
|
|
221
|
-
## Troubleshooting
|
|
222
|
-
|
|
223
|
-
**"No corpus found"**
|
|
224
|
-
Run collect_corpus first. Check name matches exactly (case-sensitive).
|
|
225
|
-
|
|
226
|
-
**"Not enough data"**
|
|
227
|
-
Collect more articles. Minimum 20 articles, 15,000 words.
|
|
228
|
-
|
|
229
|
-
**"Z-scores all near zero"**
|
|
230
|
-
Indicates typical English usage. May mean mixed authorship or AI-edited content.
|
|
245
|
+
| `corpus_dir` | Yes | Directory containing corpus |
|
|
231
246
|
|
|
232
247
|
## Development
|
|
233
248
|
|
|
234
249
|
```bash
|
|
235
|
-
git clone https://github.com/houtini-ai/voice-
|
|
236
|
-
cd voice-
|
|
250
|
+
git clone https://github.com/houtini-ai/mcp-server-voice-analysis.git
|
|
251
|
+
cd mcp-server-voice-analysis
|
|
237
252
|
npm install
|
|
238
253
|
npm run build
|
|
239
254
|
```
|
|
240
255
|
|
|
241
|
-
##
|
|
242
|
-
|
|
243
|
-
The function word stylometry approach draws from computational authorship analysis research. Z-score comparisons against reference English corpora create statistical fingerprints that are difficult to replicate by chance.
|
|
256
|
+
## Limitations
|
|
244
257
|
|
|
245
|
-
|
|
258
|
+
- Requires XML sitemap (RSS feeds not currently supported)
|
|
259
|
+
- Works best with consistent single-author content
|
|
260
|
+
- Mixed authorship or heavily edited content produces weaker signals
|
|
261
|
+
- The approach is experimental - results vary by writing style
|
|
246
262
|
|
|
247
263
|
---
|
|
248
264
|
|
|
249
|
-
|
|
265
|
+
Apache License 2.0 - [Houtini.ai](https://houtini.ai)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Argument Flow Analyzer v2.0
|
|
3
|
+
* Detects how this writer builds arguments with confidence scoring
|
|
4
|
+
*/
|
|
5
|
+
export interface ArgumentPattern {
|
|
6
|
+
pattern: string;
|
|
7
|
+
description: string;
|
|
8
|
+
frequency: number;
|
|
9
|
+
confidence: 'high' | 'medium' | 'low';
|
|
10
|
+
confidenceScore: number;
|
|
11
|
+
examples: ArgumentExample[];
|
|
12
|
+
}
|
|
13
|
+
export interface ArgumentExample {
|
|
14
|
+
fullText: string;
|
|
15
|
+
components: {
|
|
16
|
+
opening?: string;
|
|
17
|
+
claim?: string;
|
|
18
|
+
evidence?: string;
|
|
19
|
+
counterpoint?: string;
|
|
20
|
+
dismissal?: string;
|
|
21
|
+
conclusion?: string;
|
|
22
|
+
linkingPhrase?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface ConversationalDevice {
|
|
26
|
+
type: 'thought_restart' | 'tangent_marker' | 'reader_alignment' | 'admission' | 'emphasis';
|
|
27
|
+
trigger: string;
|
|
28
|
+
context: string;
|
|
29
|
+
purpose: string;
|
|
30
|
+
frequency: number;
|
|
31
|
+
examples: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface ArgumentFlowAnalysis {
|
|
34
|
+
patterns: ArgumentPattern[];
|
|
35
|
+
conversationalDevices: ConversationalDevice[];
|
|
36
|
+
openingMoves: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
frequency: number;
|
|
40
|
+
examples: string[];
|
|
41
|
+
}[];
|
|
42
|
+
closingMoves: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
frequency: number;
|
|
46
|
+
examples: string[];
|
|
47
|
+
}[];
|
|
48
|
+
}
|
|
49
|
+
export declare function analyzeArgumentFlow(text: string): ArgumentFlowAnalysis;
|
|
50
|
+
//# sourceMappingURL=argument-flow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argument-flow.d.ts","sourceRoot":"","sources":["../../src/analyzers/argument-flow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE;QACV,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,WAAW,GAAG,UAAU,CAAC;IAC3F,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;IAC9C,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,EAAE,CAAC;IACJ,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,EAAE,CAAC;CACL;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,CActE"}
|