Package featuregenerator :: Package bleu :: Module bleugenerator :: Class BleuGenerator
[hide private]
[frames] | no frames]

Class BleuGenerator

source code

                       object --+    
                                |    
featuregenerator.FeatureGenerator --+
                                    |
                                   BleuGenerator

Provides BLEU score against the reference

Instance Methods [hide private]
dict
get_features_tgt(self, target, parallelsentence)
Calculates BLEU score for the given target sentence, against the reference sentence
source code

Inherited from featuregenerator.FeatureGenerator: add_features_batch, add_features_dataset, add_features_parallelsentence, add_features_simplesentence, add_features_src, add_features_tgt, get_annotation_name, get_features_parallelsentence, get_features_simplesentence, get_features_src, get_features_string, process_dataset

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_features_tgt(self, target, parallelsentence)

source code 

Calculates BLEU score for the given target sentence, against the reference sentence

Parameters:
  • simplesentence (sentence.sentence.SimpleSentence) - The target sentence to be scored
Returns: dict
dictionary containing Levenshtein distance as an attribute
Overrides: featuregenerator.FeatureGenerator.get_features_tgt