com.aspose.ocr

Class LanguageFactory



  • public class LanguageFactory
    extends Object

    A factory for creating objects of type ILanguage. It has static methods for creating languages.


     
     ILanguage english = LanguageFactory.load("engresources.zip");
     

    • Method Detail

      • load

        public static ILanguage load(InputStream stream)

        Creates instance of ILanguage from a stream. This will raise an exception if files for that language are not correct.

        Parameters:
        stream - Input stream with language resources
        Returns:
        The instance of ILanguage.
        Throws:
        IllegalArgumentException - Thrown when language is not supported.
      • load

        public static ILanguage load(String path)

        Creates instance of ILanguage using specified resources file. This will raise an exception if files for that language are not correct.

        Parameters:
        path - Path to resources file
        Returns:
        The instance of ILanguage.