#NEWLINE# def __init__( self , D , prev_words , next_words , weights = default_context_settings ) : #NEWLINE# #INDENT# self . baseline = D #NEWLINE# self . baseline_wt = weights [ 'baseline_wt' ] #NEWLINE# self . prev_ngrams = self . get_ngrams ( next_words , prev_words ) #NEWLINE# self . prev_ngrams_wt = self . set_ngram_wts ( weights ) #NEWLINE# self . twoback = self . get_twoback ( D , prev_words ) #NEWLINE# self . twoback_wt = weights [ 'twoback_wt' ]