code: def ents(self,cls="Word",flattenList=True):
  		
  
  		ents = []
  		"""
  		print 'getting entities',self.classname()
  		if self.classname() == cls:
  			return [self]
  		else:
  			for child in self.children:
  				if type(child)==type([]):
  					if flattenList:
  						ents+=child[0].ents(cls=cls,flattenList=flattenList)
  					else:
  						ents_list2ndlevel=[]
  						for chld in child:
  							if chld:
  								ents_list2ndlevel+=chld.ents(cls=cls,flattenList=flattenList)
  						ents+=[ents_list2ndlevel]
  
  				else:
  					if child:
  						ents += child.ents(cls=cls,flattenList=flattenList)
  		"""
  		#print 'getting entities',self.classname()
  		if self.classname() == cls:
  			return [self]
  		else:
  			for child in self.children:
  				#print child,child.classname()
  				if child.classname()=='WordToken':
  					if cls=='WordToken':
  						ents+=[child]
  					elif not child.children:
  						pass
  					elif cls=='Word':
  						if flattenList:
  							ents+=[child.children[0]]
  						else:
  							ents+=[child.children]
  					else:
  						if child:
  							ents += child.children[0].ents(cls=cls,flattenList=flattenList)
  				else:
  					if child:
  						ents += child.ents(cls=cls,flattenList=flattenList)
  
  
  		return ents
docs: Returns a list of entities of the classname specified the second argument.
  		For instance. to call a Word-object's ents('Phoneme') would return a list of the word's Phoneme objects sequentially.
  		This method recursively searches the self-object's children for the type of object specified.