Class AutoTranscriber

java.lang.Object
ca.phon.autotranscribe.AutoTranscriber

public class AutoTranscriber extends Object
Create automatic IPA transcriptions for a given orthography
  • Constructor Details

    • AutoTranscriber

      public AutoTranscriber()
    • AutoTranscriber

      public AutoTranscriber(List<AutoTranscribeSource> sources)
      Create a new auto transcriber for the given orthography and sources
      Parameters:
      sources -
  • Method Details

    • getSources

      public List<AutoTranscribeSource> getSources()
    • setIpaComparator

      public void setIpaComparator(Comparator<IPATranscript> comparator)
    • getIpaComparator

      public Comparator<IPATranscript> getIpaComparator()
    • addSource

      public void addSource(AutoTranscribeSource source)
      Add a new source for transcriptions
      Parameters:
      source -
    • removeSource

      public void removeSource(AutoTranscribeSource source)
      Remove a source for transcriptions
      Parameters:
      source -
    • clearSources

      public void clearSources()
    • setSources

      public void setSources(List<AutoTranscribeSource> sources)
    • transcribe

      public AutomaticTranscription transcribe(String text) throws ParseException
      Transcribe the given orthography
      Parameters:
      text -
      Returns:
      automatic transcription
      Throws:
      ParseException
    • transcribe

      public AutomaticTranscription transcribe(Orthography orthography)
      Transcribe the given orthography
      Parameters:
      orthography -
      Returns:
      automatic transcription
    • transcribe

      public AutomaticTranscription transcribe(String text, int fromWord) throws ParseException
      Throws:
      ParseException
    • transcribe

      public AutomaticTranscription transcribe(Orthography orthography, int fromWord)
      Transcribe the given orthography starting at the given word
      Parameters:
      orthography -
      fromWord -
      Returns:
    • transcribe

      public AutomaticTranscription transcribe(Orthography orthography, int fromWord, int toWord)
      Transcribe the given orthography
      Parameters:
      orthography - orthography
      fromWord - start word
      toWord - end word, -1 to transcribe to end
      Returns:
      automatic transcription
    • lookup

      public List<IPATranscript> lookup(Word word)
      Lookup a single word
      Parameters:
      word -
      Returns:
      list of transcriptions Word word) { final List retVfrom all sources ordered by the IPA comparator. If no transcriptions are available, a list with a single '*' is returned.