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

Class AnalyticPairwiseDataset

source code

     object --+        
              |        
dataset.DataSet --+    
                  |    
    PairwiseDataset --+
                      |
                     AnalyticPairwiseDataset

A data set that contains pairwise comparisons organized by sentence id, i.e. if a sentence has multiple human judgments, these will be grouped together under the sentence id

Instance Methods [hide private]
 
__init__(self, plain_dataset=DataSet(), **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
restrict_ranks(self, restrict_ranks)
Modifies the current dataset by
source code

Inherited from PairwiseDataset: get_all_parallelsentence_sets, get_pairwise_parallelsentence_set, get_pairwise_parallelsentence_sets, get_parallelsentences, get_sentence_ids, remove_ties

Inherited from dataset.DataSet: __eq__, __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]
boolean include_references
Defines whether references need to be included in pairs, as sentences from system "_ref".
boolean invert_ranks
Whether ranks should be considered the way round (highest value=best rank)
boolean replacement
Defines whether pairs are done in all combinations without replacement (replacement=False) or with replacement (replacement=True)

Inherited from PairwiseDataset: pairwise_parallelsentence_sets

Inherited from dataset.DataSet: attribute_names, attribute_names_found, parallelsentences

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, plain_dataset=DataSet(), **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • plain_dataset (DataSet) - the simple dataset to be converted to an analytic one.
  • replacement (boolean) - Defines whether pairs are done in all combinations without replacement (replacement=False) or with replacement (replacement=True)
  • include_references (boolean) - Defines whether references need to be included in pairs, as sentences from system "_ref". Do not enable this for test-sets, as reverting this is not yet supported
  • restrict_ranks ([int, ...]) - Filter pairs to keep only for the ones that include the given ranks. Don't filter if list empty. Before using this, make sure that the ranks are normalized
  • invert_ranks (boolean)
Overrides: object.__init__

Instance Variable Details [hide private]

include_references

Defines whether references need to be included in pairs, as sentences from system "_ref". Do not enable this for test-sets, as reverting this is not yet supported
Type:
boolean