All Projects → wapmorgan → Morphos

wapmorgan / Morphos

Licence: mit
A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time intervals. / Морфологическая библиотека для английского и русского языков. Склоняет имена собственные, названия географических объектов, склонение и плюрализация имен собственных и другое.

Projects that are alternatives of or similar to Morphos

udar
UDAR Does Accented Russian: A finite-state morphological analyzer of Russian that handles stressed wordforms.
Stars: ✭ 15 (-97.65%)
Mutual labels:  russian
The Tale
Основной репозиторий проекта: сайт и логика игры
Stars: ✭ 256 (-59.87%)
Mutual labels:  russian
Dynamic Dark Mode
The smart, automatic Dark Mode toggle for macOS Mojave+
Stars: ✭ 397 (-37.77%)
Mutual labels:  russian
laravel-docs-ru
Актуализированная редакция документации Laravel версий 8.x и 9.x на русском языке.
Stars: ✭ 19 (-97.02%)
Mutual labels:  russian
Front-End-Performance-Checklist
🎮 Единственный чек-лист производительности фронтенда, который справляется лучше других
Stars: ✭ 163 (-74.45%)
Mutual labels:  russian
Golang Videos Ru
Собрание видеозаписей докладов про Go | 2016-2018
Stars: ✭ 303 (-52.51%)
Mutual labels:  russian
kiselyov
Геометрия по Киселёву
Stars: ✭ 16 (-97.49%)
Mutual labels:  russian
Python intro
Jupyter notebooks in Russian. Introduction to Python, basic algorithms and data structures
Stars: ✭ 538 (-15.67%)
Mutual labels:  russian
Kinopoisk-Watch
Скрипт, превращающий Kinopoisk.ru в онлайн - кинотеатр! 🎥
Stars: ✭ 85 (-86.68%)
Mutual labels:  russian
Petrovich Ruby
Petrovich, an inflector for Russian anthroponyms.
Stars: ✭ 396 (-37.93%)
Mutual labels:  russian
number-to-words
convert number into words (english, french, italian, roman, spanish, portuguese, belgium, dutch, swedish, polish, russian, iranian, roman, aegean)
Stars: ✭ 53 (-91.69%)
Mutual labels:  russian
elasticsearch-keyboard-layout
Elasticsearch plugin for keyboard layout suggestions
Stars: ✭ 21 (-96.71%)
Mutual labels:  russian
Index
Stars: ✭ 316 (-50.47%)
Mutual labels:  russian
SI
SIGame и продукты, с ней связанные
Stars: ✭ 89 (-86.05%)
Mutual labels:  russian
Javascript Videos Ru 2018
Собрание видеозаписей докладов про JavaScript | 2018
Stars: ✭ 401 (-37.15%)
Mutual labels:  russian
simple-about-rust
Пошаговые уроки по языку программирования Rust для начинающих
Stars: ✭ 25 (-96.08%)
Mutual labels:  russian
Link Grammar
The CMU Link Grammar natural language parser
Stars: ✭ 286 (-55.17%)
Mutual labels:  russian
Open stt
Open STT
Stars: ✭ 584 (-8.46%)
Mutual labels:  russian
Ru.reactjs.org
React documentation website in Russian / Официальная русская версия сайта React
Stars: ✭ 444 (-30.41%)
Mutual labels:  russian
Ruby Style Guide
📘 Russian Version: A community-driven Ruby coding style guide.
Stars: ✭ 358 (-43.89%)
Mutual labels:  russian

Morphos

A morphological solution for Russian and English language written completely in PHP.

Latest Stable Version License Total Downloads Daily Downloads Latest Unstable Version

Tests & Quality: Build Status Scrutinizer Code Quality Code Coverage

Features

  • [✓] Inflection of Personal names (Фамилия, Имя, Отчество) (Russian)
  • [✓] Inflection of Geographical names (Страны/Города) (Russian)
  • [✓] Declension/Pluralization of nouns and adjectives (Russian, English)
  • [✓] Generation numerals of numbers (количественные и порядковые) (Russian, English)
  • [✓] Spelling out amounts of money (Russian)
  • [✓] Spelling out time units and intervals (Russian, English)

Table of contents

  1. Installation
  2. Quick start
  3. Documentation
  4. Contributing

Installation

  • Download library through composer:
composer require wapmorgan/morphos

Adapters

Quick Start

Russian

// Inflect russian names:
morphos\Russian\inflectName('Иванов Петр', 'родительный') => 'Иванова Петра'

// Inflect geographical names:
morphos\Russian\GeographicalNamesInflection::getCase('Москва', 'родительный') => 'Москвы'

// Pluralize russian nouns and adjectives:
morphos\Russian\pluralize(10, 'новый дом') => '10 новых домов'

// Generate russian cardinal numerals:
morphos\Russian\CardinalNumeralGenerator::getCase(567, 'именительный') => 'пятьсот шестьдесят семь'

// Generate russian ordinal numerals:
morphos\Russian\OrdinalNumeralGenerator::getCase(961, 'именительный') => 'девятьсот шестьдесят первый'

// Generate russian time difference
morphos\Russian\TimeSpeller::spellDifference(time() + 3600, morphos\TimeSpeller::DIRECTION) => 'через 1 час'

// other functions described in README-ru.md

English

// Pluralize english nouns:
morphos\English\pluralize(10, 'house') => '10 houses'

// Generate english cardinal numerals:
morphos\English\CardinalNumeralGenerator::generate(567) => 'five hundred sixty-seven'

// Generate english ordinal numerals:
morphos\English\OrdinalNumeralGenerator::generate(961) => 'nine hundred sixty-first'

// Generate english time difference
morphos\English\TimeSpeller::spellDifference(time() + 3600, morphos\TimeSpeller::DIRECTION) => 'in 1 hour'

Documentation

Contributing

See CONTRIBUTING.md for this.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].