Package sentence :: Module pairwiseparallelsentenceset :: Class CompactPairwiseParallelSentenceSet
[hide private]
[frames] | no frames]

Class CompactPairwiseParallelSentenceSet

source code

PairwiseParallelSentenceSet --+
                              |
                             CompactPairwiseParallelSentenceSet

A compact set of pairwise parallel sentences, all originating from the same source sentence, where only one comparison per system-pair is allowed

Instance Methods [hide private]
 
__init__(self, pairwise_parallelsentences, rank_name='rank') source code
int
remove_ties(self)
It removes the pairwise sentences whose rank is equal with each other's
source code
ParallelSentence
get_multiranked_sentence(self, critical_attribute=None, new_rank_name=None, del_orig_class_att=True)
It reconstructs a single parallel sentence object with a gathered discrete [1-9] ranking out of the pairwise comparisons that exist in the pairwise parallel sentence instances
source code
ParallelSentence
get_multiranked_sentence_with_probfilter(self, attribute1='', attribute2='', critical_attribute='rank_soft_predicted', new_rank_name=None, threshold=0.1)
It reconstructs a single parallel sentence object with a gathered discrete [1-9] ranking out of the pairwise comparisons that exist in the pairwise parallel sentence instances
source code
ParallelSentence
get_multiranked_sentence_with_soft_ranks(self, attribute1='', attribute2='', critical_attribute='rank_soft_predicted', new_rank_name=None)
It reconstructs a single parallel sentence object with a gathered discrete [1-9] ranking out of the pairwise comparisons that exist in the pairwise parallel sentence instances
source code
PairwiseParallelSentence
get_pairwise_parallelsentence(self, system_names, directed=False)
Provides the pairwise parallel sentence, whose target sentences provide output by the two given systems
source code

Inherited from PairwiseParallelSentenceSet: get_parallelsentences, get_system_names, length

Instance Variables [hide private]
{(str, str): PairwiseParallelSentence} pps_dict
a dictionary of pairwise parallelel sentences
str rank_name
the name of the rank value
Method Details [hide private]

__init__(self, pairwise_parallelsentences, rank_name='rank')
(Constructor)

source code 
Parameters:

remove_ties(self)

source code 

It removes the pairwise sentences whose rank is equal with each other's

Returns: int
the number of ties filtered

get_multiranked_sentence(self, critical_attribute=None, new_rank_name=None, del_orig_class_att=True)

source code 

It reconstructs a single parallel sentence object with a gathered discrete [1-9] ranking out of the pairwise comparisons that exist in the pairwise parallel sentence instances

Returns: ParallelSentence
a parallel sentence

get_multiranked_sentence_with_probfilter(self, attribute1='', attribute2='', critical_attribute='rank_soft_predicted', new_rank_name=None, threshold=0.1)

source code 

It reconstructs a single parallel sentence object with a gathered discrete [1-9] ranking out of the pairwise comparisons that exist in the pairwise parallel sentence instances

Returns: ParallelSentence
a parallel sentence

get_multiranked_sentence_with_soft_ranks(self, attribute1='', attribute2='', critical_attribute='rank_soft_predicted', new_rank_name=None)

source code 

It reconstructs a single parallel sentence object with a gathered discrete [1-9] ranking out of the pairwise comparisons that exist in the pairwise parallel sentence instances

Returns: ParallelSentence
a parallel sentence

get_pairwise_parallelsentence(self, system_names, directed=False)

source code 

Provides the pairwise parallel sentence, whose target sentences provide output by the two given systems

Parameters:
  • system_names (tuple of strings) - pair of translation system names
  • order (boolean) - whether the order of the systems in the tuple is important, or not
Returns: PairwiseParallelSentence
the pairwise parallel sentence that contains the outputs of the two given systems