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 Type
    Method
    Description
    void
    Deletes the temporary Python file.
    default Optional<String>
    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.
    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:
      close in interface AutoCloseable
    • hyphenate

      String[] hyphenate(com.github.szgabsz91.morpher.core.model.Word input)
      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

      default Optional<String> 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.
      Parameters:
      input - the input word
      Returns:
      the last syllable or an empty optional