Implementation of various phonetic algorithms in Java.
| .github | Coverage badge ( #2 ) | |
| .mvn/wrapper | add Maven wrapper | |
| src | updated versions including JUnit 5 and Java 7 | |
| .gitignore | code cleanup | |
| .travis.yml | fix gpg error with Travis | |
| LICENSE | Initial commit | |
| mvnw | add Maven wrapper | |
| mvnw.cmd | add Maven wrapper | |
| pom.xml | [maven-release-plugin] prepare for next development iteration | |
| README.md | Update README.md | |
| rules.xml | update library and exclude beta- and RC-versions | |
phonet4java
Maven Central version Coverage
The project provides Java implementations for several phonetic algorithms like:
- Soundex
- refined Soundex
- Kölner Phonetik
- Daitch-Mokotoff
- Phonet
Usage
The usage is very simple. Just create an instance of the required encoder and invoke the code method. Here is a simple example.
Coder c = new Phonet2();
c.code("Kiel");
Maven
To use the library you can simply add a dependency to phonet4java like this:
<dependency>
<groupId>de.zedlitz</groupId>
<artifactId>phonet4java</artifactId>
<version>1.2.0</version>
</dependency>
Example
Here are some example to get an impression how the different algorithms work:
| input | Soundex | ref. Soundex | Daitch-Mokotoff | Kölner Phonetik | Phonet | Phonet (var. 2) |
|---|---|---|---|---|---|---|
| Zedlitz | Z343 | Z6765 | 438400 | 8258 | ZETLIZ | ZETLIZ |
| Zetlitz | Z343 | Z6765 | 438400 | 8258 | ZETLIZ | ZETLIZ |
| Zedtlitz | Z343 | Z6765 | 438400 | 8258 | ZETLIZ | ZETLIZ |
| Meyer | M600 | M9000 | 619000 | 67 | MEIA | NEIA |
| Meier | M600 | M9000 | 619000 | 67 | MEIA | NEIA |
| Mayr | M600 | M9000 | 690000 | 67 | MEIA | NEIA |
| Mayer | M600 | M9000 | 619000 | 67 | MEIA | NEIA |
| Kiew | K000 | K0000 | 570000 | 43 | KIF | KIF |
| Kyjiw | K200 | K4000 | 517000 | 43 | KÜIF | KIF |
| Kyiv | K100 | K2000 | 570000 | 43 | KÜIF | KIF |
| Kyiv | K100 | K2000 | 570000 | 43 | KÜIF | KIF |
| Kiev | K100 | K2000 | 570000 | 43 | KIW | KIF |
| Szczypiorskowski | S162 | S5351 | 279457 | 81784384 | SHÜPIORSKOFSKI | ZIPIURZKUFZKI |