(abstract)
Splits abstract text from datafile into list of sentences.

  Args:
    abstract: string containing <s> and </s> tags for starts and ends of sentences

  Returns:
    sents: List of sentence strings (no tags)
Splits abstract text from datafile into list of sentences.
Splits abstract text from datafile into list of sentences .
def abstract2sents(abstract):
  """Splits abstract text from datafile into list of sentences.

  Args:
    abstract: string containing <s> and </s> tags for starts and ends of sentences

  Returns:
    sents: List of sentence strings (no tags)"""
  cur = 0
  sents = []
  while True:
    try:
      start_p = abstract.index(SENTENCE_START, cur)
      end_p = abstract.index(SENTENCE_END, start_p + 1)
      cur = end_p + len(SENTENCE_END)
      sents.append(abstract[start_p+len(SENTENCE_START):end_p])
    except ValueError as e: # no more sentences
      return sents
def abstract2sents ( abstract ) : cur = 0 sents = [ ] while True : try : start_p = abstract . index ( SENTENCE_START , cur ) end_p = abstract . index ( SENTENCE_END , start_p + 1 ) cur = end_p + len ( SENTENCE_END ) sents . append ( abstract [ start_p + len ( SENTENCE_START ) : end_p ] ) except ValueError as e : # no more sentences return sents