1 | Восстановление буквы «ё» в русских текстах
|
2 | ===
|
3 | [![NPM version](https://img.shields.io/npm/v/eyo.svg?style=flat)](https://www.npmjs.com/package/eyo)
|
4 | [![NPM downloads](https://img.shields.io/npm/dm/eyo.svg?style=flat)](https://www.npmjs.com/package/eyo)
|
5 | [![Build Status](https://img.shields.io/travis/hcodes/eyo.svg?style=flat)](https://travis-ci.org/hcodes/eyo)
|
6 | [![Build Status](https://img.shields.io/appveyor/ci/hcodes/eyo/master.svg?style=flat)](https://ci.appveyor.com/project/hcodes/eyo)
|
7 | [![Coverage Status](https://img.shields.io/coveralls/hcodes/eyo.svg?style=flat)](https://coveralls.io/r/hcodes/eyo)
|
8 | [![Dependency Status](https://img.shields.io/david/hcodes/eyo.svg?style=flat)](https://david-dm.org/hcodes/eyo)
|
9 |
|
10 | <img src="https://raw.githubusercontent.com/hcodes/eyo/master/images/logo.png" align="right" alt="eyo" width="200" height="200" />
|
11 |
|
12 | ## Особенности
|
13 | + проверка и восстановление буквы «ё» в русских текстах, вместо написанной «е»;
|
14 | + замена «е» на «ё» только в бесспорных случаях;
|
15 | + исправление в словах нескольких букв «е», «ё»;
|
16 | + корректная обработка сокращений («мед. училище», но не «мёд. училище»);
|
17 | + аббревиатуры не обрабатываются.
|
18 |
|
19 | ![eyo](https://raw.githubusercontent.com/hcodes/eyo/master/images/screenshot.png)
|
20 |
|
21 |
|
22 | ## Установка
|
23 | `npm install eyo -g`
|
24 |
|
25 | ## Командная строка
|
26 | ```
|
27 | Usage: eyo [options] <file-or-url...>
|
28 | Restoring the letter «ё» (yo) in russian texts.
|
29 |
|
30 | Options:
|
31 | -h, --help Output usage information
|
32 | -V, --version Output the version number
|
33 | -l, --lint Search of safe and unsafe replacements
|
34 | -s, --sort Sort results
|
35 | --only-safe Output only safe replacements
|
36 | --stdin Process text provided on <STDIN>
|
37 | --stdin-filename <file> Specify filename to process STDIN as
|
38 | --no-colors Clean output without colors
|
39 | ```
|
40 |
|
41 | ### Примеры использования
|
42 | `eyo file.txt > file.out.txt` — безопасная замена «е» на «ё» в файле.<br/>
|
43 | `eyo https://example.com/index.html > file.out.html` — безопасная замена «е» на «ё» на странице сайта.
|
44 |
|
45 | `eyo --lint file1.txt file2.txt` — вывод слов для файлов, где необходима или возможна замена.<br/>
|
46 | `eyo --lint http://habrahabr.ru` — вывод слов для страницы сайта, где необходима или возможна замена.
|
47 |
|
48 | `cat file1.txt file2.txt file3.txt | eyo --stdin > output.txt`<br/>
|
49 | `cat file1.txt | eyo --stdin --stdin-filename file1.txt`
|
50 |
|
51 | ## Node.js
|
52 |
|
53 | Используйте отдельный пакет [`eyo-kernel`](https://www.npmjs.com/package/eyo-kernel) без зависимостей.
|
54 |
|
55 | `npm install eyo-kernel`
|
56 |
|
57 | ```js
|
58 | var eyo = require('eyo-kernel');
|
59 | console.log(eyo.restore('Лед')); // Лёд
|
60 | ```
|
61 |
|
62 | ## Ссылки
|
63 | + [Ёфикация в браузере](https://hcodes.github.io/eyo-browser/)
|
64 | + [eyo-kernel](https://www.npmjs.com/package/eyo-kernel) — отдельный пакет для ёфикации без зависимостей
|
65 | + [https://ru.wikipedia.org/wiki/Ёфикатор](https://ru.wikipedia.org/wiki/%D0%81%D1%84%D0%B8%D0%BA%D0%B0%D1%82%D0%BE%D1%80)
|
66 | + [Про букву ё](http://www.gramota.ru/class/istiny/istiny_7_jo/)
|
67 | + [Поиск опечаток в тексте](https://github.com/hcodes/yaspeller)
|
68 |
|
69 | ## [Лицензия](./LICENSE)
|
70 | MIT License
|