code: def extract_features_envelope(
      target_word, definition, hyps_vec, model_w2v
  ):
      """
      extract features
  
      Args:
          target_word (list(str)): target word for finding senses
          definition (list(str)):  definition of target word
          hyps_vec (list(str)):    hypernym list of of target word
          model_w2v (list(str)):   word embedding's model
  
      Returns:
          valid_w2v_flag(bool):         true if target word has w2v entry, else false
          definition_sim_cbow(float):   cosine similarity between target word embedding and
          definition cbow sentence embedding
          definition_sim(float):        cosine similarity between target word embedding and
          definition sentence embedding
          hyps_sim(float):              cosine similarity between target word embedding and
          hypernyms embeddings
          target_word_emb(numpy.array): word embedding of target word
          definition_sentence_emb_cbow(numpy.array): definition sentence cbow embedding
  
      """
      valid_w2v_flag, target_word_emb = return_w2v(
          target_word, model_w2v
      )
  
      # calculate target word to definition similarity and definition similarity CBOW
      definition_words = extract_meaningful_words_from_sentence(
          definition
      )
      definition_sim = calc_word_to_sentence_sim_w2v(
          target_word, definition_words, model_w2v, 0
      )
      (
          definition_sentence_emb_cbow,
          definition_sim_cbow,
      ) = calc_word_to_sentence_dist_cbow(
          target_word, definition_words, model_w2v
      )
  
      # calculate hypernyms similarity
      hyps_vec = convert_string_to_list_of_words(hyps_vec)
      hyps_sim = calc_word_to_sentence_sim_w2v(
          target_word, hyps_vec, model_w2v, 2
      )
  
      return [
          valid_w2v_flag,
          definition_sim_cbow,
          definition_sim,
          hyps_sim,
          target_word_emb,
          definition_sentence_emb_cbow,
      ]
  
file_path: nlp-architect/examples/most_common_word_sense/feature_extraction.py
imports: import re
  import nltk
  import numpy
  from numpy import dot
  from numpy.linalg import norm
  from nlp_architect.utils.generic import license_prompt
label_desc: Use image node_id 1 for calling a global function with example usage: extract_features_envelope(target_word, definition, hyps_vec, model_w2v) and returns: list