@shenghuabi/knowledge 1.0.21
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/embedding/embedding.service.d.ts +4 -0
- package/embedding/index.d.ts +2 -0
- package/embedding/type.d.ts +12 -0
- package/embedding.mjs +61 -0
- package/embedding.mjs.map +7 -0
- package/file-parser/const.d.ts +20 -0
- package/file-parser/dict/dict-format/dsl/dsl-parse.service.d.ts +6 -0
- package/file-parser/dict/dict-format/dsl/dsl.format.d.ts +1 -0
- package/file-parser/dict/dict-format/mdict-parse.service.d.ts +20 -0
- package/file-parser/dict/dict-format/stardict-parse.service.d.ts +12 -0
- package/file-parser/dict/dict-format/yaml-parse.service.d.ts +25 -0
- package/file-parser/dict/dict.service.d.ts +10 -0
- package/file-parser/dict/index.d.ts +2 -0
- package/file-parser/dict/type.d.ts +24 -0
- package/file-parser/document-file-parser.service.d.ts +15 -0
- package/file-parser/document-loader/pdf-img.loader.d.ts +8 -0
- package/file-parser/document-loader/xlsx.loader.d.ts +6 -0
- package/file-parser/file-parser.service.d.ts +13 -0
- package/file-parser/index.d.ts +6 -0
- package/file-parser/text-analyse.d.ts +1 -0
- package/file-parser/text-parser.d.ts +3 -0
- package/file-parser/vl-parser/markdown.parser.d.ts +8 -0
- package/file-parser.mjs +850 -0
- package/file-parser.mjs.map +7 -0
- package/image/convert.d.ts +25 -0
- package/image/extract.d.ts +2 -0
- package/image/image-metadata.d.ts +2 -0
- package/image/index.d.ts +3 -0
- package/image.mjs +134 -0
- package/image.mjs.map +7 -0
- package/knowledge/article/article.knowledge.service.d.ts +53 -0
- package/knowledge/article/define/config.d.ts +60 -0
- package/knowledge/article/define/index.d.ts +2 -0
- package/knowledge/article/define/payload.d.ts +16 -0
- package/knowledge/article/index.d.ts +2 -0
- package/knowledge/common/common.knowledge.service.d.ts +240 -0
- package/knowledge/common/define/base.d.ts +7 -0
- package/knowledge/common/define/chunk.d.ts +14 -0
- package/knowledge/common/define/embedding.d.ts +5 -0
- package/knowledge/common/define/index.d.ts +3 -0
- package/knowledge/common/index.d.ts +1 -0
- package/knowledge/common/query.d.ts +7 -0
- package/knowledge/const.d.ts +95 -0
- package/knowledge/define/index.d.ts +245 -0
- package/knowledge/dict/define/config.d.ts +68 -0
- package/knowledge/dict/define/index.d.ts +1 -0
- package/knowledge/dict/dict.knowledge.service.d.ts +67 -0
- package/knowledge/graph/const.d.ts +20 -0
- package/knowledge/graph/define/config.d.ts +169 -0
- package/knowledge/graph/define/define.d.ts +402 -0
- package/knowledge/graph/define/index.d.ts +2 -0
- package/knowledge/graph/define/query.d.ts +14 -0
- package/knowledge/graph/graph.handle.service.d.ts +28 -0
- package/knowledge/graph/graph.knowledge.service.d.ts +40 -0
- package/knowledge/graph/graph.local.service.d.ts +85 -0
- package/knowledge/graph/graph.query.service.d.ts +160 -0
- package/knowledge/graph/graph.service.d.ts +24 -0
- package/knowledge/graph/graph.util.service.d.ts +31 -0
- package/knowledge/graph/type.d.ts +11 -0
- package/knowledge/graph/util/format-attr.d.ts +48 -0
- package/knowledge/graph/util/graph-util.d.ts +5 -0
- package/knowledge/graph/util.d.ts +1 -0
- package/knowledge/graph/vecotr-format.d.ts +11 -0
- package/knowledge/index.d.ts +17 -0
- package/knowledge/knowledge.manager.service.d.ts +42 -0
- package/knowledge/knowledge.util.service.d.ts +21 -0
- package/knowledge/normal/define/config.d.ts +60 -0
- package/knowledge/normal/define/index.d.ts +1 -0
- package/knowledge/normal/normal.knowledge.service.d.ts +49 -0
- package/knowledge/template.format.d.ts +6 -0
- package/knowledge/type.d.ts +28 -0
- package/knowledge.mjs +2856 -0
- package/knowledge.mjs.map +7 -0
- package/ocr/FileUtils.d.ts +4 -0
- package/ocr/ImageRaw.d.ts +11 -0
- package/ocr/index.d.ts +2 -0
- package/ocr/model-config.d.ts +8 -0
- package/ocr/ocr.d.ts +29 -0
- package/ocr.mjs +351 -0
- package/ocr.mjs.map +7 -0
- package/package.json +105 -0
- package/qdrant/index.d.ts +3 -0
- package/qdrant/qdrant-client.service.d.ts +396 -0
- package/qdrant/qdrant-server.service.d.ts +21 -0
- package/qdrant/type.d.ts +18 -0
- package/qdrant/util.d.ts +1 -0
- package/qdrant.mjs +274 -0
- package/qdrant.mjs.map +7 -0
- package/util/batch-queue.d.ts +6 -0
- package/util/cache-queue.d.ts +10 -0
- package/util/clone.d.ts +1 -0
- package/util/embedding-queue.d.ts +3 -0
- package/util/get-hash.d.ts +2 -0
- package/util/html-to-text/index.d.ts +5 -0
- package/util/index.d.ts +10 -0
- package/util/is-truthy.d.ts +1 -0
- package/util/log.service.d.ts +6 -0
- package/util/promise.d.ts +5 -0
- package/util/type.d.ts +1 -0
- package/util/uniq-object-key.d.ts +1 -0
- package/util.mjs +219 -0
- package/util.mjs.map +7 -0
- package/worker/custom-cache.d.ts +28 -0
- package/worker/ocr/index.d.ts +17 -0
- package/worker/ocr.mjs +75 -0
- package/worker/ocr.mjs.map +7 -0
- package/worker/reranker.mjs +180 -0
- package/worker/reranker.mjs.map +7 -0
- package/worker/set-transformers-config.d.ts +19 -0
- package/worker/text2vec/index.d.ts +9 -0
- package/worker/text2vec.mjs +194 -0
- package/worker/text2vec.mjs.map +7 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InjectionToken } from 'static-injector';
|
|
2
|
+
export type EmbeddingConfig = {
|
|
3
|
+
/** 缓存嵌入数量 */
|
|
4
|
+
maxCache: number;
|
|
5
|
+
/** 超时清除 */
|
|
6
|
+
ttl: number;
|
|
7
|
+
/** 每批最大数量 */
|
|
8
|
+
maxBatchSize: number;
|
|
9
|
+
maxAsyncCount: number;
|
|
10
|
+
text2Vec: (list: string[]) => Promise<number[][]>;
|
|
11
|
+
};
|
|
12
|
+
export declare const EmbeddingConfigToken: InjectionToken<EmbeddingConfig>;
|
package/embedding.mjs
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// packages/embedding/embedding.service.ts
|
|
2
|
+
import { inject } from "static-injector";
|
|
3
|
+
|
|
4
|
+
// packages/embedding/type.ts
|
|
5
|
+
import { InjectionToken } from "static-injector";
|
|
6
|
+
var EmbeddingConfigToken = new InjectionToken(
|
|
7
|
+
"EmbeddingConfig"
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
// packages/embedding/embedding.service.ts
|
|
11
|
+
import { LRUCache } from "lru-cache";
|
|
12
|
+
import { chunk, uniq } from "es-toolkit";
|
|
13
|
+
import { promise as fastq } from "fastq";
|
|
14
|
+
var EmbeddingService = class {
|
|
15
|
+
#config = inject(EmbeddingConfigToken);
|
|
16
|
+
#cache = new LRUCache({
|
|
17
|
+
max: this.#config.maxCache,
|
|
18
|
+
ttl: this.#config.ttl
|
|
19
|
+
});
|
|
20
|
+
#queue = fastq(
|
|
21
|
+
async (value) => this.#config.text2Vec(value),
|
|
22
|
+
this.#config.maxAsyncCount
|
|
23
|
+
);
|
|
24
|
+
async text2Vec(value) {
|
|
25
|
+
if (typeof value === "string") {
|
|
26
|
+
if (!this.#cache.has(value)) {
|
|
27
|
+
const data = this.#queue.push([value]).then(([item]) => item);
|
|
28
|
+
this.#cache.set(value, data);
|
|
29
|
+
}
|
|
30
|
+
return await this.#cache.get(value);
|
|
31
|
+
}
|
|
32
|
+
const cachedObj = {};
|
|
33
|
+
const pendingList = [];
|
|
34
|
+
for (const item of uniq(value)) {
|
|
35
|
+
if (this.#cache.has(item)) {
|
|
36
|
+
cachedObj[item] = this.#cache.get(item);
|
|
37
|
+
} else {
|
|
38
|
+
pendingList.push(item);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (pendingList.length) {
|
|
42
|
+
const chunPendingList = chunk(pendingList, this.#config.maxBatchSize);
|
|
43
|
+
await Promise.all(
|
|
44
|
+
chunPendingList.map(
|
|
45
|
+
(subList) => this.#queue.push(subList).then(
|
|
46
|
+
(list) => list.forEach((item, i) => {
|
|
47
|
+
cachedObj[subList[i]] = Promise.resolve(item);
|
|
48
|
+
this.#cache.set(subList[i], cachedObj[subList[i]]);
|
|
49
|
+
})
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return Promise.all(value.map((item) => cachedObj[item]));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
EmbeddingConfigToken,
|
|
59
|
+
EmbeddingService
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=embedding.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../packages/embedding/embedding.service.ts", "../packages/embedding/type.ts"],
|
|
4
|
+
"sourcesContent": ["import { inject } from 'static-injector';\nimport { EmbeddingConfigToken } from './type';\nimport { LRUCache } from 'lru-cache';\nimport { chunk, uniq } from 'es-toolkit';\nimport { promise as fastq } from 'fastq';\nexport class EmbeddingService {\n #config = inject(EmbeddingConfigToken);\n #cache = new LRUCache<string, Promise<number[]>>({\n max: this.#config.maxCache,\n ttl: this.#config.ttl,\n });\n\n #queue = fastq(\n async (value: string[]): Promise<number[][]> =>\n this.#config.text2Vec(value),\n this.#config.maxAsyncCount,\n );\n async text2Vec<T extends string | string[]>(\n value: T,\n ): Promise<T extends string ? number[] : number[][]> {\n if (typeof value === 'string') {\n if (!this.#cache.has(value)) {\n const data = this.#queue.push([value]).then(([item]) => item);\n this.#cache.set(value, data);\n }\n return (await this.#cache.get(value))! as any;\n }\n const cachedObj = {} as Record<string, Promise<number[]>>;\n const pendingList = [] as string[];\n for (const item of uniq(value)) {\n if (this.#cache.has(item)) {\n cachedObj[item] = this.#cache.get(item)!;\n } else {\n pendingList.push(item);\n }\n }\n if (pendingList.length) {\n const chunPendingList = chunk(pendingList, this.#config.maxBatchSize);\n await Promise.all(\n chunPendingList.map((subList) =>\n this.#queue.push(subList).then((list) =>\n list.forEach((item, i) => {\n cachedObj[subList[i]] = Promise.resolve(item);\n this.#cache.set(subList[i], cachedObj[subList[i]]);\n }),\n ),\n ),\n );\n }\n return Promise.all(value.map((item) => cachedObj[item]!)) as any;\n }\n}\n", "import { InjectionToken } from 'static-injector';\n\nexport type EmbeddingConfig = {\n /** 缓存嵌入数量 */\n maxCache: number;\n /** 超时清除 */\n ttl: number;\n /** 每批最大数量 */\n maxBatchSize: number;\n maxAsyncCount: number;\n text2Vec: (list: string[]) => Promise<number[][]>;\n};\nexport const EmbeddingConfigToken = new InjectionToken<EmbeddingConfig>(\n 'EmbeddingConfig',\n);\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,cAAc;;;ACAvB,SAAS,sBAAsB;AAYxB,IAAM,uBAAuB,IAAI;AAAA,EACtC;AACF;;;ADZA,SAAS,gBAAgB;AACzB,SAAS,OAAO,YAAY;AAC5B,SAAS,WAAW,aAAa;AAC1B,IAAM,mBAAN,MAAuB;AAAA,EAC5B,UAAU,OAAO,oBAAoB;AAAA,EACrC,SAAS,IAAI,SAAoC;AAAA,IAC/C,KAAK,KAAK,QAAQ;AAAA,IAClB,KAAK,KAAK,QAAQ;AAAA,EACpB,CAAC;AAAA,EAED,SAAS;AAAA,IACP,OAAO,UACL,KAAK,QAAQ,SAAS,KAAK;AAAA,IAC7B,KAAK,QAAQ;AAAA,EACf;AAAA,EACA,MAAM,SACJ,OACmD;AACnD,QAAI,OAAO,UAAU,UAAU;AAC7B,UAAI,CAAC,KAAK,OAAO,IAAI,KAAK,GAAG;AAC3B,cAAM,OAAO,KAAK,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,MAAM,IAAI;AAC5D,aAAK,OAAO,IAAI,OAAO,IAAI;AAAA,MAC7B;AACA,aAAQ,MAAM,KAAK,OAAO,IAAI,KAAK;AAAA,IACrC;AACA,UAAM,YAAY,CAAC;AACnB,UAAM,cAAc,CAAC;AACrB,eAAW,QAAQ,KAAK,KAAK,GAAG;AAC9B,UAAI,KAAK,OAAO,IAAI,IAAI,GAAG;AACzB,kBAAU,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI;AAAA,MACxC,OAAO;AACL,oBAAY,KAAK,IAAI;AAAA,MACvB;AAAA,IACF;AACA,QAAI,YAAY,QAAQ;AACtB,YAAM,kBAAkB,MAAM,aAAa,KAAK,QAAQ,YAAY;AACpE,YAAM,QAAQ;AAAA,QACZ,gBAAgB;AAAA,UAAI,CAAC,YACnB,KAAK,OAAO,KAAK,OAAO,EAAE;AAAA,YAAK,CAAC,SAC9B,KAAK,QAAQ,CAAC,MAAM,MAAM;AACxB,wBAAU,QAAQ,CAAC,CAAC,IAAI,QAAQ,QAAQ,IAAI;AAC5C,mBAAK,OAAO,IAAI,QAAQ,CAAC,GAAG,UAAU,QAAQ,CAAC,CAAC,CAAC;AAAA,YACnD,CAAC;AAAA,UACH;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,WAAO,QAAQ,IAAI,MAAM,IAAI,CAAC,SAAS,UAAU,IAAI,CAAE,CAAC;AAAA,EAC1D;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FileTypeResult } from 'file-type';
|
|
2
|
+
import { InjectionToken, Signal } from 'static-injector';
|
|
3
|
+
import { FormatedData } from './document-file-parser.service';
|
|
4
|
+
export interface FileParser {
|
|
5
|
+
priority: number;
|
|
6
|
+
parse: (fileName: string, buffer: Uint8Array | ArrayBuffer, type: FileTypeResult | undefined) => Promise<FormatedData[] | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare const FileParserToken: InjectionToken<FileParser[]>;
|
|
9
|
+
export declare const ImageParserToken: InjectionToken<(assetPath: string, prefix: string, buffer: Buffer<ArrayBufferLike>) => Promise<{
|
|
10
|
+
content: string;
|
|
11
|
+
parseTo: string;
|
|
12
|
+
}>>;
|
|
13
|
+
export declare const DocumentParserConfigToken: InjectionToken<Signal<{
|
|
14
|
+
pdfAsImage?: {
|
|
15
|
+
enable?: boolean;
|
|
16
|
+
viewPortOptions?: {
|
|
17
|
+
scale?: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RootStaticInjectOptions } from 'static-injector';
|
|
2
|
+
import { AbstractDictParse, DictParseResult } from '../../type';
|
|
3
|
+
import { PassCode } from '@cyia/mdict-reader';
|
|
4
|
+
export declare class DslParseService extends RootStaticInjectOptions implements AbstractDictParse {
|
|
5
|
+
parse(filePath: string, options?: Partial<PassCode>): Promise<DictParseResult>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dslFormat(input: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AbstractDictParse } from '../type';
|
|
2
|
+
import { Mdict, PassCode } from '@cyia/mdict-reader';
|
|
3
|
+
import { RootStaticInjectOptions } from 'static-injector';
|
|
4
|
+
export declare class MdictParseService extends RootStaticInjectOptions implements AbstractDictParse {
|
|
5
|
+
parse(filePathList: string, options?: PassCode): Promise<{
|
|
6
|
+
info: {
|
|
7
|
+
name: string;
|
|
8
|
+
fileName: string;
|
|
9
|
+
};
|
|
10
|
+
dataListGenerator: () => AsyncGenerator<{
|
|
11
|
+
content: string;
|
|
12
|
+
word: string;
|
|
13
|
+
}, void, unknown>;
|
|
14
|
+
afterSave: (assetFolder: string) => Promise<void>;
|
|
15
|
+
}>;
|
|
16
|
+
wordListGenerator(mdxInstance: Mdict): AsyncGenerator<{
|
|
17
|
+
content: string;
|
|
18
|
+
word: string;
|
|
19
|
+
}, void, unknown>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbstractDictParse } from '../type';
|
|
2
|
+
import { RootStaticInjectOptions } from 'static-injector';
|
|
3
|
+
export declare class StardictParseService extends RootStaticInjectOptions implements AbstractDictParse {
|
|
4
|
+
#private;
|
|
5
|
+
parse(filePathList: string): Promise<{
|
|
6
|
+
info: any;
|
|
7
|
+
dataListGenerator: () => AsyncGenerator<{
|
|
8
|
+
word: string;
|
|
9
|
+
content: string;
|
|
10
|
+
}, void, unknown>;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AbstractDictParse } from '../type';
|
|
2
|
+
import { RootStaticInjectOptions } from 'static-injector';
|
|
3
|
+
import * as v from 'valibot';
|
|
4
|
+
export declare const YamlDefine: v.ObjectSchema<{
|
|
5
|
+
readonly list: v.ArraySchema<v.ObjectSchema<{
|
|
6
|
+
readonly word: v.StringSchema<undefined>;
|
|
7
|
+
readonly content: v.StringSchema<undefined>;
|
|
8
|
+
readonly extra: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
9
|
+
}, undefined>, undefined>;
|
|
10
|
+
}, undefined>;
|
|
11
|
+
export declare class YamlDictParseService extends RootStaticInjectOptions implements AbstractDictParse {
|
|
12
|
+
parse(filePathList: string): Promise<{
|
|
13
|
+
info: {
|
|
14
|
+
fileName: string;
|
|
15
|
+
name: string;
|
|
16
|
+
};
|
|
17
|
+
dataListGenerator: () => AsyncGenerator<{
|
|
18
|
+
word: string;
|
|
19
|
+
content: string;
|
|
20
|
+
extra?: {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
} | undefined;
|
|
23
|
+
}, void, unknown>;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DictInput } from './type';
|
|
2
|
+
import { RootStaticInjectOptions } from 'static-injector';
|
|
3
|
+
export declare class DictService extends RootStaticInjectOptions {
|
|
4
|
+
#private;
|
|
5
|
+
getDictName(input: DictInput): Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* 第一个需要修改为3个操作
|
|
8
|
+
*/
|
|
9
|
+
importDict(name: string, dir: string, input: DictInput): Promise<AsyncGenerator<import("./type").WordItem, any, any>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PassCode } from '@cyia/mdict-reader';
|
|
2
|
+
export interface AbstractDictParse {
|
|
3
|
+
parse(filePath: string, options?: Partial<PassCode>): Promise<DictParseResult>;
|
|
4
|
+
}
|
|
5
|
+
export interface WordItem {
|
|
6
|
+
word: string;
|
|
7
|
+
content: string;
|
|
8
|
+
extra?: Record<string, any>;
|
|
9
|
+
htmlContent?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DictParseResult {
|
|
12
|
+
info: {
|
|
13
|
+
name: string;
|
|
14
|
+
fileName: string | null;
|
|
15
|
+
[name: string]: any;
|
|
16
|
+
};
|
|
17
|
+
dataListGenerator: () => AsyncGenerator<WordItem>;
|
|
18
|
+
afterSave?: (assetPath: string) => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export type DictInput = {
|
|
21
|
+
filePath: string;
|
|
22
|
+
/** todo 可以加yaml */
|
|
23
|
+
type: 'stardict' | 'mdict' | 'yaml' | 'dsl';
|
|
24
|
+
} & Partial<PassCode>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FileTypeResult } from 'file-type';
|
|
2
|
+
import { RootStaticInjectOptions } from 'static-injector';
|
|
3
|
+
import type { Document } from '@langchain/core/documents';
|
|
4
|
+
export type ParsedData = Document<Record<string, any>> & {
|
|
5
|
+
parseTo?: string;
|
|
6
|
+
};
|
|
7
|
+
export type FormatedData = {
|
|
8
|
+
title: any;
|
|
9
|
+
content: string;
|
|
10
|
+
parseTo?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class DocumentFileParserService extends RootStaticInjectOptions {
|
|
13
|
+
#private;
|
|
14
|
+
parse(filePath: string, buffer: Uint8Array | ArrayBuffer, type: FileTypeResult | undefined): Promise<FormatedData[] | undefined>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RootStaticInjectOptions } from 'static-injector';
|
|
2
|
+
import { FileParser } from './const';
|
|
3
|
+
import { FormatedData } from './document-file-parser.service';
|
|
4
|
+
export declare class FileParserService extends RootStaticInjectOptions implements FileParser {
|
|
5
|
+
#private;
|
|
6
|
+
priority: number;
|
|
7
|
+
parse(fileName: string, buffer: Uint8Array | ArrayBuffer): Promise<FormatedData[]>;
|
|
8
|
+
/** 用于支持工作流读文件 */
|
|
9
|
+
parseOne(fileName: string, buffer: Uint8Array | ArrayBuffer): Promise<{
|
|
10
|
+
content: string;
|
|
11
|
+
parseTo: string | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function textAnalyse(buffer: Uint8Array): import("chardet").EncodingName;
|