PHPackages                             vgip/datanorm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vgip/datanorm

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vgip/datanorm
=============

Data normalization

1.2.1(4y ago)05MITPHPPHP &gt;=5.6.0

Since Jul 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vgip/Datanorm)[ Packagist](https://packagist.org/packages/vgip/datanorm)[ RSS](/packages/vgip-datanorm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (0)

Data normalization
==================

[](#data-normalization)

Data normalization from some open sources

Installation
------------

[](#installation)

### System Requirements

[](#system-requirements)

You need PHP &gt;= 7.4 but the latest stable version of PHP is recommended

### Composer

[](#composer)

```
$ composer require Vgip/Datanorm
```

Functionality list
------------------

[](#functionality-list)

- Transliteration from Ukrainian into English [KMU 2010-01-27 #55](https://www.kmu.gov.ua/npas/243262567)
- Kyiv street getter from [kga.gov.ua](https://kga.gov.ua/ofitsijni-dokumenti/11-ofitsijni-dokumenti/1261-reestr-vulits-mista-kieva)

### Transliteration from Ukrainian into English [KMU 2010-01-27 #55](https://www.kmu.gov.ua/npas/243262567)

[](#transliteration-from-ukrainian-into-english-kmu-2010-01-27-55)

```
use Vgip\Datanorm\Transliteration\UkrEng\Cabmin2010;

$word = 'Єзгїґіпенєп';
$cabmin2010 = new Cabmin2010();
$wordTransliterated = $cabmin2010->transliterate($word);
echo $word.' -> '.$wordTransliterated;
```

### Kyiv street getter from [kga.gov.ua](https://kga.gov.ua/ofitsijni-dokumenti/11-ofitsijni-dokumenti/1261-reestr-vulits-mista-kieva)

[](#kyiv-street-getter-from-kgagovua)

```
Vgip\Datanorm\Parcer\Address\Ukr\Kyiv\StreetNameKga

```

#### Get array with normalized data from CSV file

[](#get-array-with-normalized-data-from-csv-file)

Check and normalized street name data:

- Convert possible apostrophe symbols to one symbol (ʼ - 02BC).
- Check id (forbidden symbols, double). If error see to $this-&gt;warning.
- Check street type by whitelist. New type save to $this-&gt;warning and this-&gt;typeNotFound.
- Check Kyiv district name by whitelist. New Kyiv district name save to $this-&gt;warning and this-&gt;districtNotFound.
- Check the street names and normalized street names . (if data saved to $this-&gt;streetNormalization array)
- Generate $this-&gt;nameDouble array - save 2 or more double street name.
- Generate $this-&gt;nameList - all unique street names.
- Generate $this-&gt;typeCounter - quantity of all street types in Kyiv.

Result array from method getCsvAsArray():

- \['number'\] - (int) serial number from file
- \['id'\] - (int) identifier from file
- \['name\_original'\] - (string) street name from file
- \['name'\] - (string) normalized street name
- \['type\_name'\] - (string) street type name from file
- \['type\_key'\] - (string) street type key
- \['district\_string'\] - (string) street districts from file
- \['district\_list'\] - (array) street districts \['district\_key', 'district\_key', ...\]
- \['document\_name'\] - (string) Document on assigning the name of the object
- \['document\_date'\] - (string) Date of the document on assigning the name of the object
- \['document\_number'\] - (string) Number of the document on assigning the name of the object
- \['document\_title'\] - (string) The title of the document on the naming of the object
- \['place\_description'\] - (string) Location of the object in the city
- \['name\_old'\] - (string) Former name of the object
- \['type\_old'\] - (string)Former category (type) of the object

#### Example

[](#example)

```
use Vgip\Datanorm\Parcer\Address\Ukr\Kyiv\StreetNameKga;
use Vgip\Datanorm\Directory\Address\Country\Ukr\Address AS DirUkrAddress;
use Vgip\Datanorm\Directory\Address\Country\Ukr\City\Kyiv AS DirKyiv;
use Vgip\Datanorm\Directory\Lang\Ukr\Pattern AS PatternUkrAddress;
use Vgip\Datanorm\Directory\Address\Country\Ukr\StreetNormalizedList;
use Vgip\Datanorm\Directory\Address\Country\Ukr\StreetNormalization;

$dirUkrAddress = DirUkrAddress::getInstance();
$dirKyiv = DirKyiv::getInstance();
$patternUkrAddress = PatternUkrAddress::getInstance();
$streetNormalizedListObj = StreetNormalizedList::getInstance();
$streetNormalizedList = $streetNormalizedListObj->getNormalization();

/** Get configuration and whitelist data */
$pathSourceFile = join(DIRECTORY_SEPARATOR, ['file', 'Reestr_vulits_Kyiva_2020_10_25.csv']);
$streetTypeList = $dirUkrAddress->getStreetTypeWhitelist();
$districtWhitelist = $dirKyiv->getDistrictWhitelist();
$patternStreetName = $patternUkrAddress->getStreetName();

/** Object initialization */
$streetNameKga = new StreetNameKga();

/** Set parameter */
$streetNameKga->setTypeWhitelist($streetTypeList);
$streetNameKga->setDistrictWhitelist($districtWhitelist);
$streetNameKga->setStreetNormalization($streetNormalizedList);
$streetNameKga->setPatternStreetName($patternStreetName);

/** Get a result (array) with normalized data */
$data = $streetNameKga->getCsvAsArray($pathSourceFile);

/** Get other data */
$res = [];
$res['type_list'] = $streetNameKga->getTypeList();
$res['type_counter'] = $streetNameKga->getTypeCounter();
$res['name_list'] = $streetNameKga->getNameList();
$res['name_double'] = $streetNameKga->getNameDouble();
$res['district_not_whitelist'] = $streetNameKga->getDistrictNotFound();

/** Get warnings if present */
$warning = $streetNameKga->getWarning();
$warningValue = $streetNameKga->getWarningValue();
if (null !== $warning AND count($warning) > 0) {
    print_r($warning);
}
print_r($data);
print_r($res);
```

Ukrainian language
------------------

[](#ukrainian-language)

### Apostrophe

[](#apostrophe)

The resulting data will contain as ukrainian apostrophe symbol "ʼ" unicode symbol U+02BC. All other similar characters in source data (' - U+0027, ’ - U+2019, etc) will be replaced to ʼ (U+02BC). U+02BC - this symbol is used in the ukrainian domain name (ICANN).

- [ukrainian.stackexchange.com](https://ukrainian.stackexchange.com/questions/40/%D0%AF%D0%BA%D0%B8%D0%B9-%D1%81%D0%B8%D0%BC%D0%B2%D0%BE%D0%BB-%D0%B2%D0%B8%D0%BA%D0%BE%D1%80%D0%B8%D1%81%D1%82%D0%BE%D0%B2%D1%83%D0%B2%D0%B0%D1%82%D0%B8-%D0%B4%D0%BB%D1%8F-%D0%BF%D0%BE%D0%B7%D0%BD%D0%B0%D1%87%D0%B5%D0%BD%D0%BD%D1%8F-%D0%B0%D0%BF%D0%BE%D1%81%D1%82%D1%80%D0%BE%D1%84%D0%B0-%D0%B2-%D0%B5%D0%BB%D0%B5%D0%BA%D1%82%D1%80%D0%BE%D0%BD%D0%BD%D0%B8%D1%85-%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%B0%D1%85-%D1%83%D0%BA%D1%80%D0%B0%D1%97)
- [linux.org.ua](https://linux.org.ua/index.php?PHPSESSID=5d41ee8e3412408b00269ca80d9f9c5b&topic=1223.300)

### Street name normalization

[](#street-name-normalization)

- Position and surname - Академіка Єфремова, Генерала Авдєєнка, Маршала Бірюзова
- Name and surname - Леоніда Бикова
- Family relationships and surname - Братів Зерових, Родини Рудинських

Versioning
----------

[](#versioning)

Data normalization follows [Semantic Versioning](https://semver.org/).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

7

Last Release

1742d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cf451e6d8d477fc8f69325296d106e236dcf79b3d1be17d4483b81d8db5027f?d=identicon)[vgip](/maintainers/vgip)

---

Top Contributors

[![vgip](https://avatars.githubusercontent.com/u/22733931?v=4)](https://github.com/vgip "vgip (12 commits)")

### Embed Badge

![Health badge](/badges/vgip-datanorm/health.svg)

```
[![Health](https://phpackages.com/badges/vgip-datanorm/health.svg)](https://phpackages.com/packages/vgip-datanorm)
```

###  Alternatives

[zhelyabuzhsky/yii2-sitemap

A Yii2 tool to generate sitemap.xml.

3439.7k](/packages/zhelyabuzhsky-yii2-sitemap)[amplifier/yii-amqp

AMQP adapter for Yii

2237.0k](/packages/amplifier-yii-amqp)[bigfork/htmleditorsrcset

Simple srcset integration with SilverStripe’s HTMLEditorField

1025.4k4](/packages/bigfork-htmleditorsrcset)[anasstouaticoder/magento2-module-instantconfigurationcopy

The InstantConfigurationCopy module provides easy way to copy configuration field information for admin in back office Magento 2.

163.8k](/packages/anasstouaticoder-magento2-module-instantconfigurationcopy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
