2017 © Pedro PelĂĄez
 

library cleaner

Cleaning tools for company names, domains, etc.

image

const-g/cleaner

Cleaning tools for company names, domains, etc.

  • Friday, September 1, 2017
  • by constg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Cleaner

Build Status, (*1)

A lib to clean domains and company names. It also can extract the acronym of the company (or try to), (*2)

Install

composer require const-g/cleaner

Usage:

It removes common 'company' terms in different languages (not all yet), (*3)

<?php
$company_name = \Constg\Cleaner\Clean::company_names('Google inc.');
// array(
//     'original_name' => $company_name,
//     'split' => array('google'),
//     'clean_name' => 'google',
//     'clean_name_no_space' => 'google',
// );

It also removes country name, (*4)

<?php
$company_name = \Constg\Cleaner\Clean::company_names('Google France');
// array(
//     'original_name' => $company_name,
//     'split' => array('google'),
//     'clean_name' => 'google',
//     'clean_name_no_space' => 'google',
// );
Known bug: does not cover company name like "Electricité de France" as 
it will be converted to "electricite" only.

Can recompose spaced acronym, (*5)

<?php
$company_name = \Constg\Cleaner\Clean::company_names('B.M.W Group');
// array(
//     'original_name' => 'B.M.W Group',
//     'split' => array('bmw'),
//     'clean_name' => 'bmw',
//     'clean_name_no_space' => 'bmw',
// );

If the acronym is present, then it extract it from the name, if it matches the rest of the name, (*6)

<?php
$company_name = \Constg\Cleaner\Clean::company_names('COMPAGNIE GENERALE DES ETABLISSEMENTS MICHELIN (C G E M)');
// array(
//     'original_name' => 'COMPAGNIE GENERALE DES ETABLISSEMENTS MICHELIN (C G E M)',
//     'split' => array('compagnie', 'etablissements', 'generale', 'michelin'),
//     'clean_name' => 'compagnie etablissements generale michelin',
//     'clean_name_no_space' => 'compagnieetablissementsgeneralemichelin',
//     'acronym' => 'cgem',
// );

The Versions

01/09 2017

dev-master

9999999-dev https://github.com/const-g/cleaner

Cleaning tools for company names, domains, etc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Constantin Guay

domain company abm account-base-marketing acronym

01/09 2017

1.0.1

1.0.1.0 https://github.com/const-g/cleaner

Cleaning tools for company names, domains, etc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Constantin Guay

domain company abm account-base-marketing acronym

25/08 2017

1.0.0

1.0.0.0 https://github.com/const-g/cleaner

Cleaning tools for company names, domains, etc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Constantin Guay

domain company abm account-base-marketing acronym