Working with different languages
Perform OCR Operation without specifying language
Aspose.OCR for Java can recognize characters other than Latin. For the complete list of characters, please visit the following page.
There is no difference in performing OCR operation on images containing text in languages other than English. The following code snippet demonstrates performing OCR operation on an image containing Spanish text.
Select Language for OCR Operation
Aspose.OCR for Java provides the option to specify the language to increase the efficiency of the OCR operation. For this, the API provides the RecognitionSettings.setLanguage method. The RecognitionSettings.setLanguage method accepts the RecognitionSettings.Language enum as value. You can pass the instance of the RecognitionSettings class to the RecognizePage method of the AsposeOCR class. The RecognitionSettings.Language enum has the following members.
Member | Language |
---|---|
None | Multi-language support |
Eng | English |
Deu | German |
Por | Portuguese |
Spa | Spanish |
Fra | French |
Ita | Italian |
Cze | Czech |
Dan | Danish |
Dum | Dutch |
Est | Estonian |
Fin | Finnish |
Lav | Latvian |
Lit | Lithuanian |
Nor | Norwegian |
Pol | Polish |
Rum | Romanian |
Srp_hrv | Serbo-Croatian |
Slk | Slovak |
Slv | Slovene |
Swe | Swedish |
Chi | Chinese |
The following code snippet demonstrates selecting language for OCR operation.