@customize-agent/knowledge 4.0.1 → 4.0.3
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/dist/chunking/bge-tokenizer.d.ts +12 -0
- package/dist/chunking/bge-tokenizer.js +70 -0
- package/dist/chunking/text-chunker.d.ts +20 -0
- package/dist/chunking/text-chunker.js +166 -53
- package/dist/classification/classifier.d.ts +1 -0
- package/dist/classification/classifier.js +1 -1
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +7 -0
- package/dist/core/change-tracker.d.ts +13 -0
- package/dist/core/change-tracker.js +13 -0
- package/dist/core/file-scanner.d.ts +13 -0
- package/dist/core/file-scanner.js +12 -0
- package/dist/core/index-state-store.d.ts +67 -0
- package/dist/core/index-state-store.js +204 -50
- package/dist/core/knowledge-base-manager.d.ts +24 -2
- package/dist/core/knowledge-base-manager.js +204 -52
- package/dist/core/multi-project-manager.d.ts +10 -0
- package/dist/core/multi-project-manager.js +21 -2
- package/dist/core/project-config.d.ts +4 -0
- package/dist/core/project-config.js +4 -0
- package/dist/core/project-id.d.ts +5 -0
- package/dist/core/project-id.js +5 -0
- package/dist/core/project-registry.d.ts +1 -0
- package/dist/core/project-registry.js +1 -0
- package/dist/dedup/dedup-engine.d.ts +3 -0
- package/dist/dedup/dedup-engine.js +1 -0
- package/dist/dedup/relationship-detector.d.ts +7 -0
- package/dist/dedup/relationship-detector.js +7 -0
- package/dist/embedding/embedding-provider.d.ts +32 -0
- package/dist/embedding/embedding-provider.js +136 -2
- package/dist/extraction/content-extractor.d.ts +32 -2
- package/dist/extraction/content-extractor.js +524 -124
- package/dist/extraction/external-extractor.d.ts +10 -0
- package/dist/extraction/external-extractor.js +6 -0
- package/dist/extraction/module-resolver.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/search/federation-search.d.ts +8 -0
- package/dist/search/federation-search.js +2 -0
- package/dist/types.d.ts +10 -0
- package/dist/vector/collection-manager.d.ts +3 -0
- package/dist/vector/collection-manager.js +3 -0
- package/dist/vector/hnsw-vector-store.d.ts +21 -0
- package/dist/vector/hnsw-vector-store.js +108 -0
- package/dist/vector/types.d.ts +8 -0
- package/dist/vector/vector-indexer.d.ts +15 -1
- package/dist/vector/vector-indexer.js +34 -5
- package/models/bge-small-zh-v1.5/config.json +31 -0
- package/models/bge-small-zh-v1.5/onnx/model_quantized.onnx +0 -0
- package/models/bge-small-zh-v1.5/special_tokens_map.json +7 -0
- package/models/bge-small-zh-v1.5/tokenizer.json +21278 -0
- package/models/bge-small-zh-v1.5/tokenizer_config.json +15 -0
- package/package.json +16 -9
- package/scripts/install-hnsw.cjs +47 -0
- package/dist/vector/sqlite-vec-store.d.ts +0 -38
- package/dist/vector/sqlite-vec-store.js +0 -203
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
/** MinHash 签名结果 */
|
|
1
2
|
export interface MinHashSignature {
|
|
2
3
|
signature: number[];
|
|
3
4
|
shingleCount: number;
|
|
4
5
|
buckets: string[];
|
|
5
6
|
}
|
|
7
|
+
/** 相似度匹配结果 */
|
|
6
8
|
export interface SimilarityMatch {
|
|
7
9
|
filePath: string;
|
|
8
10
|
similarity: number;
|
|
9
11
|
}
|
|
12
|
+
/** 去重引擎,支持归一化哈希、MinHash 相似度计算和 LSH 分桶 */
|
|
10
13
|
export declare class DedupEngine {
|
|
11
14
|
private readonly hashCount;
|
|
12
15
|
private readonly bandSize;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { ClassifiedFile, IndexStateRecord } from '../types.js';
|
|
2
2
|
import type { FileRelationship } from '../core/index-state-store.js';
|
|
3
|
+
/** 文件关系检测器,自动识别版本链、翻译关系和互补关系 */
|
|
3
4
|
export declare class RelationshipDetector {
|
|
5
|
+
/**
|
|
6
|
+
* 检测文件与已有索引记录之间的关系
|
|
7
|
+
* @param file 当前处理的文件
|
|
8
|
+
* @param indexedRecords 已有索引记录列表
|
|
9
|
+
* @returns 检测到的关系列表
|
|
10
|
+
*/
|
|
4
11
|
detect(file: ClassifiedFile, indexedRecords: IndexStateRecord[]): Array<Omit<FileRelationship, 'id' | 'createdAt'>>;
|
|
5
12
|
private detectVersionChain;
|
|
6
13
|
private detectTranslation;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
|
+
/** 文件关系检测器,自动识别版本链、翻译关系和互补关系 */
|
|
2
3
|
export class RelationshipDetector {
|
|
4
|
+
/**
|
|
5
|
+
* 检测文件与已有索引记录之间的关系
|
|
6
|
+
* @param file 当前处理的文件
|
|
7
|
+
* @param indexedRecords 已有索引记录列表
|
|
8
|
+
* @returns 检测到的关系列表
|
|
9
|
+
*/
|
|
3
10
|
detect(file, indexedRecords) {
|
|
4
11
|
const relationships = [];
|
|
5
12
|
for (const record of indexedRecords) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/** Embedding Provider 接口,负责将文本转换为向量 */
|
|
1
2
|
export interface EmbeddingProvider {
|
|
2
3
|
readonly model: string;
|
|
3
4
|
readonly dimensions: number;
|
|
4
5
|
embedDocuments(texts: string[]): Promise<number[][]>;
|
|
5
6
|
embedQuery(text: string): Promise<number[]>;
|
|
6
7
|
}
|
|
8
|
+
/** 基于哈希的本地 Embedding Provider(无需模型,使用哈希算法生成特征向量) */
|
|
7
9
|
export declare class HashEmbeddingProvider implements EmbeddingProvider {
|
|
8
10
|
readonly dimensions: number;
|
|
9
11
|
readonly model = "hash-embedding-local";
|
|
@@ -20,6 +22,7 @@ export interface OpenAICompatibleEmbeddingOptions {
|
|
|
20
22
|
model: string;
|
|
21
23
|
dimensions?: number;
|
|
22
24
|
}
|
|
25
|
+
/** OpenAI 兼容的 Embedding Provider,支持任何兼容 OpenAI API 的嵌入服务 */
|
|
23
26
|
export declare class OpenAICompatibleEmbeddingProvider implements EmbeddingProvider {
|
|
24
27
|
readonly model: string;
|
|
25
28
|
readonly dimensions: number;
|
|
@@ -30,4 +33,33 @@ export declare class OpenAICompatibleEmbeddingProvider implements EmbeddingProvi
|
|
|
30
33
|
embedQuery(text: string): Promise<number[]>;
|
|
31
34
|
private embed;
|
|
32
35
|
}
|
|
36
|
+
export interface LocalTransformersEmbeddingOptions {
|
|
37
|
+
model?: string;
|
|
38
|
+
dimensions?: number;
|
|
39
|
+
modelPath?: string;
|
|
40
|
+
batchSize?: number;
|
|
41
|
+
}
|
|
42
|
+
/** 本地 Transformers.js 模型 Embedding Provider,使用 BGE 小模型生成向量 */
|
|
43
|
+
export declare class LocalTransformersEmbeddingProvider implements EmbeddingProvider {
|
|
44
|
+
readonly model: string;
|
|
45
|
+
readonly dimensions: number;
|
|
46
|
+
private readonly modelPath?;
|
|
47
|
+
private readonly batchSize;
|
|
48
|
+
private static pipelines;
|
|
49
|
+
constructor(options?: LocalTransformersEmbeddingOptions);
|
|
50
|
+
embedDocuments(texts: string[]): Promise<number[][]>;
|
|
51
|
+
embedQuery(text: string): Promise<number[]>;
|
|
52
|
+
private embed;
|
|
53
|
+
private getPipeline;
|
|
54
|
+
private createPipeline;
|
|
55
|
+
private parseVectors;
|
|
56
|
+
private isTensorLike;
|
|
57
|
+
private splitFlatVectors;
|
|
58
|
+
private resizeVector;
|
|
59
|
+
private normalize;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 根据环境变量或配置文件自动创建 Embedding Provider
|
|
63
|
+
* 优先级:环境变量 > 配置文件 > 本地 Transformers.js 默认
|
|
64
|
+
*/
|
|
33
65
|
export declare function createEmbeddingProviderFromEnvironment(): EmbeddingProvider;
|
|
@@ -2,6 +2,8 @@ import * as crypto from 'node:crypto';
|
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import * as os from 'node:os';
|
|
4
4
|
import * as path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
/** 基于哈希的本地 Embedding Provider(无需模型,使用哈希算法生成特征向量) */
|
|
5
7
|
export class HashEmbeddingProvider {
|
|
6
8
|
dimensions;
|
|
7
9
|
model = 'hash-embedding-local';
|
|
@@ -47,6 +49,7 @@ export class HashEmbeddingProvider {
|
|
|
47
49
|
return vector.map(value => value / norm);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
52
|
+
/** OpenAI 兼容的 Embedding Provider,支持任何兼容 OpenAI API 的嵌入服务 */
|
|
50
53
|
export class OpenAICompatibleEmbeddingProvider {
|
|
51
54
|
model;
|
|
52
55
|
dimensions;
|
|
@@ -79,6 +82,128 @@ export class OpenAICompatibleEmbeddingProvider {
|
|
|
79
82
|
return (payload.data ?? []).map(item => item.embedding ?? []);
|
|
80
83
|
}
|
|
81
84
|
}
|
|
85
|
+
function resolveLocalEmbeddingBatchSize(configured) {
|
|
86
|
+
const raw = configured ?? Number(process.env.CUSTOMIZE_EMBEDDING_BATCH_SIZE ?? process.env.KB_EMBEDDING_BATCH_SIZE);
|
|
87
|
+
const fallback = process.platform === 'win32' ? 8 : 16;
|
|
88
|
+
if (!Number.isFinite(raw) || raw <= 0)
|
|
89
|
+
return fallback;
|
|
90
|
+
return Math.max(1, Math.min(128, Math.floor(raw)));
|
|
91
|
+
}
|
|
92
|
+
function resolveBundledBgeModelPath() {
|
|
93
|
+
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
94
|
+
const candidates = [
|
|
95
|
+
process.env.CUSTOMIZE_BGE_MODEL_PATH,
|
|
96
|
+
process.env.KB_BGE_MODEL_PATH,
|
|
97
|
+
path.resolve(process.cwd(), 'models', 'bge-small-zh-v1.5'),
|
|
98
|
+
path.resolve(process.cwd(), 'packages', 'knowledge', 'models', 'bge-small-zh-v1.5'),
|
|
99
|
+
path.resolve(currentDir, '..', '..', 'models', 'bge-small-zh-v1.5'),
|
|
100
|
+
].filter(Boolean);
|
|
101
|
+
return candidates.find(candidate => fs.existsSync(path.join(candidate, 'config.json')) && fs.existsSync(path.join(candidate, 'tokenizer.json')));
|
|
102
|
+
}
|
|
103
|
+
/** 本地 Transformers.js 模型 Embedding Provider,使用 BGE 小模型生成向量 */
|
|
104
|
+
export class LocalTransformersEmbeddingProvider {
|
|
105
|
+
model;
|
|
106
|
+
dimensions;
|
|
107
|
+
modelPath;
|
|
108
|
+
batchSize;
|
|
109
|
+
static pipelines = new Map();
|
|
110
|
+
constructor(options = {}) {
|
|
111
|
+
this.model = options.model?.trim() || 'BAAI/bge-small-zh-v1.5';
|
|
112
|
+
this.dimensions = options.dimensions ?? 512;
|
|
113
|
+
this.modelPath = options.modelPath || resolveBundledBgeModelPath();
|
|
114
|
+
this.batchSize = resolveLocalEmbeddingBatchSize(options.batchSize);
|
|
115
|
+
}
|
|
116
|
+
async embedDocuments(texts) {
|
|
117
|
+
return this.embed(texts);
|
|
118
|
+
}
|
|
119
|
+
async embedQuery(text) {
|
|
120
|
+
return (await this.embed([text]))[0] ?? [];
|
|
121
|
+
}
|
|
122
|
+
async embed(input) {
|
|
123
|
+
const extractor = await this.getPipeline();
|
|
124
|
+
const vectors = [];
|
|
125
|
+
for (let offset = 0; offset < input.length; offset += this.batchSize) {
|
|
126
|
+
const batch = input.slice(offset, offset + this.batchSize);
|
|
127
|
+
const output = await extractor(batch, { pooling: 'mean', normalize: true });
|
|
128
|
+
vectors.push(...this.parseVectors(output, batch.length).map(vector => this.resizeVector(vector)));
|
|
129
|
+
}
|
|
130
|
+
return vectors;
|
|
131
|
+
}
|
|
132
|
+
getPipeline() {
|
|
133
|
+
const existing = LocalTransformersEmbeddingProvider.pipelines.get(this.model);
|
|
134
|
+
if (existing)
|
|
135
|
+
return existing;
|
|
136
|
+
const created = this.createPipeline();
|
|
137
|
+
LocalTransformersEmbeddingProvider.pipelines.set(this.model, created);
|
|
138
|
+
return created;
|
|
139
|
+
}
|
|
140
|
+
async createPipeline() {
|
|
141
|
+
const modelPath = this.modelPath;
|
|
142
|
+
if (!modelPath) {
|
|
143
|
+
throw new Error('本地 bge-small-zh-v1.5 模型资源缺失:请将模型文件放到 packages/knowledge/models/bge-small-zh-v1.5,或通过 CUSTOMIZE_BGE_MODEL_PATH 指定本地模型目录。');
|
|
144
|
+
}
|
|
145
|
+
const dynamicImport = new Function('specifier', 'return import(specifier)');
|
|
146
|
+
const mod = await dynamicImport('@huggingface/transformers').catch(error => {
|
|
147
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
148
|
+
throw new Error(`本地语义模型运行依赖 @huggingface/transformers 未安装或无法解析:${message}`);
|
|
149
|
+
});
|
|
150
|
+
if (!mod.pipeline)
|
|
151
|
+
throw new Error('Transformers.js pipeline is unavailable');
|
|
152
|
+
if (mod.env) {
|
|
153
|
+
mod.env.allowRemoteModels = false;
|
|
154
|
+
mod.env.allowLocalModels = true;
|
|
155
|
+
mod.env.localModelPath = path.dirname(modelPath);
|
|
156
|
+
}
|
|
157
|
+
return mod.pipeline('feature-extraction', modelPath, { dtype: 'q8' });
|
|
158
|
+
}
|
|
159
|
+
parseVectors(output, count) {
|
|
160
|
+
if (this.isTensorLike(output)) {
|
|
161
|
+
const dims = output.dims;
|
|
162
|
+
const data = Array.from(output.data, Number);
|
|
163
|
+
if (dims.length === 2)
|
|
164
|
+
return this.splitFlatVectors(data, dims[0] ?? count, dims[1] ?? this.dimensions);
|
|
165
|
+
if (dims.length === 3) {
|
|
166
|
+
const batch = dims[0] ?? count;
|
|
167
|
+
const tokens = dims[1] ?? 1;
|
|
168
|
+
const width = dims[2] ?? this.dimensions;
|
|
169
|
+
return Array.from({ length: batch }, (_, batchIndex) => {
|
|
170
|
+
const vector = Array.from({ length: width }, () => 0);
|
|
171
|
+
for (let tokenIndex = 0; tokenIndex < tokens; tokenIndex++) {
|
|
172
|
+
const offset = batchIndex * tokens * width + tokenIndex * width;
|
|
173
|
+
for (let i = 0; i < width; i++)
|
|
174
|
+
vector[i] = (vector[i] ?? 0) + (data[offset + i] ?? 0);
|
|
175
|
+
}
|
|
176
|
+
return this.normalize(vector.map(value => value / Math.max(1, tokens)));
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
if (Array.isArray(output)) {
|
|
181
|
+
const first = output[0];
|
|
182
|
+
if (Array.isArray(first) && typeof first[0] === 'number')
|
|
183
|
+
return output;
|
|
184
|
+
if (typeof first === 'number')
|
|
185
|
+
return [output];
|
|
186
|
+
}
|
|
187
|
+
throw new Error('Unsupported Transformers embedding output');
|
|
188
|
+
}
|
|
189
|
+
isTensorLike(value) {
|
|
190
|
+
return typeof value === 'object' && value !== null && 'data' in value && 'dims' in value && Array.isArray(value.dims);
|
|
191
|
+
}
|
|
192
|
+
splitFlatVectors(data, count, width) {
|
|
193
|
+
return Array.from({ length: count }, (_, index) => this.normalize(data.slice(index * width, (index + 1) * width)));
|
|
194
|
+
}
|
|
195
|
+
resizeVector(vector) {
|
|
196
|
+
if (vector.length === this.dimensions)
|
|
197
|
+
return vector;
|
|
198
|
+
if (vector.length > this.dimensions)
|
|
199
|
+
return this.normalize(vector.slice(0, this.dimensions));
|
|
200
|
+
return this.normalize([...vector, ...Array.from({ length: this.dimensions - vector.length }, () => 0)]);
|
|
201
|
+
}
|
|
202
|
+
normalize(vector) {
|
|
203
|
+
const norm = Math.sqrt(vector.reduce((sum, value) => sum + value * value, 0));
|
|
204
|
+
return norm > 0 ? vector.map(value => value / norm) : vector;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
82
207
|
function readStoredEmbeddingConfig() {
|
|
83
208
|
try {
|
|
84
209
|
const configPath = path.join(os.homedir(), '.customize-agent', 'config.json');
|
|
@@ -91,9 +216,13 @@ function readStoredEmbeddingConfig() {
|
|
|
91
216
|
return undefined;
|
|
92
217
|
}
|
|
93
218
|
}
|
|
219
|
+
/**
|
|
220
|
+
* 根据环境变量或配置文件自动创建 Embedding Provider
|
|
221
|
+
* 优先级:环境变量 > 配置文件 > 本地 Transformers.js 默认
|
|
222
|
+
*/
|
|
94
223
|
export function createEmbeddingProviderFromEnvironment() {
|
|
95
224
|
const stored = readStoredEmbeddingConfig();
|
|
96
|
-
const provider = process.env.CUSTOMIZE_EMBEDDING_PROVIDER ?? process.env.KB_EMBEDDING_PROVIDER ?? stored?.provider;
|
|
225
|
+
const provider = process.env.CUSTOMIZE_EMBEDDING_PROVIDER ?? process.env.KB_EMBEDDING_PROVIDER ?? stored?.provider ?? 'transformers-local';
|
|
97
226
|
if (provider === 'openai-compatible') {
|
|
98
227
|
const baseUrl = process.env.CUSTOMIZE_EMBEDDING_BASE_URL ?? process.env.KB_EMBEDDING_BASE_URL ?? stored?.baseUrl;
|
|
99
228
|
const model = process.env.CUSTOMIZE_EMBEDDING_MODEL ?? process.env.KB_EMBEDDING_MODEL ?? stored?.model;
|
|
@@ -108,5 +237,10 @@ export function createEmbeddingProviderFromEnvironment() {
|
|
|
108
237
|
});
|
|
109
238
|
}
|
|
110
239
|
}
|
|
111
|
-
|
|
240
|
+
const rawDimensions = process.env.CUSTOMIZE_EMBEDDING_DIMENSIONS ?? process.env.KB_EMBEDDING_DIMENSIONS;
|
|
241
|
+
const dimensions = Number(rawDimensions ?? (stored?.provider === 'transformers-local' ? stored.dimensions : undefined) ?? 512);
|
|
242
|
+
return new LocalTransformersEmbeddingProvider({
|
|
243
|
+
model: process.env.CUSTOMIZE_EMBEDDING_MODEL ?? process.env.KB_EMBEDDING_MODEL ?? (stored?.provider === 'transformers-local' ? stored.model : undefined) ?? 'BAAI/bge-small-zh-v1.5',
|
|
244
|
+
dimensions: Number.isFinite(dimensions) ? dimensions : 512,
|
|
245
|
+
});
|
|
112
246
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ExternalExtractorRegistry } from './external-extractor.js';
|
|
2
2
|
import type { ClassifiedFile } from '../types.js';
|
|
3
|
+
/** 文件内容提取结果 */
|
|
3
4
|
export interface ExtractionResult {
|
|
4
5
|
text: string;
|
|
5
6
|
metadata: Record<string, unknown>;
|
|
6
7
|
warnings: string[];
|
|
7
8
|
extractionTimeMs: number;
|
|
8
9
|
}
|
|
10
|
+
/** 文件内容提取器,支持文档、表格、图片、CAD 等多种文件格式的内容抽取 */
|
|
9
11
|
export declare class ContentExtractor {
|
|
10
12
|
private readonly externalExtractors;
|
|
11
13
|
constructor(externalExtractors?: ExternalExtractorRegistry);
|
|
@@ -17,6 +19,10 @@ export declare class ContentExtractor {
|
|
|
17
19
|
private textScore;
|
|
18
20
|
private extractCad;
|
|
19
21
|
private extractDxf;
|
|
22
|
+
private buildCadSemanticNodes;
|
|
23
|
+
private extractDxfTextAnnotations;
|
|
24
|
+
private findNearestCadAnnotation;
|
|
25
|
+
private inferCadEntityType;
|
|
20
26
|
private tryConvertDwgWithBundledWasm;
|
|
21
27
|
private tryConvertDwgToDxf;
|
|
22
28
|
private extractCadMesh;
|
|
@@ -25,26 +31,50 @@ export declare class ContentExtractor {
|
|
|
25
31
|
private extractBinaryStrings;
|
|
26
32
|
private extractData;
|
|
27
33
|
private extractDiagram;
|
|
34
|
+
private extractDrawioGraph;
|
|
35
|
+
private extractExcalidrawGraph;
|
|
36
|
+
private isPointInside;
|
|
37
|
+
private parseXmlAttributes;
|
|
28
38
|
private parseDelimitedLine;
|
|
39
|
+
private toMarkdownTable;
|
|
29
40
|
private extractDelimitedText;
|
|
30
41
|
private extractOfficeDocument;
|
|
31
42
|
private extractRtf;
|
|
32
43
|
private extractLegacyWordDocument;
|
|
33
44
|
private extractLegacyOfficeBinary;
|
|
45
|
+
private findMergedCellValue;
|
|
34
46
|
private extractSpreadsheet;
|
|
47
|
+
private extractDocxStyleTreeMarkdown;
|
|
48
|
+
private docxHeadingLevel;
|
|
35
49
|
private extractOfficeZip;
|
|
36
|
-
private extractArchive;
|
|
37
50
|
private extractRasterImage;
|
|
51
|
+
private tryPaddleOcrLayout;
|
|
52
|
+
private parseOcrJson;
|
|
53
|
+
private formatOcrRegions;
|
|
54
|
+
private classifyOcrRegion;
|
|
55
|
+
private formatBoundingBox;
|
|
38
56
|
private validateRasterImage;
|
|
39
57
|
private extractPdf;
|
|
40
|
-
private pdfOcrPageLimit;
|
|
41
58
|
private extractScannedPdfOcr;
|
|
42
59
|
private extractPdfText;
|
|
60
|
+
private toPdfTextItem;
|
|
61
|
+
private layoutPdfTextItems;
|
|
62
|
+
private groupPdfItemsIntoRows;
|
|
63
|
+
private detectPdfColumnSplit;
|
|
64
|
+
private rowsToPdfMarkdownWithTables;
|
|
65
|
+
private splitLikelyTableRow;
|
|
66
|
+
private pdfRowToMarkdown;
|
|
67
|
+
private toMarkdownDocument;
|
|
68
|
+
private normalizeMarkdownHeadings;
|
|
43
69
|
private extractSvg;
|
|
70
|
+
private extractSvgSemanticNodes;
|
|
44
71
|
private isTextReadable;
|
|
45
72
|
private looksTextFile;
|
|
46
73
|
private matchAll;
|
|
47
74
|
private stripXml;
|
|
48
75
|
private flattenJson;
|
|
76
|
+
private atomicJsonObjects;
|
|
77
|
+
private flattenYamlByIndent;
|
|
78
|
+
private flattenXmlPaths;
|
|
49
79
|
private metadataOnlyText;
|
|
50
80
|
}
|