Class AbstractMachineTranslationProvider
Implements an abstract base class for machine translation providers, and provides
overridable default implementations for the most common properties and methods
of ITranslation
Inheritance
Implements
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public abstract class AbstractMachineTranslationProvider : ITranslationProvider
Constructors
AbstractMachineTranslationProvider()
Implements an abstract base class for machine translation providers, and provides
overridable default implementations for the most common properties and methods
of ITranslation
Declaration
protected AbstractMachineTranslationProvider()
Properties
IsReadOnly
See Istrue
.
Declaration
public virtual bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
Name
See Name. This method is abstract and must be implemented by derived classes.
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
String |
StatusInfo
See Statusnull
, and returns the
cached value.
Declaration
public virtual ProviderStatusInfo StatusInfo { get; set; }
Property Value
Type | Description |
---|---|
Provider |
SupportedLanguageDirections
Gets the list of language directions which are supported by this machine translation engine. Note that the list may include region-neutral cultures.
Declaration
public abstract IList<LanguagePair> SupportedLanguageDirections { get; }
Property Value
Type | Description |
---|---|
IList<Language |
SupportsConcordanceSearch
See Supportsfalse
.
Declaration
public virtual bool SupportsConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsDocumentSearches
See Supportsfalse
.
Declaration
public virtual bool SupportsDocumentSearches { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsFilters
See Supportsfalse
.
Declaration
public virtual bool SupportsFilters { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsFuzzySearch
See Supportsfalse
.
Declaration
public virtual bool SupportsFuzzySearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsMultipleResults
See Supportsfalse
.
Declaration
public virtual bool SupportsMultipleResults { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsPenalties
See Supportsfalse
.
Declaration
public virtual bool SupportsPenalties { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsPlaceables
See Supportsfalse
.
Declaration
public virtual bool SupportsPlaceables { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsScoring
See Supportsfalse
.
Declaration
public virtual bool SupportsScoring { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsSearchForTranslationUnits
See Supportsfalse
.
Declaration
public virtual bool SupportsSearchForTranslationUnits { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsSourceConcordanceSearch
See Supportsfalse
.
Declaration
public virtual bool SupportsSourceConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsStructureContext
See Supportsfalse
.
Declaration
public virtual bool SupportsStructureContext { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsTaggedInput
See Supportsfalse
.
Declaration
public virtual bool SupportsTaggedInput { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsTargetConcordanceSearch
See Supportsfalse
.
Declaration
public virtual bool SupportsTargetConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsTranslation
See Supportstrue
.
Declaration
public virtual bool SupportsTranslation { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsUpdate
See Supportsfalse
.
Declaration
public virtual bool SupportsUpdate { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsWordCounts
See Supportsfalse
.
Declaration
public virtual bool SupportsWordCounts { get; }
Property Value
Type | Description |
---|---|
Boolean |
TranslationMethod
See Translation
Declaration
public virtual TranslationMethod TranslationMethod { get; }
Property Value
Type | Description |
---|---|
Translation |
Uri
See Uri. This method is abstract and must be implemented by derived classes.
Declaration
public abstract Uri Uri { get; }
Property Value
Type | Description |
---|---|
Uri |
Methods
GetLanguageDirection(LanguagePair)
Obtains a translation provider for the specified language direction.
Declaration
public abstract ITranslationProviderLanguageDirection GetLanguageDirection(LanguagePair languageDirection)
Parameters
Type | Name | Description |
---|---|---|
Language |
languageDirection | The language direction |
Returns
Type | Description |
---|---|
ITranslation |
A translation provider language direction which matches the provided language direction. |
GetStatusInfo()
Gets up-to-date status info for this translation provider.
Declaration
protected abstract ProviderStatusInfo GetStatusInfo()
Returns
Type | Description |
---|---|
Provider |
Status information. |
Remarks
This method is called by Refresh
LoadState(String)
Loads previously serialized state information into this translation provider instance.
Declaration
public virtual void LoadState(string translationProviderState)
Parameters
Type | Name | Description |
---|---|---|
String | translationProviderState | A string representing the state of translation provider that was previously saved
using Serialize |
Remarks
The format of this string can be decided upon by the translation provider implementation.
The default implementation does not load any state.
RefreshStatusInfo()
See Refresh
Declaration
public void RefreshStatusInfo()
SerializeState()
Serializes any meaningful state information for this translation provider that can be stored in projects and sent around the supply chain.
Declaration
public virtual string SerializeState()
Returns
Type | Description |
---|---|
String | A string representing the state of this translation provider that can later be passed into
the Load |
Remarks
The format of this string can be decided upon by the translation provider implementation.
The default implementation just returns null
.
SupportsLanguageDirection(LanguagePair)
Checks whether this machine translation provider supports the specified language direction.
Declaration
public abstract bool SupportsLanguageDirection(LanguagePair languageDirection)
Parameters
Type | Name | Description |
---|---|---|
Language |
languageDirection | The language direction |
Returns
Type | Description |
---|---|
Boolean | True if the specified language direction is supported, and false otherwise. |