Download the PHP package hollodotme/cologne-phonetic without Composer

On this page you can find all versions of the php package hollodotme/cologne-phonetic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cologne-phonetic

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License

ColognePhonetic

A PHP OOP implementation of the "Kölner Phonetik Index".

This is an adaption of Andy Theiler's precedural implementation with some fixes and unit tests.

Requirements

Installation

Basic usage

Output:

string(3) "072"

Algorithm

The "Kölner Phonetik" transliterates every character of a word to a numeric code between "0" und "8", considering at most one adjacent character as context. Some rules apply especially to the beginning of a word (initial sound). This way similar phonems get mapped to the same numeric code. For example the caracters "W" and "V" are both transliterated to "3". The phonetic code of "Wikipedia" is "3412". In contrast to the "Soundex-Code" the length of the "Kölner Phonetik Index" is not restricted.

Character Context Code
A, E, I, J, O, U, Y 0
H -
B 1
P not before H 1
D, T not before C, S, Z 2
F, V, W 3
P before H 3
G, K, Q 4
C initial sound before A, H, K, L, O, Q, R, U, X 4
C before A, H, K, O, Q, U, X but not after S, Z 4
X not after C, K, Q 48
L 5
M, N 6
R 7
S, Z 8
C after S, Z 8
C initial sound but not before A, H, K, L, O, Q, R, U, X 8
C not before A, H, K, O, Q, U, X 8
D, T before C, S, Z 8
X after C, K, Q 8

The fact that "SC" has priority before "CH" is explained in the addition "but not after" on line 10 in the table above. This rule was not explicitly part of the official publication, but can be deduced implicitly from the published examples.

The transliteration happens in 3 steps:

  1. Transliteration of characters from left to right like described in the table above.
  2. Removing all duplicate codes.
  3. Removing of all "0" codes except at the beginning.

All versions of cologne-phonetic with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-iconv Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hollodotme/cologne-phonetic contains the following files

Loading the files please wait ....