Interface IHyphenator
- All Superinterfaces:
AutoCloseable,com.github.szgabsz91.morpher.core.io.IConvertable<HyphenatorMessage>
- All Known Implementing Classes:
CachingHyphenator,PyphenHyphenator
public interface IHyphenator
extends AutoCloseable, com.github.szgabsz91.morpher.core.io.IConvertable<HyphenatorMessage>
Service interface that can hyphenate words.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deletes the temporary Python file.getLastSyllable(com.github.szgabsz91.morpher.core.model.Word input) Returns the last syllable of the input word if it can be hyphenated, or an empty optional otherwise.String[]hyphenate(com.github.szgabsz91.morpher.core.model.Word input) Returns a String array that contains each syllable of the input word.Methods inherited from interface com.github.szgabsz91.morpher.core.io.IConvertable
fromMessage, fromMessage, toMessage
-
Method Details
-
close
void close()Deletes the temporary Python file.- Specified by:
closein interfaceAutoCloseable
-
hyphenate
Returns a String array that contains each syllable of the input word.- Parameters:
input- the input word- Returns:
- the String array containing the syllables
-
getLastSyllable
Returns the last syllable of the input word if it can be hyphenated, or an empty optional otherwise.- Parameters:
input- the input word- Returns:
- the last syllable or an empty optional
-