A parallel sentence, that contains a source sentence, a number of
target sentences, a reference and some attributes
|
__init__(self,
source,
translations,
reference=None,
attributes={ } ,
rank_name=' rank ' ,
**kwargs)
Constructor @type source SimpleSentence @param source The source text
of the parallel sentence @type translations list ( SimpleSentence )
@param translations A list of given translations @type reference
SimpleSentence @param reference The desired translation provided by
the system @type attributes dict { String name , String value }
@param the attributes that describe the parallel sentence |
source code
|
|
|
|
|
|
|
|
|
|
|
get_rank(self)
provide the rank value of the parallel sentence return: the rank
value rtype: string |
source code
|
|
Ranking
|
get_ranking(self)
returns a ranking list, containing the ranks of the included target
translations |
source code
|
|
dict([(string,string), ...])
|
|
set([string, ...])
|
|
string
|
|
|
get_target_attribute_values(self,
attribute_name,
sub=None) |
source code
|
|
|
get_filtered_target_attribute_values(self,
attribute_name,
filter_attribute_name,
filter_attribute_value) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_nested_attributes(self)
function that gathers all the features of the nested sentences to the
parallel sentence object, by prefixing their names accordingly |
source code
|
|
|
recover_attributes(self)
Moves the attributes back to the nested sentences |
source code
|
|
|
|
|
|
|
|
|
|
|
import_indexed_parallelsentence(self,
parallelsentence,
target_attribute_names,
keep_attributes_general=[ ] ,
keep_attributes_source=[ ] ,
keep_attributes_target=[ ] ) |
source code
|
|
|
import_missing_parallelsentence(self,
target_attribute_names,
keep_attributes_general=[ ] ,
keep_attributes_source=[ ] ,
keep_attributes_target=[ ] ) |
source code
|
|
|
remove_ties(self)
Function that modifies the current parallel sentence by removing the
target translations that create ties. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|