import type { NobjcObject } from "objc-js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { NSRange } from "../structs/NSRange.js";
import type { NLLanguage } from "./NLLanguage.js";
import type { NLTokenUnit } from "./NLTokenUnit.js";
import type { NLTokenizerAttributes } from "./NLTokenizerAttributes.js";
export declare class _NLTokenizer extends _NSObject {
    static alloc(): _NLTokenizer;
    static new(): _NLTokenizer;
    init(): _NLTokenizer;
    initWithUnit$(unit: NLTokenUnit): _NLTokenizer;
    /**
     * Clients may specify the language of the string, if it is known; otherwise it will be determined from the text.
     */
    setLanguage$(language: NLLanguage): void;
    /**
     * Returns the range corresponding to the token for the tokenizer's unit that contains the given character index. The index must not extend beyond the end of the tokenizer's string, or the method will raise an exception.
     */
    tokenRangeAtIndex$(characterIndex: number): NSRange;
    /**
     * Returns the smallest range covering all tokens for the tokenizer's unit intersecting the given range. If range.length == 0, this is equivalent to tokenRangeAtIndex:.
     */
    tokenRangeForRange$(range: NSRange): NSRange;
    /**
     * Returns the ranges corresponding to the tokens for the tokenizer's unit that intersect the given range.
     */
    tokensForRange$(range: NSRange): _NSArray;
    /**
     * The tokenizer will segment the string as needed into tokens for the given unit, and return those ranges via a block iterator, that iterates over all tokens intersecting a given range, supplying token ranges and flags. The range passed in must not extend beyond the end of the tokenizer's string, or the method will raise an exception. Note that a given instance of NLTokenizer should not be used from more than one thread simultaneously.
     */
    enumerateTokensInRange$usingBlock$(range: NSRange, block: (tokenRange: NSRange, flags: NLTokenizerAttributes, stop: NobjcObject) => void): void;
    unit(): NLTokenUnit;
    /**
     * An NLTokenizer instance must be assigned a string to tokenize, and clients can then obtain ranges for tokens in that string appropriate to the tokenizer's unit.
     */
    string(): _NSString | null;
    setString$(value: _NSString | null): void;
}
