Back to project page sdk-syllabifier.
The source code is released under:
GNU Lesser General Public License
If you think the Android project sdk-syllabifier listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.silpa.syllabifier; //w w w . j a v a 2 s. c om import android.content.Context; import android.util.AttributeSet; import org.silpa.render.IndicTextView; import java.util.List; /** * Created by sujith on 15/6/14. */ public class SyllabifierTextView extends IndicTextView implements SyllabifierInterface { /** * Syllabifier object */ private Syllabifier syllabifier; /** * For Syllabified Text */ private String mSyllabifiedText; /** * Constructor * * @param context context of application */ public SyllabifierTextView(Context context) { super(context); init(); } /** * Constructor * * @param context context of application * @param attrs attribute set */ public SyllabifierTextView(Context context, AttributeSet attrs) { super(context, attrs); init(); } /** * Constructor * * @param context context of application * @param attrs attribute set * @param defStyle default style */ public SyllabifierTextView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } private void init() { this.syllabifier = new Syllabifier(); } /** * This function returns syllabified text from given view * * @return syllabified text */ @Override public String getSyllabifiedText() { return this.syllabifier.syllabify(getText().toString()); } /** * This function returns list of syllables of text from given view * * @return list of syllables */ @Override public List<String> getSyllables() { return this.syllabifier.getSyllables(getText().toString()); } /** * This function returns module name * * @return module name */ @Override public String getModuleName() { return this.syllabifier.getModuleName(); } /** * This function returns module information * * @return module information */ @Override public String getModuleInformation() { return this.syllabifier.getModuleInformation(); } }