eyo-kernel
Version:
Restoring the letter «ё» (yo) in russian texts
28 lines (27 loc) • 651 B
TypeScript
import { Dictionary } from './dictionary.js';
type Position = {
line: number;
column: number;
index: number;
};
type Replacement = {
before: string;
after: string;
position: Position[];
};
export declare class Eyo {
dictionary: Dictionary;
/**
* Ищет варианты замены буквы «е» на «ё».
*/
lint(text: string, groupByWords?: boolean): Replacement[];
/**
* Восстанавливает букву «ё» в тексте.
*/
restore(text: string): string;
private hasEYo;
private getPosition;
private delDuplicates;
private sort;
}
export {};