Class CompoundDictionary

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

public class CompoundDictionary extends Object implements IPADictionarySPI, NameInfo, LanguageInfo, PrefixSearch
Perform lookups on multiple dictionaries at once.
  • Constructor Details

    • CompoundDictionary

      public CompoundDictionary(IPADictionary[] dicts)
  • Method Details

    • 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
    • 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
    • keysWithPrefix

      public String[] keysWithPrefix(String prefix)
      Description copied from interface: PrefixSearch
      Search for all instances of the given prefix in orthographic keys.
      Specified by:
      keysWithPrefix in interface PrefixSearch
      Returns:
      a list of orthographic keys which have the specified prefix
    • install

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