Example usage for org.apache.commons.codec.language DaitchMokotoffSoundex encode

List of usage examples for org.apache.commons.codec.language DaitchMokotoffSoundex encode

Introduction

In this page you can find the example usage for org.apache.commons.codec.language DaitchMokotoffSoundex encode.

Prototype

@Override
public String encode(final String source) 

Source Link

Document

Encodes a String using the Daitch-Mokotoff soundex algorithm without branching.

Usage

From source file:com.github.stagirs.lingvo.morph.MorphPredictor.java

private static byte[] getBytes(DaitchMokotoffSoundex soundex, String translitWord) {
    String[] parts = soundex.encode(translitWord).split("");
    byte[] bytes = new byte[parts.length];
    for (int i = 0; i < parts.length; i++) {
        bytes[i] = parseByte(parts[i]);//  w w w  .j  a  v a2 s  .  c om
    }
    return bytes;
}