Package sentence :: Module pairwisedataset :: Class PairwiseDataset
[hide private]
[frames] | no frames]

Class PairwiseDataset

source code

     object --+    
              |    
dataset.DataSet --+
                  |
                 PairwiseDataset
Known Subclasses:

Abstract class that defines the data container that stores the entire dataset of parallel sentences, but internally this has been re-structured so that every multiple ranking judgment (e.g. 1-5) has been split into pairwise comparisons (1,2; 1,3; ...). Every set of pairwise comparisons has been mapped to the sentence id of the original source sentence This allows for direct access to pairwise elements of each sentence

Instance Methods [hide private]
 
get_all_parallelsentence_sets(self) source code
 
get_parallelsentences(self) source code
 
get_sentence_ids(self) source code
 
get_pairwise_parallelsentence_set(self, sentence_id) source code
 
get_pairwise_parallelsentence_sets(self) source code
int
remove_ties(self)
It removes the ties from the current data set
source code

Inherited from dataset.DataSet: __eq__, __init__, __iter__, add_attribute_vector, append_dataset, clone, compare, confirm_attributes, ensure_judgment_ids, get_all_attribute_names, get_annotations, get_attribute_names, get_discrete_attribute_values, get_head_sentences, get_multisource_strings, get_nested_attribute_names, get_parallelsentences_per_sentence_id, get_parallelsentences_with_judgment_ids, get_singlesource_strings, get_size, get_tail_sentences, get_target_strings, get_translations_count_vector, import_target_attributes_onsystem, merge_dataset, merge_dataset_symmetrical, merge_references_symmetrical, modify_singlesource_strings, modify_target_strings, select_attribute_names, split, write_singlesource_strings_file

Inherited from dataset.DataSet (private): _retrieve_attribute_names

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

Instance Variables [hide private]
{str: } pairwise_parallelsentence_sets
A dictionary which keeps the pairwise sentences per (original) sentence id

Inherited from dataset.DataSet: attribute_names, attribute_names_found, parallelsentences

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_parallelsentences(self)

source code 
Overrides: dataset.DataSet.get_parallelsentences

remove_ties(self)

source code 

It removes the ties from the current data set

Returns: int
the number of ties removed (helpful for testing)
Overrides: dataset.DataSet.remove_ties