code: func FindSentences(ranks *Rank, kind int, limit int) []Sentence {
  	var sentences []Sentence
  
  	cache := make(map[int]bool)
  
  	collect := func(sentenceIDs []int) bool {
  		for _, id := range sentenceIDs {
  			if len(sentences) >= limit {
  				return true
  			}
  
  			if !cache[id] {
  				sentences = append(sentences, Sentence{id, ranks.SentenceMap[id]})
  				cache[id] = true
  			}
  		}
  
  		return false
  	}
  
  	if kind == ByQty {
  		singleWords := FindSingleWords(ranks)
  
  		for _, singleWord := range singleWords {
  			sentenceIDs := ranks.Words[singleWord.ID].SentenceIDs
  
  			if collect(sentenceIDs) {
  				return sentences
  			}
  		}
  	} else if kind == ByRelation {
  		phrases := FindPhrases(ranks)
  
  		for _, phrase := range phrases {
  			sentenceIDs := ranks.Relation.Node[phrase.LeftID][phrase.RightID].SentenceIDs
  
  			if collect(sentenceIDs) {
  				return sentences
  			}
  		}
  	}
  
  	return sentences
  }
docs: // FindSentences function has wrappers textrank.FindSentencesByRelationWeight
  // and textrank.FindSentencesByWordQtyWeight. Use the wrappers instead.