original_docstring: When keep_nonentities==False, then given a tokenized
      comma-separated list of entity names, return the entity names from
      the list (discarding anything that's not an entity).  When
      keep_nonentities==True, then tokens that are not entities are
      retained, so what is returned is a version of the sentence where
      entity names have been converted to chunks.
      
docstring: When keep_nonentities==False, then given a tokenized
  comma-separated list of entity names, return the entity names from
  the list (discarding anything that's not an entity).  When
  keep_nonentities==True, then tokens that are not entities are
  retained, so what is returned is a version of the sentence where
  entity names have been converted to chunks.
docstring_tokens: When keep_nonentities == False then given a tokenized comma - separated list of entity names return the entity names from the list ( discarding anything that ' s not an entity ) . When keep_nonentities == True then tokens that are not entities are retained so what is returned is a version of the sentence where entity names have been converted to chunks .
code: def as_entity_list(self,sent,keep_nonentities=False):
      """When keep_nonentities==False, then given a tokenized
      comma-separated list of entity names, return the entity names from
      the list (discarding anything that's not an entity).  When
      keep_nonentities==True, then tokens that are not entities are
      retained, so what is returned is a version of the sentence where
      entity names have been converted to chunks.
      """
      words = simple_tokenize(sent)
      result = []
      i = 0
      while i<len(words):
        m = self.longest_match_at(i,words)
        if m is None and words[i]==',':
          i += 1
        elif m is None:
          if keep_nonentities:
            result.append(words[i])
          else:
            pass
            #logging.warn('unmatched token %r in %r discarded' % (words[i],sent))
          i += 1
        else:
          result.append(" ".join([words[i]] + list(m)))
          i += len(m)+1
      return result
code_tokens: def as_entity_list ( self , sent , keep_nonentities = False ) : words = simple_tokenize ( sent ) result = [ ] i = 0 while i < len ( words ) : m = self . longest_match_at ( i , words ) if m is None and words [ i ] == ',' : i += 1 elif m is None : if keep_nonentities : result . append ( words [ i ] ) else : pass i += 1 else : result . append ( " " . join ( [ words [ i ] ] + list ( m ) ) ) i += len ( m ) + 1 return result
short_docstring: When keep_nonentities==False, then given a tokenized
  comma-separated list of entity names, return the entity names from
  the list (discarding anything that's not an entity).
short_docstring_tokens: When keep_nonentities == False then given a tokenized comma - separated list of entity names return the entity names from the list ( discarding anything that ' s not an entity ) .
comment: """When keep_nonentities==False, then given a tokenized
      comma-separated list of entity names, return the entity names from
      the list (discarding anything that's not an entity).  When
      keep_nonentities==True, then tokens that are not entities are
      retained, so what is returned is a version of the sentence where
      entity names have been converted to chunks.
      """$SEP$#logging.warn('unmatched token %r in %r discarded' % (words[i],sent))