cspell-dictionary 7.0.0-alpha.2 → 7.0.0
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/SpellingDictionary/FlagWordsDictionary.js +3 -6
- package/dist/SpellingDictionary/SpellingDictionary.d.ts +3 -43
- package/dist/SpellingDictionary/SpellingDictionary.js +0 -1
- package/dist/SpellingDictionary/SpellingDictionaryCollection.js +3 -6
- package/dist/SpellingDictionary/SpellingDictionaryFromTrie.d.ts +8 -8
- package/dist/SpellingDictionary/SpellingDictionaryFromTrie.js +6 -11
- package/dist/SpellingDictionary/SpellingDictionaryMethods.d.ts +1 -2
- package/dist/SpellingDictionary/SpellingDictionaryMethods.js +0 -12
- package/dist/SpellingDictionary/SuggestOptions.d.ts +33 -0
- package/dist/SpellingDictionary/SuggestOptions.js +8 -0
- package/dist/SpellingDictionary/createSpellingDictionary.js +2 -2
- package/dist/SpellingDictionary/index.d.ts +4 -1
- package/dist/SpellingDictionary/index.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { opMap, pipe } from '@cspell/cspell-pipe/sync';
|
|
2
|
-
import {
|
|
2
|
+
import { buildITrieFromWords, parseDictionaryLines } from 'cspell-trie-lib';
|
|
3
3
|
import { createAutoResolveWeakCache } from '../util/AutoResolve.js';
|
|
4
4
|
import * as Defaults from './defaults.js';
|
|
5
5
|
import { defaultOptions } from './SpellingDictionary.js';
|
|
6
6
|
import { SpellingDictionaryFromTrie } from './SpellingDictionaryFromTrie.js';
|
|
7
|
-
import { suggestArgsToSuggestOptions } from './SpellingDictionaryMethods.js';
|
|
8
7
|
import { createTyposDictionary } from './TyposDictionary.js';
|
|
9
8
|
class FlagWordsDictionaryTrie extends SpellingDictionaryFromTrie {
|
|
10
9
|
constructor(trie, name, source) {
|
|
@@ -76,9 +75,7 @@ class FlagWordsDictionary {
|
|
|
76
75
|
isNoSuggestWord(word, options) {
|
|
77
76
|
return this.dictTrie?.isNoSuggestWord(word, options) || this.dictTypos.isNoSuggestWord(word, options);
|
|
78
77
|
}
|
|
79
|
-
suggest(
|
|
80
|
-
const [word] = args;
|
|
81
|
-
const suggestOptions = suggestArgsToSuggestOptions(args);
|
|
78
|
+
suggest(word, suggestOptions = {}) {
|
|
82
79
|
return this.dictTypos.suggest(word, suggestOptions);
|
|
83
80
|
}
|
|
84
81
|
getPreferredSuggestions(word) {
|
|
@@ -119,7 +116,7 @@ export function createFlagWordsDictionary(wordList, name, source) {
|
|
|
119
116
|
}
|
|
120
117
|
const regExpCleanIgnore = /^(!!)+/;
|
|
121
118
|
function buildTrieDict(words, name, source) {
|
|
122
|
-
const trie =
|
|
119
|
+
const trie = buildITrieFromWords(pipe(words, opMap((w) => '!' + w), opMap((w) => w.replace(regExpCleanIgnore, ''))));
|
|
123
120
|
return new FlagWordsDictionaryTrie(trie, name, source);
|
|
124
121
|
}
|
|
125
122
|
function bisect(values, predicate) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DictionaryInformation, ReplaceMap } from '@cspell/cspell-types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SuggestionCollector, SuggestionResult, WeightMap } from 'cspell-trie-lib';
|
|
3
|
+
import type { SuggestOptions } from './SuggestOptions.js';
|
|
3
4
|
export type { DictionaryDefinitionInline } from '@cspell/cspell-types';
|
|
4
|
-
export { CompoundWordsMethod, type SuggestionCollector, type SuggestionResult } from 'cspell-trie-lib';
|
|
5
5
|
export interface SearchOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Legacy compounds have been deprecated.
|
|
@@ -14,36 +14,6 @@ export interface SearchOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
ignoreCase?: boolean | undefined;
|
|
16
16
|
}
|
|
17
|
-
export interface SuggestOptions {
|
|
18
|
-
/**
|
|
19
|
-
* Compounding Mode.
|
|
20
|
-
* `NONE` is the best option.
|
|
21
|
-
*/
|
|
22
|
-
compoundMethod?: CompoundWordsMethod | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* The limit on the number of suggestions to generate. If `allowTies` is true, it is possible
|
|
25
|
-
* for more suggestions to be generated.
|
|
26
|
-
*/
|
|
27
|
-
numSuggestions?: number | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Max number of changes / edits to the word to get to a suggestion matching suggestion.
|
|
30
|
-
*/
|
|
31
|
-
numChanges?: number | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Allow for case-ingestive checking.
|
|
34
|
-
*/
|
|
35
|
-
ignoreCase?: boolean | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* If multiple suggestions have the same edit / change "cost", then included them even if
|
|
38
|
-
* it causes more than `numSuggestions` to be returned.
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
includeTies?: boolean | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* Maximum amount of time to allow for generating suggestions.
|
|
44
|
-
*/
|
|
45
|
-
timeout?: number | undefined;
|
|
46
|
-
}
|
|
47
17
|
export type FindOptions = SearchOptions;
|
|
48
18
|
export interface Suggestion {
|
|
49
19
|
word: string;
|
|
@@ -124,21 +94,12 @@ export interface SpellingDictionary extends DictionaryInfo {
|
|
|
124
94
|
* @param options - options
|
|
125
95
|
*/
|
|
126
96
|
isNoSuggestWord(word: string, options: HasOptions): boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Generate suggestions for a word.
|
|
129
|
-
* @param word - word
|
|
130
|
-
* @param numSuggestions - max number of suggestions to generate.
|
|
131
|
-
* @param compoundMethod - Default NONE.
|
|
132
|
-
* @param numChanges - Default 5
|
|
133
|
-
* @param ignoreCase - true
|
|
134
|
-
*/
|
|
135
|
-
suggest(word: string, numSuggestions?: number, compoundMethod?: CompoundWordsMethod, numChanges?: number, ignoreCase?: boolean): SuggestionResult[];
|
|
136
97
|
/**
|
|
137
98
|
* Generate suggestions for a word
|
|
138
99
|
* @param word - word
|
|
139
100
|
* @param suggestOptions - options
|
|
140
101
|
*/
|
|
141
|
-
suggest(word: string, suggestOptions
|
|
102
|
+
suggest(word: string, suggestOptions?: SuggestOptions): SuggestionResult[];
|
|
142
103
|
getPreferredSuggestions?: (word: string) => PreferredSuggestion[];
|
|
143
104
|
genSuggestions(collector: SuggestionCollector, suggestOptions: SuggestOptions): void;
|
|
144
105
|
mapWord(word: string): string;
|
|
@@ -153,6 +114,5 @@ export interface SpellingDictionary extends DictionaryInfo {
|
|
|
153
114
|
readonly isDictionaryCaseSensitive: boolean;
|
|
154
115
|
getErrors?(): Error[];
|
|
155
116
|
}
|
|
156
|
-
export type SuggestArgs = Parameters<SpellingDictionary['suggest']> | Parameters<(word: string, numSuggestions?: number, compoundMethod?: CompoundWordsMethod, numChanges?: number, ignoreCase?: boolean) => SuggestionResult[]>;
|
|
157
117
|
export declare const defaultOptions: SpellingDictionaryOptions;
|
|
158
118
|
//# sourceMappingURL=SpellingDictionary.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { CASE_INSENSITIVE_PREFIX } from 'cspell-trie-lib';
|
|
1
|
+
import { CASE_INSENSITIVE_PREFIX, CompoundWordsMethod } from 'cspell-trie-lib';
|
|
2
2
|
import { genSequence } from 'gensequence';
|
|
3
3
|
import { isDefined } from '../util/util.js';
|
|
4
4
|
import * as Defaults from './defaults.js';
|
|
5
|
-
import {
|
|
6
|
-
import { defaultNumSuggestions, hasOptionToSearchOption, suggestArgsToSuggestOptions, suggestionCollector, } from './SpellingDictionaryMethods.js';
|
|
5
|
+
import { defaultNumSuggestions, hasOptionToSearchOption, suggestionCollector } from './SpellingDictionaryMethods.js';
|
|
7
6
|
function identityString(w) {
|
|
8
7
|
return w;
|
|
9
8
|
}
|
|
@@ -39,9 +38,7 @@ class SpellingDictionaryCollectionImpl {
|
|
|
39
38
|
const ignoreCase = ignoreCaseAndAccents ?? Defaults.isForbiddenIgnoreCaseAndAccents;
|
|
40
39
|
return !!this._isForbiddenInDict(word, ignoreCase) && !this.isNoSuggestWord(word, { ignoreCase });
|
|
41
40
|
}
|
|
42
|
-
suggest(
|
|
43
|
-
const [word] = args;
|
|
44
|
-
const suggestOptions = suggestArgsToSuggestOptions(args);
|
|
41
|
+
suggest(word, suggestOptions = {}) {
|
|
45
42
|
return this._suggest(word, suggestOptions);
|
|
46
43
|
}
|
|
47
44
|
_suggest(word, suggestOptions) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import type { FindResult, HasOptions, SpellingDictionary, SpellingDictionaryOptions
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { ITrie, SuggestionCollector, SuggestionResult } from 'cspell-trie-lib';
|
|
3
|
+
import type { FindResult, HasOptions, SpellingDictionary, SpellingDictionaryOptions } from './SpellingDictionary.js';
|
|
4
|
+
import type { SuggestOptions } from './SuggestOptions.js';
|
|
4
5
|
export declare class SpellingDictionaryFromTrie implements SpellingDictionary {
|
|
5
|
-
readonly trie:
|
|
6
|
+
readonly trie: ITrie;
|
|
6
7
|
readonly name: string;
|
|
7
8
|
readonly options: SpellingDictionaryOptions;
|
|
8
9
|
readonly source: string;
|
|
@@ -16,7 +17,7 @@ export declare class SpellingDictionaryFromTrie implements SpellingDictionary {
|
|
|
16
17
|
readonly isDictionaryCaseSensitive: boolean;
|
|
17
18
|
readonly containsNoSuggestWords: boolean;
|
|
18
19
|
private weightMap;
|
|
19
|
-
constructor(trie:
|
|
20
|
+
constructor(trie: ITrie, name: string, options: SpellingDictionaryOptions, source?: string, size?: number);
|
|
20
21
|
get size(): number;
|
|
21
22
|
has(word: string, hasOptions?: HasOptions): boolean;
|
|
22
23
|
find(word: string, hasOptions?: HasOptions): FindResult | undefined;
|
|
@@ -27,8 +28,7 @@ export declare class SpellingDictionaryFromTrie implements SpellingDictionary {
|
|
|
27
28
|
isNoSuggestWord(word: string, options?: HasOptions): boolean;
|
|
28
29
|
isForbidden(word: string, _ignoreCaseAndAccents?: boolean): boolean;
|
|
29
30
|
private _isForbidden;
|
|
30
|
-
suggest(word: string,
|
|
31
|
-
suggest(word: string, suggestOptions: SuggestOptions): SuggestionResult[];
|
|
31
|
+
suggest(word: string, suggestOptions?: SuggestOptions): SuggestionResult[];
|
|
32
32
|
private _suggest;
|
|
33
33
|
genSuggestions(collector: SuggestionCollector, suggestOptions: SuggestOptions): void;
|
|
34
34
|
getErrors(): Error[];
|
|
@@ -41,7 +41,7 @@ export declare class SpellingDictionaryFromTrie implements SpellingDictionary {
|
|
|
41
41
|
* @param options - options.
|
|
42
42
|
* @returns SpellingDictionary
|
|
43
43
|
*/
|
|
44
|
-
export declare function createSpellingDictionaryFromTrieFile(data:
|
|
44
|
+
export declare function createSpellingDictionaryFromTrieFile(data: string | Buffer, name: string, source: string, options: SpellingDictionaryOptions): SpellingDictionary;
|
|
45
45
|
declare function outerWordForms(word: string, mapWord: (word: string) => string[]): Set<string>;
|
|
46
46
|
export declare const __testing__: {
|
|
47
47
|
outerWordForms: typeof outerWordForms;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { opConcatMap, pipe } from '@cspell/cspell-pipe/sync';
|
|
2
|
-
import { CompoundWordsMethod,
|
|
2
|
+
import { CompoundWordsMethod, decodeTrie, suggestionCollector } from 'cspell-trie-lib';
|
|
3
3
|
import { autoCache, createCache01 } from '../util/AutoCache.js';
|
|
4
4
|
import { clean } from '../util/clean.js';
|
|
5
5
|
import { createMapper, createRepMapper } from '../util/repMap.js';
|
|
6
6
|
import * as Defaults from './defaults.js';
|
|
7
|
-
import { createWeightMapFromDictionaryInformation, defaultNumSuggestions, hasOptionToSearchOption, impersonateCollector,
|
|
7
|
+
import { createWeightMapFromDictionaryInformation, defaultNumSuggestions, hasOptionToSearchOption, impersonateCollector, wordSearchForms, wordSuggestFormsArray, } from './SpellingDictionaryMethods.js';
|
|
8
8
|
const findWordOptionsCaseSensitive = Object.freeze({ caseSensitive: true });
|
|
9
9
|
const findWordOptionsNotCaseSensitive = Object.freeze({ caseSensitive: false });
|
|
10
|
-
class SpellingDictionaryFromTrie {
|
|
10
|
+
export class SpellingDictionaryFromTrie {
|
|
11
11
|
constructor(trie, name, options, source = 'from trie', size) {
|
|
12
12
|
this.trie = trie;
|
|
13
13
|
this.name = name;
|
|
@@ -23,7 +23,7 @@ class SpellingDictionaryFromTrie {
|
|
|
23
23
|
});
|
|
24
24
|
this.mapWord = createMapper(options.repMap, options.dictionaryInformation?.ignore);
|
|
25
25
|
this.remapWord = createRepMapper(options.repMap, options.dictionaryInformation?.ignore);
|
|
26
|
-
this.isDictionaryCaseSensitive = options.caseSensitive ??
|
|
26
|
+
this.isDictionaryCaseSensitive = options.caseSensitive ?? trie.isCaseAware;
|
|
27
27
|
this.containsNoSuggestWords = options.noSuggest || false;
|
|
28
28
|
this._size = size || 0;
|
|
29
29
|
this.weightMap = options.weightMap || createWeightMapFromDictionaryInformation(options.dictionaryInformation);
|
|
@@ -102,9 +102,7 @@ class SpellingDictionaryFromTrie {
|
|
|
102
102
|
isForbidden(word, _ignoreCaseAndAccents) {
|
|
103
103
|
return this._isForbidden(word);
|
|
104
104
|
}
|
|
105
|
-
suggest(
|
|
106
|
-
const [word] = args;
|
|
107
|
-
const suggestOptions = suggestArgsToSuggestOptions(args);
|
|
105
|
+
suggest(word, suggestOptions = {}) {
|
|
108
106
|
return this._suggest(word, suggestOptions);
|
|
109
107
|
}
|
|
110
108
|
_suggest(word, suggestOptions) {
|
|
@@ -136,7 +134,6 @@ class SpellingDictionaryFromTrie {
|
|
|
136
134
|
}
|
|
137
135
|
}
|
|
138
136
|
SpellingDictionaryFromTrie.cachedWordsLimit = 50000;
|
|
139
|
-
export { SpellingDictionaryFromTrie };
|
|
140
137
|
/**
|
|
141
138
|
* Create a dictionary from a trie file.
|
|
142
139
|
* @param data - contents of a trie file.
|
|
@@ -146,9 +143,7 @@ export { SpellingDictionaryFromTrie };
|
|
|
146
143
|
* @returns SpellingDictionary
|
|
147
144
|
*/
|
|
148
145
|
export function createSpellingDictionaryFromTrieFile(data, name, source, options) {
|
|
149
|
-
|
|
150
|
-
const trieNode = importTrie(data);
|
|
151
|
-
const trie = new Trie(trieNode);
|
|
146
|
+
const trie = decodeTrie(data);
|
|
152
147
|
return new SpellingDictionaryFromTrie(trie, name, options, source);
|
|
153
148
|
}
|
|
154
149
|
function findCache(fn, size = 2000) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DictionaryInformation } from '@cspell/cspell-types';
|
|
2
2
|
import type { SuggestionResult, WeightMap } from 'cspell-trie-lib';
|
|
3
|
-
import type { HasOptions, SearchOptions
|
|
3
|
+
import type { HasOptions, SearchOptions } from './SpellingDictionary.js';
|
|
4
4
|
export { impersonateCollector, suggestionCollector } from 'cspell-trie-lib';
|
|
5
5
|
export type FilterSuggestionsPredicate = (word: SuggestionResult) => boolean;
|
|
6
6
|
export declare const defaultNumSuggestions = 10;
|
|
@@ -15,7 +15,6 @@ export declare function hasOptionToSearchOption(opt: HasOptions | undefined): Se
|
|
|
15
15
|
* @returns SearchOptions - the canonical form
|
|
16
16
|
*/
|
|
17
17
|
export declare function canonicalSearchOptions(opt: SearchOptions): SearchOptions;
|
|
18
|
-
export declare function suggestArgsToSuggestOptions(args: SuggestArgs): SuggestOptions;
|
|
19
18
|
export declare function createWeightMapFromDictionaryInformation(di: undefined): undefined;
|
|
20
19
|
export declare function createWeightMapFromDictionaryInformation(di: DictionaryInformation): WeightMap;
|
|
21
20
|
export declare function createWeightMapFromDictionaryInformation(di: DictionaryInformation | undefined): WeightMap | undefined;
|
|
@@ -75,18 +75,6 @@ export function canonicalSearchOptions(opt) {
|
|
|
75
75
|
knownCanonicalOptions.set(opt, canOpts);
|
|
76
76
|
return canOpts;
|
|
77
77
|
}
|
|
78
|
-
export function suggestArgsToSuggestOptions(args) {
|
|
79
|
-
const [_word, options, compoundMethod, numChanges, ignoreCase] = args;
|
|
80
|
-
const suggestOptions = typeof options === 'object'
|
|
81
|
-
? options
|
|
82
|
-
: {
|
|
83
|
-
numSuggestions: options,
|
|
84
|
-
compoundMethod,
|
|
85
|
-
numChanges,
|
|
86
|
-
ignoreCase,
|
|
87
|
-
};
|
|
88
|
-
return suggestOptions;
|
|
89
|
-
}
|
|
90
78
|
export function createWeightMapFromDictionaryInformation(di) {
|
|
91
79
|
return di ? mapDictionaryInformationToWeightMap(di) : undefined;
|
|
92
80
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CompoundWordsMethod } from 'cspell-trie-lib';
|
|
2
|
+
export interface SuggestOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Compounding Mode.
|
|
5
|
+
* `NONE` is the best option.
|
|
6
|
+
*/
|
|
7
|
+
compoundMethod?: CompoundWordsMethod | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* The limit on the number of suggestions to generate. If `allowTies` is true, it is possible
|
|
10
|
+
* for more suggestions to be generated.
|
|
11
|
+
*/
|
|
12
|
+
numSuggestions?: number | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Max number of changes / edits to the word to get to a suggestion matching suggestion.
|
|
15
|
+
*/
|
|
16
|
+
numChanges?: number | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Allow for case-ingestive checking.
|
|
19
|
+
*/
|
|
20
|
+
ignoreCase?: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* If multiple suggestions have the same edit / change "cost", then included them even if
|
|
23
|
+
* it causes more than `numSuggestions` to be returned.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
includeTies?: boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum amount of time to allow for generating suggestions.
|
|
29
|
+
*/
|
|
30
|
+
timeout?: number | undefined;
|
|
31
|
+
}
|
|
32
|
+
export declare function createSuggestOptions(numSuggestions?: number, compoundMethod?: CompoundWordsMethod, numChanges?: number, ignoreCase?: boolean): SuggestOptions;
|
|
33
|
+
//# sourceMappingURL=SuggestOptions.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildITrieFromWords, parseDictionaryLines } from 'cspell-trie-lib';
|
|
2
2
|
import { deepEqual } from 'fast-equals';
|
|
3
3
|
import { AutoWeakCache, SimpleCache } from '../util/simpleCache.js';
|
|
4
4
|
import { defaultOptions } from './SpellingDictionary.js';
|
|
@@ -37,7 +37,7 @@ function _createSpellingDictionary(params) {
|
|
|
37
37
|
// console.log(`createSpellingDictionary ${name} ${source}`);
|
|
38
38
|
const parseOptions = { stripCaseAndAccents: options?.supportNonStrictSearches ?? true };
|
|
39
39
|
const words = parseDictionaryLines(wordList, parseOptions);
|
|
40
|
-
const trie =
|
|
40
|
+
const trie = buildITrieFromWords(words);
|
|
41
41
|
const opts = { ...(options || defaultOptions) };
|
|
42
42
|
if (opts.weightMap === undefined && opts.dictionaryInformation) {
|
|
43
43
|
opts.weightMap = createWeightMapFromDictionaryInformation(opts.dictionaryInformation);
|
|
@@ -3,9 +3,12 @@ export { createInlineSpellingDictionary } from './createInlineSpellingDictionary
|
|
|
3
3
|
export { createFailedToLoadDictionary, createSpellingDictionary } from './createSpellingDictionary.js';
|
|
4
4
|
export { createFlagWordsDictionary, createFlagWordsDictionary as createForbiddenWordsDictionary, } from './FlagWordsDictionary.js';
|
|
5
5
|
export { createIgnoreWordsDictionary } from './IgnoreWordsDictionary.js';
|
|
6
|
-
export type { DictionaryDefinitionInline, FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryOptions,
|
|
6
|
+
export type { DictionaryDefinitionInline, FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryOptions, } from './SpellingDictionary.js';
|
|
7
7
|
export { createCollection, SpellingDictionaryCollection } from './SpellingDictionaryCollection.js';
|
|
8
8
|
export { createSpellingDictionaryFromTrieFile } from './SpellingDictionaryFromTrie.js';
|
|
9
9
|
export { createSuggestDictionary } from './SuggestDictionary.js';
|
|
10
|
+
export type { SuggestOptions } from './SuggestOptions.js';
|
|
11
|
+
export { createSuggestOptions } from './SuggestOptions.js';
|
|
10
12
|
export { createTyposDictionary } from './TyposDictionary.js';
|
|
13
|
+
export { CompoundWordsMethod, type SuggestionCollector, type SuggestionResult } from 'cspell-trie-lib';
|
|
11
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,4 +6,6 @@ export { createIgnoreWordsDictionary } from './IgnoreWordsDictionary.js';
|
|
|
6
6
|
export { createCollection } from './SpellingDictionaryCollection.js';
|
|
7
7
|
export { createSpellingDictionaryFromTrieFile } from './SpellingDictionaryFromTrie.js';
|
|
8
8
|
export { createSuggestDictionary } from './SuggestDictionary.js';
|
|
9
|
+
export { createSuggestOptions } from './SuggestOptions.js';
|
|
9
10
|
export { createTyposDictionary } from './TyposDictionary.js';
|
|
11
|
+
export { CompoundWordsMethod } from 'cspell-trie-lib';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { CachingDictionary, FindOptions, FindResult, HasOptions, SearchOptions, SpellingDictionary, SpellingDictionaryCollection, SpellingDictionaryOptions, SuggestionCollector, SuggestionResult, SuggestOptions, } from './SpellingDictionary/index.js';
|
|
2
|
-
export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createInlineSpellingDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, createSuggestDictionary, } from './SpellingDictionary/index.js';
|
|
2
|
+
export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createInlineSpellingDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, createSuggestDictionary, createSuggestOptions, } from './SpellingDictionary/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createInlineSpellingDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, createSuggestDictionary, } from './SpellingDictionary/index.js';
|
|
1
|
+
export { createCachingDictionary, createCollection, createFailedToLoadDictionary, createFlagWordsDictionary, createForbiddenWordsDictionary, createIgnoreWordsDictionary, createInlineSpellingDictionary, createSpellingDictionary, createSpellingDictionaryFromTrieFile, createSuggestDictionary, createSuggestOptions, } from './SpellingDictionary/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell-dictionary",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "A spelling dictionary library useful for checking words and getting suggestions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"node": ">=16"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@cspell/cspell-pipe": "7.0.0
|
|
51
|
-
"@cspell/cspell-types": "7.0.0
|
|
52
|
-
"cspell-trie-lib": "7.0.0
|
|
50
|
+
"@cspell/cspell-pipe": "7.0.0",
|
|
51
|
+
"@cspell/cspell-types": "7.0.0",
|
|
52
|
+
"cspell-trie-lib": "7.0.0",
|
|
53
53
|
"fast-equals": "^4.0.3",
|
|
54
54
|
"gensequence": "^5.0.2"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "52960d5ed75655978f9b633f44fd106937a63cd7"
|
|
57
57
|
}
|