Code Monkey home page Code Monkey logo

eyo's Introduction

Восстановление буквы «ё» в русских текстах

NPM version NPM downloads Build Status Build Status Coverage Status install size

eyo

Особенности

  • проверка и восстановление буквы «ё» в русских текстах, вместо написанной «е»;
  • замена «е» на «ё» только в бесспорных случаях;
  • исправление в словах нескольких букв «е», «ё»;
  • корректная обработка сокращений («мед. училище», но не «мёд. училище»);
  • аббревиатуры не обрабатываются.

eyo

Установка

npm install eyo -g

Командная строка

Usage: eyo [options] <file-or-url...>
    Restoring the letter «ё» (yo) in russian texts.

Options:
    -h, --help                  Output usage information
    -V, --version               Output the version number
    -l, --lint                  Search of safe and unsafe replacements
    -i, --in-place              Write files in place.
    -s, --sort                  Sort results
        --only-safe             Output only safe replacements
        --stdin                 Process text provided on <STDIN>
        --stdin-filename <file> Specify filename to process STDIN as
        --no-colors             Clean output without colors

Примеры использования

eyo file.txt > file.out.txt — безопасная замена «е» на «ё».
eyo https://example.com/index.html > file.out.html — безопасная замена «е» на «ё» на странице сайта.

eyo -i README.md — файл README.md будет перезаписан с безопасной заменой «е» на «ё».
eyo -i "**/*.md" — файлы с расширением .md будут перезаписаны с безопасной заменой «е» на «ё».
find . -name "*.md" | xargs eyo --lint
eyo --lint file1.txt file2.txt — вывод слов для файлов, где необходима или возможна замена.
eyo --lint http://habrahabr.ru — вывод слов для страницы сайта, где необходима или возможна замена.

cat file1.txt file2.txt file3.txt | eyo --stdin > output.txt
cat file1.txt | eyo --stdin --stdin-filename file1.txt

Node.js

Используйте отдельный пакет eyo-kernel без зависимостей.

npm install eyo-kernel

Ссылки

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.