class_docstr: A class to process a collection of words from either a corpus or a list of related words.
  This class provides various filtering methods to narrow down the collection based on specific criteria.
  
  Args:
      words (Corpus | RelatedWords): The corpus or list of related words to be processed.
docstr: Filters words in the collection by specified parts of speech.
  Refactors to nltk tagging if NotImplemented.
  
  Args:
      parts_of_speech (list[str]): A list of allowed parts of speech (e.g., "NN", "VBG").
docstr_tok: ["Filters","words","in","the","collection","by","specified","parts","of","speech",".","Refactors","to","nltk","tagging","if","NotImplemented",".","Args",":","parts_of_speech","(","list","[","str","]",")",":","A","list","of","allowed","parts","of","speech","(","e.g.",",","``","NN","''",",","``","VBG","''",")","."]
code: def parts_of_speech_filter(self, parts_of_speech: List[str]) -> None:
      """
      Filters words in the collection by specified parts of speech.
      Refactors to nltk tagging if NotImplemented.
  
      Args:
          parts_of_speech (list[str]): A list of allowed parts of speech (e.g., "NN", "VBG").
      """
      # Refactor to have default to nltk tagging if NotImplemented
      tagged_words = self.words.get_pos_tagged_words()
      self.words.words = [
          word for word, pos in tagged_words if pos in parts_of_speech
      ]
  
file_path: evals/evals/registry/data/word_association/corpus_tools/processor.py
imports: from collections import namedtuple
  from typing import Iterator, List, Union
  from corpus import Corpus, NltkCorpus
  from related_words import RelatedWords
label_desc: Use image node_id 2 for calling the WordCollectionProcessor obj's underlying member method code with example usage: obj.parts_of_speech_filter(parts_of_speech) without return types