Gets all the words of a sentence through a SRILM language model and
counts how many of them are unknown (unigram prob -99)
|
__init__(self,
url,
lang=' en ' ,
lowercase=True,
tokenize=True,
freqcase_file=False)
Define connection with the server |
source code
|
|
|
get_features_src(self,
simplesentence,
parallelsentence)
Function that falls back to the general simple sentence feature
generation, only if the language is supported by the feature
generator It receives a source simple sentence and returns a list of
source features. |
source code
|
|
|
get_features_tgt(self,
simplesentence,
parallelsentence)
Function that falls back to the general simple sentence feature
generation, only if the language is supported by the feature
generator It receives a target simple sentence and returns a list of
target features. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
_get_sentence_probability(self,
sent_string) |
source code
|
|
|
|
Inherited from languagefeaturegenerator.LanguageFeatureGenerator :
add_features_batch ,
add_features_batch_xml ,
add_features_dataset ,
get_features_string
Inherited from featuregenerator.FeatureGenerator :
add_features_parallelsentence ,
add_features_simplesentence ,
add_features_src ,
add_features_tgt ,
get_annotation_name ,
get_features_parallelsentence ,
process_dataset
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|