class_docstr: Text Processor class implement NER, POS tag, lexical tree parsing.
  EnProcessor is designed by single instance mode.
docstr: Get synsets from WordNet.
  
  :param list tokens_and_pos: A list of tuples, *(token, POS)*.
  :param str lang: language name
  :return: A list of str, represents the sense of each input token.
docstr_tok: ["Get","synsets","from","WordNet",".",":","param","list","tokens_and_pos",":","A","list","of","tuples",",","*","(","token",",","POS",")","*",".",":","param","str","lang",":","language","name",":","return",":","A","list","of","str",",","represents","the","sense","of","each","input","token","."]
code: def get_synsets(self, tokens_and_pos, lang="eng"):
      r"""
      Get synsets from WordNet.
  
      :param list tokens_and_pos: A list of tuples, *(token, POS)*.
      :param str lang: language name
      :return: A list of str, represents the sense of each input token.
  
      """
      if self.__wordnet is None:
          self.__wordnet = self.model_manager.load(NLTK_WORDNET)
  
      if isinstance(tokens_and_pos, str):
          tokens_and_pos = self.get_pos(tokens_and_pos)
  
      def lesk(sentence, word, pos):
          synsets = self.__wordnet.synsets(word, lang=lang)
  
          if pos is not None:
              synsets = [ss for ss in synsets if str(ss.pos()) == pos]
  
          return synsets
  
      sentoken = []
      sentence = []
      # normalize pos tag
      for word, pos in tokens_and_pos:
          sentoken.append(word)
          sentence.append((word, self.normalize_pos(pos)))
      ret = []
  
      for word, pos in sentence:
          ret.append(lesk(sentoken, word, pos))
      return ret
  
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 17 for calling the EnProcessor obj's underlying member method code with example usage: obj.get_synsets(tokens_and_pos, lang) and returns: ret, synsets