Package app :: Package autoranking :: Module application :: Class Autoranking
[hide private]
[frames] | no frames]

Class Autoranking

source code

A class that demonstrates the use of simple ranking pipeline. It provides the function 'parse' that receives source and translation strings and returns a ranked list

Instance Methods [hide private]
 
__init__(self, configfilenames, classifiername)
Initialize the class.
source code
 
rank(self, source, translations)
Rank translations according to estimated quality
source code
 
_annotate(self, parallelsentence) source code
 
_get_parser(self, cfg, language) source code
 
_get_java_gateway(self, cfg) source code
 
initialize_featuregenerators(self, cfg)
Initialize the featuregenerators that handle superficial analysis of given translations
source code
Instance Variables [hide private]
[featuregenerator.featuregenerator.FeatureGenerator, ...] featuregenerators
List of initialized feature generator objects in the order that will be used
ml.lib.orange ranker
Machine Learning class that handles ranking of items
str source_language
Language code for source language
str target_language
Language code for target language
Method Details [hide private]

__init__(self, configfilenames, classifiername)
(Constructor)

source code 

Initialize the class.

Parameters:
  • configfilenames (list(str)) - a list of annotation configuration files that contain the settings for all feature generators etc.
  • classifiername (str) - the filename of a picked classifier object

rank(self, source, translations)

source code 

Rank translations according to estimated quality

Parameters:
  • source (str) - The source sentence whose translations are raned
  • translations (list(str)) - The translations to be ranked

initialize_featuregenerators(self, cfg)

source code 

Initialize the featuregenerators that handle superficial analysis of given translations

Parameters:
  • cfg - the loaded configuration object