code: def test_stop_words():
      """
      Works as a pipeline component and can be disabled.
      """
      nlp1 = spacy.load("en_core_web_sm")
      nlp1.add_pipe("textrank")
  
      # "words" is in top phrases
      with open("dat/gen.txt", "r") as f:
          doc = nlp1(f.read())
  
          phrases = [phrase.text for phrase in doc._.phrases[:5]]
  
          assert "words" in phrases
  
      # add `"word": ["NOUN"]` to the *stop words*, to remove instances
      # of `"word"` or `"words"` then see how the ranked phrases differ?
  
      nlp2 = spacy.load("en_core_web_sm")
      nlp2.add_pipe(
          "textrank", config={"stopwords": {"word": ["NOUN"]}}
      )
  
      with open("dat/gen.txt", "r") as f:
          doc = nlp2(f.read())
  
          phrases = [phrase.text for phrase in doc._.phrases[:5]]
  
          assert "words" not in phrases
  
file_path: pytextrank/tests/test_base.py
imports: from spacy.language import Language
  from spacy.tokens import Span, Doc
  import spacy
  import sys
  from pytextrank.base import BaseTextRankFactory
label_desc: Use image node_id 5 for calling a global function with example usage: test_stop_words() without return types