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

Class AnalyticPairwiseParallelSentenceSet

source code

PairwiseParallelSentenceSet --+
                              |
                             AnalyticPairwiseParallelSentenceSet

A set of pairwise parallel sentences, all originating from the same source sentence, where more than one comparisons per system-pair are allowed

Instance Methods [hide private]
 
__init__(self, pairwise_parallelsentences=[], rank_name='rank', **kwargs) source code
pairwise_parallelsentences: list of sentence.pairwiseparallelsentence.PairwiseParallelSentence instances
get_parallelsentences(self)
Returns: a list of the parallel sentences contained in the structure
source code
int
remove_ties(self)
It removes the pairwise sentences whose rank is equal with each other's
source code
 
restrict_ranks(self, restrict_ranks) source code
[sentence.pairwiseparallelsentence.PairwiseParallelSentence, ...]
get_pairwise_parallelsentences(self, system_names, directed=False)
Provides the pairwise parallel sentences, whose target sentences provide output by the two given systems
source code
 
get_filtered_pairwise_parallelsentence_set(self, threshold=1.0) source code
 
get_filtered_pairwise_parallelsentences(self, threshold=1.0) source code
 
_filter_agreement(self, threshold=1.0, pairwise_parallelsentences=[], system_names=()) source code
 
get_compact_pairwise_parallelsentences(self) source code
 
get_merged_pairwise_parallelsentences(self)
Merge many overlapping judgments over translations originating from the same source sentence...
source code
 
get_compact_pairwise_parallelsentence_set(self) source code
PairwiseParallelSentence
_merge_judgments(self, pairwise_parallelsentences=[], system_names=())
Merge many overlapping judgements over translations produced by the same system pair originating from the same source sentence, into only one judgment
source code
 
_merge_weight(self, ps) source code

Inherited from PairwiseParallelSentenceSet: get_system_names, length

Instance Variables [hide private]
{(str, str): [PairwiseParallelSentence, ...]} pps_dict
a dict that stores all the pairwise parallelsentences mapped to a tuple of strings containing the system names for the respective translations
Method Details [hide private]

__init__(self, pairwise_parallelsentences=[], rank_name='rank', **kwargs)
(Constructor)

source code 
Parameters:

get_parallelsentences(self)

source code 
Returns: pairwise_parallelsentences: list of sentence.pairwiseparallelsentence.PairwiseParallelSentence instances
a list of the parallel sentences contained in the structure
Overrides: PairwiseParallelSentenceSet.get_parallelsentences
(inherited documentation)

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

To Do: test

get_pairwise_parallelsentences(self, system_names, directed=False)

source code 

Provides the pairwise parallel sentences, 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: [sentence.pairwiseparallelsentence.PairwiseParallelSentence, ...]
the pairwise parallel sentence that contains the outputs of the two given systems

get_merged_pairwise_parallelsentences(self)

source code 

Merge many overlapping judgments over translations originating from the same source sentence
@return pairwise parallel sentences, containing only the merged output rank
@rtype [L{L{sentence.pairwiseparallelsentence.PairwiseParallelSentence}, ...] 

_merge_judgments(self, pairwise_parallelsentences=[], system_names=())

source code 

Merge many overlapping judgements over translations produced by the same system pair originating from the same source sentence, into only one judgment

Returns: PairwiseParallelSentence
a pairwise parallel sentences