def basic_sent_chop(data, raw=True):
 new_data = []
 curr_sent = []
 sent_mark = [',', '.', '?', '!']
 if raw:
  for word in data:
   if (word in sent_mark):
    curr_sent.append(word)
    new_data.append(curr_sent)
    curr_sent = []
   else:
    curr_sent.append(word)
 else:
  for (word, tag) in data:
   if (word in sent_mark):
    curr_sent.append((word, tag))
    new_data.append(curr_sent)
    curr_sent = []
   else:
    curr_sent.append((word, tag))
 return new_data

def basic_sent_chop ( data , raw = True ) : new_data = [ ] curr_sent = [ ] sent_mark = [ ',' , '.' , '?' , '!' ] if raw : for word in data : if ( word in sent_mark ) : curr_sent . append ( word ) new_data . append ( curr_sent ) curr_sent = [ ] else : curr_sent . append ( word ) else : for ( word , tag ) in data : if ( word in sent_mark ) : curr_sent . append ( ( word , tag ) ) new_data . append ( curr_sent ) curr_sent = [ ] else : curr_sent . append ( ( word , tag ) ) return new_data
basic method for tokenizing input into sentences for this tagger: .