def load_rt(loc='./data/'):
 (pos, neg) = ([], [])
 with open((loc + 'rt-polarity.pos'), 'rb') as f:
  for line in f:
   pos.append(line.decode('latin-1').strip())
 with open((loc + 'rt-polarity.neg'), 'rb') as f:
  for line in f:
   neg.append(line.decode('latin-1').strip())
 return (pos, neg)

def load_rt ( loc = './data/' ) : ( pos , neg ) = ( [ ] , [ ] ) with open ( ( loc + 'rt-polarity.pos' ) , 'rb' ) as f : for line in f : pos . append ( line . decode ( 'latin-1' ) . strip ( ) ) with open ( ( loc + 'rt-polarity.neg' ) , 'rb' ) as f : for line in f : neg . append ( line . decode ( 'latin-1' ) . strip ( ) ) return ( pos , neg )
load the mr dataset .