Class TranslatorSplitter
java.lang.Object
com.norconex.importer.handler.splitter.AbstractDocumentSplitter<TranslatorSplitterConfig>
com.norconex.importer.handler.splitter.impl.TranslatorSplitter
- All Implemented Interfaces:
Configurable<TranslatorSplitterConfig>,ConfigurableDocHandler<TranslatorSplitterConfig>,DocHandler
Translate documents using one of the supported translation API. The following lists the supported APIs, along with the required authentication properties or settings for each:
- microsoft
- clientId
- clientSecret
- google
- apiKey
- lingo24
- userKey
- moses
- smtPath
- scriptPath
- yandex
- apiKey
For example, the Microsoft Translation API requires a client ID and a client secret, both obtained on Microsoft Azure Marketplace with your Microsoft account.
Translated documents will have the original document language stored in a field "document.translatedFrom".
This class is not a document "splitter" per se, but like regular splitters, the translation will create children documents for each translation performed. The parent document will always remain the original document, while the children will always be the translations.
- See Also:
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTYFields inherited from interface com.norconex.importer.handler.DocHandler
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleaninthashCode()voidsplit(DocHandlerContext docCtx) toString()Methods inherited from class com.norconex.importer.handler.splitter.AbstractDocumentSplitter
handleMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.norconex.importer.handler.DocHandler
close, init
-
Constructor Details
-
TranslatorSplitter
public TranslatorSplitter()Constructor.
-
-
Method Details
-
split
- Specified by:
splitin classAbstractDocumentSplitter<TranslatorSplitterConfig>- Throws:
DocHandlerException
-
getConfiguration
-
equals
- Overrides:
equalsin classAbstractDocumentSplitter<TranslatorSplitterConfig>
-
canEqual
- Overrides:
canEqualin classAbstractDocumentSplitter<TranslatorSplitterConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractDocumentSplitter<TranslatorSplitterConfig>
-
toString
- Overrides:
toStringin classAbstractDocumentSplitter<TranslatorSplitterConfig>
-