code: def demo():
      """Demonstration of the module."""
      # Some words with their real lemmas
      lemmas = {
          "kneel": ["kneel", "knelt"],
          "range": ["range", "ranged"],
          "ring": ["ring", "rang", "rung"],
      }
      # Same words with stems from a stemming algorithm
      stems = {
          "kneel": ["kneel"],
          "knelt": ["knelt"],
          "rang": ["rang", "range", "ranged"],
          "ring": ["ring"],
          "rung": ["rung"],
      }
      print("Words grouped by their lemmas:")
      for lemma in sorted(lemmas):
          print("{} => {}".format(lemma, " ".join(lemmas[lemma])))
      print()
      print("Same words grouped by a stemming algorithm:")
      for stem in sorted(stems):
          print("{} => {}".format(stem, " ".join(stems[stem])))
      print()
      p = Paice(lemmas, stems)
      print(p)
      print()
      # Let's "change" results from a stemming algorithm
      stems = {
          "kneel": ["kneel"],
          "knelt": ["knelt"],
          "rang": ["rang"],
          "range": ["range", "ranged"],
          "ring": ["ring"],
          "rung": ["rung"],
      }
      print("Counting stats after changing stemming results:")
      for stem in sorted(stems):
          print("{} => {}".format(stem, " ".join(stems[stem])))
      print()
      p.stems = stems
      p.update()
      print(p)
  
file_path: nltk/nltk/metrics/paice.py
imports: from math import sqrt
label_desc: Use image node_id 8 for calling a global function with example usage: demo() without return types