class_docstr: Text Processor class implement NER, POS tag, lexical tree parsing.
  EnProcessor is designed by single instance mode.
docstr: Filter synonyms not contain the same pos tag with given token.
  
  :param list|tuple token_and_pos: *(token, pos)*
  :param list candidates: strings to verify
  :return: filtered candidates list.
docstr_tok: ["Filter","synonyms","not","contain","the","same","pos","tag","with","given","token",".",":","param","list|tuple","token_and_pos",":","*","(","token",",","pos",")","*",":","param","list","candidates",":","strings","to","verify",":","return",":","filtered","candidates","list","."]
code: def filter_candidates_by_pos(self, token_and_pos, candidates):
      r"""
      Filter synonyms not contain the same pos tag with given token.
  
      :param list|tuple token_and_pos: *(token, pos)*
      :param list candidates: strings to verify
      :return: filtered candidates list.
  
      """
  
      def lesk(word, pos, candidates):
          can_word_pos = []
  
          for candidate in candidates:
              can_word, can_pos = nltk.tag.pos_tag([candidate])[0]
              can_word_pos.append(
                  [can_word, self.normalize_pos(can_pos)]
              )
  
          if pos is not None:
              return [ss[0] for ss in can_word_pos if str(ss[1]) == pos]
          else:
              return []
  
      # normalize pos tag
      word, pos = token_and_pos
  
      return lesk(word, self.normalize_pos(pos), candidates)
  
imports: import re
  import nltk
  import spacy
  import threading
  from functools import reduce
  from spacy.tokens import Doc
  from .nltk_res_load import *
  from ..settings import *
label_desc: Use image node_id 19 for calling the EnProcessor obj's underlying member method code with example usage: obj.filter_candidates_by_pos(token_and_pos, candidates) and returns: lesk, unknown, list