Class TransliterationDictionary

java.lang.Object
ca.phon.ipadictionary.impl.TransliterationDictionary
All Implemented Interfaces:
IPADictionarySPI, LanguageInfo, Metadata, NameInfo

public class TransliterationDictionary extends Object implements IPADictionarySPI, LanguageInfo, NameInfo, Metadata
An IPADictionary implementation that uses a tokenizer and lookup table for generating ipa transcriptions.
  • Constructor Details

    • TransliterationDictionary

      public TransliterationDictionary(URL mapFile)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: NameInfo
      Returns a string identifier for this dictionary. While not required, the name should be unique to help users identify dictionaries which handle the same language.
      Specified by:
      getName in interface NameInfo
      Returns:
      the dictionary name
    • getLanguage

      public Language getLanguage()
      Description copied from interface: LanguageInfo
      Returns the language handled by this dictionary.
      Specified by:
      getLanguage in interface LanguageInfo
      Returns:
      the Language for this dictionary
    • lookup

      public String[] lookup(String orthography) throws IPADictionaryExecption
      Description copied from interface: IPADictionarySPI
      Lookup IPA transcriptions for a given orthographic string.
      Specified by:
      lookup in interface IPADictionarySPI
      Returns:
      a list of IPA transcriptions associated with the given orthography
      Throws:
      IPADictionaryExecption
    • getMetadataValue

      public String getMetadataValue(String key)
      Description copied from interface: Metadata
      Get value for a given metadata key.
      Specified by:
      getMetadataValue in interface Metadata
      Parameters:
      key - the metadata key. Common keys are 'provider' and 'website'
      Returns:
      the value for the specified key or null if no data is available. See Metadata.metadataKeyIterator()
    • metadataKeyIterator

      public Iterator<String> metadataKeyIterator()
      Description copied from interface: Metadata
      Get the iteator for metadata keys.
      Specified by:
      metadataKeyIterator in interface Metadata
      Returns:
      an iterator for the metadata keys available
    • install

      public void install(IPADictionary dict)
      Description copied from interface: IPADictionarySPI
      Install this SPI into the given IPADictionary
      Specified by:
      install in interface IPADictionarySPI