Class AbstractMachineTranslationProvider
Implements an abstract base class for machine translation providers, and provides overridable default implementations for the most common properties and methods of ITranslationProvider.
Implements
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public abstract class AbstractMachineTranslationProvider : ITranslationProvider
Constructors
AbstractMachineTranslationProvider()
Declaration
protected AbstractMachineTranslationProvider()
Properties
IsReadOnly
See IsReadOnly. The default implementation returns true
.
Declaration
public virtual bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
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 StatusInfo. The default implementation
only refreshes the status information if it is null
, and returns the
cached value.
Declaration
public virtual ProviderStatusInfo StatusInfo { get; set; }
Property Value
Type | Description |
---|---|
ProviderStatusInfo |
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 |
---|---|
IListLanguagePair |
SupportsConcordanceSearch
See SupportsConcordanceSearch. The default implementation returns false
.
Declaration
public virtual bool SupportsConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsDocumentSearches
See SupportsDocumentSearches. The default implementation returns false
.
Declaration
public virtual bool SupportsDocumentSearches { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsFilters
See SupportsFilters. The default implementation returns false
.
Declaration
public virtual bool SupportsFilters { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsFuzzySearch
See SupportsFuzzySearch. The default implementation returns false
.
Declaration
public virtual bool SupportsFuzzySearch { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsMultipleResults
See SupportsMultipleResults. The default implementation returns false
.
Declaration
public virtual bool SupportsMultipleResults { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsPenalties
See SupportsPenalties. The default implementation returns false
.
Declaration
public virtual bool SupportsPenalties { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsPlaceables
See SupportsPlaceables. The default implementation returns false
.
Declaration
public virtual bool SupportsPlaceables { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsScoring
See SupportsScoring. The default implementation returns false
.
Declaration
public virtual bool SupportsScoring { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsSearchForTranslationUnits
See SupportsSearchForTranslationUnits. The default implementation returns false
.
Declaration
public virtual bool SupportsSearchForTranslationUnits { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsSourceConcordanceSearch
See SupportsSourceConcordanceSearch. The default implementation returns false
.
Declaration
public virtual bool SupportsSourceConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsStructureContext
See SupportsStructureContext. The default implementation returns false
.
Declaration
public virtual bool SupportsStructureContext { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsTaggedInput
See SupportsTaggedInput. The default implementation returns false
.
Declaration
public virtual bool SupportsTaggedInput { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsTargetConcordanceSearch
See SupportsTargetConcordanceSearch. The default implementation returns false
.
Declaration
public virtual bool SupportsTargetConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsTranslation
See SupportsTranslation. The default implementation returns true
.
Declaration
public virtual bool SupportsTranslation { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsUpdate
See SupportsUpdate. The default implementation returns false
.
Declaration
public virtual bool SupportsUpdate { get; }
Property Value
Type | Description |
---|---|
bool |
SupportsWordCounts
See SupportsWordCounts. The default implementation returns false
.
Declaration
public virtual bool SupportsWordCounts { get; }
Property Value
Type | Description |
---|---|
bool |
TranslationMethod
See TranslationMethod. The default implementation returns MachineTranslation.
Declaration
public virtual TranslationMethod TranslationMethod { get; }
Property Value
Type | Description |
---|---|
TranslationMethod |
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 |
---|---|---|
LanguagePair | languageDirection | The language direction |
Returns
Type | Description |
---|---|
ITranslationProviderLanguageDirection | 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 |
---|---|
ProviderStatusInfo | Status information. |
Remarks
This method is called by RefreshStatusInfo().
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 SerializeState(). |
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 RefreshStatusInfo(). This method is abstract and must be implemented by derived classes.
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 LoadState(string) method to restore the state after creating a new translation provider. |
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 |
---|---|---|
LanguagePair | languageDirection | The language direction |
Returns
Type | Description |
---|---|
bool | True if the specified language direction is supported, and false otherwise. |