def load_mpqa(loc='./data/'):
 (pos, neg) = ([], [])
 with open((loc + 'mpqa.pos'), 'rb') as f:
  for line in f:
   text = line.strip()
   if (len(text) > 0):
    pos.append(text)
 with open((loc + 'mpqa.neg'), 'rb') as f:
  for line in f:
   text = line.strip()
   if (len(text) > 0):
    neg.append(text)
 return (pos, neg)

def load_mpqa ( loc = './data/' ) : ( pos , neg ) = ( [ ] , [ ] ) with open ( ( loc + 'mpqa.pos' ) , 'rb' ) as f : for line in f : text = line . strip ( ) if ( len ( text ) > 0 ) : pos . append ( text ) with open ( ( loc + 'mpqa.neg' ) , 'rb' ) as f : for line in f : text = line . strip ( ) if ( len ( text ) > 0 ) : neg . append ( text ) return ( pos , neg )
load the mpqa dataset .