def load_json_sent(flist_json, subset_pct):
 subset_fnum = int(np.ceil(((subset_pct / 100.0) * len(flist_json))))
 all_sent = []
 for f in flist_json[:subset_fnum]:
  data = load_json(f)
  num_sent = len(data['text'])
  if (num_sent <= 0):
   continue
  num_sent = len(data['text'])
  sent = [data['text'][i]['sentence'] for i in range(num_sent)]
  all_sent += sent
 return all_sent

def load_json_sent ( flist_json , subset_pct ) : subset_fnum = int ( np . ceil ( ( ( subset_pct / 100.0 ) * len ( flist_json ) ) ) ) all_sent = [ ] for f in flist_json [ : subset_fnum ] : data = load_json ( f ) num_sent = len ( data [ 'text' ] ) if ( num_sent <= 0 ) : continue num_sent = len ( data [ 'text' ] ) sent = [ data [ 'text' ] [ i ] [ 'sentence' ] for i in range ( num_sent ) ] all_sent += sent return all_sent
load all the sentences from a list of json files and return a list .