Giter Club home page Giter Club logo

morphy's Introduction

MORPHY

Simple wrapper around PHPMorphy

http://phpmorphy.sourceforge.net/dokuwiki/

Installation

Add to your composer.json:

{
	"repositories": [
		{
			"type": "package",
			"package": {
				"name": "phpmorphy/ru",
				"version": "0.3.7",
				"type": "zend-extra",
				"dist": {
					"url": "http://sourceforge.net/projects/phpmorphy/files/phpmorphy-dictionaries/0.3.x/ru_RU/morphy-0.3.x-ru_RU-withjo-utf-8.zip/download",
					"type": "zip"
				}
			}
		},
		{
			"type": "package",
			"package": {
				"name": "phpmorphy/en",
				"version": "0.3.7",
				"type": "zend-extra",
				"dist": {
					"url": "http://sourceforge.net/projects/phpmorphy/files/phpmorphy-dictionaries/0.3.x/en_EN/morphy-0.3.x-en_EN-windows-1250.zip/download",
					"type": "zip"
				}
			}
		},
		{
			"type": "package",
			"package": {
				"name": "phpmorphy/phpmorphy",
				"version": "0.3.7",
				"type": "zend-extra",
				"dist": {
					"url": "http://sourceforge.net/projects/phpmorphy/files/phpmorphy/0.3.7/phpmorphy-0.3.7.zip/download",
					"type": "zip"
				},
				"require": {
					"phpmorphy/ru": "x",
					"phpmorphy/en": "x"
				},
				"autoload": {
					"files": ["src/common.php"]
				}
			}
		},
		{
			"type": "vcs",
			"url": "https://github.com/mac2000/morphy",
			"require": {
				"phpmorphy/phpmorphy": "x"
			}
		}
	],
	"require": {
		"mac/morphy": "x"
	}
}

Usage example

Here is few examples of library usage (in russian):

<?php
use Mac\Morphy\Morphy;

require_once 'vendor/autoload.php';

$morphy = new Morphy();

print_r($morphy->base('Киеве'));
print_r($morphy->all('Киев'));
print_r($morphy->where('Киев'));

And its output:

Киев

Array
(
    [0] => Киев
    [1] => Киева
    [2] => Киеву
    [3] => Киевом
    [4] => Киеве
    [5] => Киевы
    [6] => Киевов
    [7] => Киевам
    [8] => Киевами
    [9] => Киевах
)

Array
(
    [0] => Киеве
)

morphy's People

Contributors

mac2000 avatar

Stargazers

Ellen Gould White Library avatar Alexey Ch avatar

Watchers

 avatar James Cloos avatar Andrey Dyugaev avatar Ellen Gould White Library avatar  avatar

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.