indickit 0.9.0 → 0.10.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.
@@ -96,8 +96,10 @@ export interface Search {
96
96
  }
97
97
  /** Loads one language's table (Latin queries against its script) and, for
98
98
  * native-to-native search, the tables between the scripts named in `scripts`
99
- * (e.g. ["deva", "arab", "beng"]). A missing table falls back to the fine keys. */
100
- export declare function loadSearch(lang: string, options?: {
99
+ * (e.g. ["deva", "arab", "beng"]). A missing table falls back to the fine keys.
100
+ * `lang` is a language tag ("hi", "ta-IN", "urd"); only its language counts,
101
+ * as in every indickit utility, and `Search.lang` is that code. */
102
+ export declare function loadSearch(tag: string, options?: {
101
103
  scripts?: string[];
102
104
  fetcher?: Fetcher;
103
105
  }): Promise<Search>;
@@ -10,17 +10,10 @@
10
10
  *
11
11
  * @module
12
12
  */
13
- /** @internal For ./phonetic-search: the engine compiler, the normalizer and the
14
- * search key's engine (keys of a normalized word). Not part of the API. */
15
- export declare const _internal: {
16
- compile: (r: unknown) => (word: string) => string[];
17
- normalize: (w: string) => string;
18
- engine: (word: string) => string[];
19
- };
13
+ import { MAX_NAME_KEYS } from "./phonetic-engine";
14
+ export { MAX_NAME_KEYS };
20
15
  /** The rules every key from this module was made with. */
21
16
  export declare const RULES_VERSION: string;
22
- /** NameKeys stops here: a long Tamil name can have many key combinations. */
23
- export declare const MAX_NAME_KEYS = 256;
24
17
  /** The sorted keys of one word; empty when it holds no letter the rules read. */
25
18
  export declare function keys(word: string): string[];
26
19
  /** A name split the way nameKeys and match split it: on spaces and
@@ -49,7 +49,5 @@ export declare function load(lang: string, mode?: Mode, opts?: {
49
49
  }): Promise<Romanizer>;
50
50
  /** Builds a Romanizer from a language's two files (for tests and offline use). */
51
51
  export declare function fromBytes(lang: string, mode: Mode, own: Uint8Array, pool: Uint8Array): Romanizer;
52
- /** Moves every Brahmic code point to the Devanagari block by its offset (rules.json "unify"). */
53
- export declare function unify(w: string): string;
54
52
  /** @internal The model's own list for a unified word (no lookup), for the conformance test. */
55
53
  export declare function _decode(r: Romanizer, word: string, n: number): string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "indickit",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Small, exact utilities for text in Indian languages: a phonetic key that matches a name across 21 Indian scripts and English, a normalizer that gives text that looks the same one encoding, a segmenter for the letters a reader sees, and a stemmer for search.",
5
5
  "license": "MIT",
6
6
  "packageManager": "bun@1.3.14",