nltk.ConcordanceIndex.print_concordance

ConcordanceIndex.print_concordance(word, width=75, lines=25)[source]

Print a concordance for word with the specified context window.

Parameters:
  • word (str) – The target word
  • width (int) – The width of each line, in characters (default=80)
  • lines (int) – The number of lines to display (default=25)