ReadableTTMServer Interface Reference
[The Translate extension translation memory interface]

Interface for TTMServer that can be queried (=all of them). More...

Inheritance diagram for ReadableTTMServer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 query ($sourceLanguage, $targetLanguage, $text)
 Fetches all relevant suggestions for given text.
 isLocalSuggestion (array $suggestion)
 Determines if the suggestion returned by this TTMServer comes from this wiki or any other wiki.
 expandLocation (array $suggestion)
 Given suggestion returned by this TTMServer, constructs fully qualified URL to the location of the translation.

Detailed Description

Interface for TTMServer that can be queried (=all of them).

Since:
2012-06-27

Definition at line 17 of file Interfaces.php.


Member Function Documentation

ReadableTTMServer::expandLocation ( array $  suggestion  ) 

Given suggestion returned by this TTMServer, constructs fully qualified URL to the location of the translation.

Parameters:
array $suggestion
Returns:
String URL

Implemented in DatabaseTTMServer, FakeTTMServer, RemoteTTMServer, and SolrTTMServer.

ReadableTTMServer::isLocalSuggestion ( array $  suggestion  ) 

Determines if the suggestion returned by this TTMServer comes from this wiki or any other wiki.

Parameters:
array $suggestion
Returns:
Bool

Implemented in DatabaseTTMServer, FakeTTMServer, RemoteTTMServer, and SolrTTMServer.

ReadableTTMServer::query ( sourceLanguage,
targetLanguage,
text 
)

Fetches all relevant suggestions for given text.

Parameters:
$sourceLanguage String: language code for the provide text
$targetLanguage String: language code for the suggestions
$text String: the text for which to search suggestions
Returns:
array List: unordered suggestions, which each has fields:
  • source: String: the original text of the suggestion
  • target: String: the suggestion
  • context: String: title of the page where the suggestion comes from
  • quality: Float: the quality of suggestion, 1 is perfect match

Implemented in DatabaseTTMServer, FakeTTMServer, RemoteTTMServer, and SolrTTMServer.


The documentation for this interface was generated from the following file:
Generated on Tue Oct 29 00:00:51 2013 for MediaWiki Translate Extension by  doxygen 1.6.3