#NEWLINE# def replace( self , oldtext , newtext ) : #NEWLINE# #INDENT# def rep( w ) : #NEWLINE# #INDENT# if ( w == oldtext ) : #NEWLINE# #INDENT# return newtext #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return w #NEWLINE# #UNINDENT# #UNINDENT# return Phrase ( self . fieldname , [ rep ( w ) for w in w . words ] , slop = self . slop , boost = self . boost )