code: def remove_pc(x: np.ndarray, npc: int = 1) -> np.ndarray:
      """Remove the projection on the principal components. Calling this on a collection of sentence embeddings, prior to comparison, may improve accuracy.
  
      :param x: X[i,:] is a data point
      :param npc: number of principal components to remove
      :return: XX[i, :] is the data point after removing its projection
  
      This has been adapted from the SIF paper code: `https://openreview.net/pdf?id=SyK00v5xx`.
      """
      pc: np.ndarray = compute_pc(x, npc)
      if npc == 1:
          xx: np.ndarray = x - x.dot(pc.transpose()) * pc
      else:
          xx: np.ndarray = x - x.dot(pc.transpose()).dot(pc)
      return xx
  
file_path: cltk/src/cltk/embeddings/sentence.py
imports: from typing import Dict, List, Tuple, Union, ValuesView
  import numpy
  from sklearn.decomposition import TruncatedSVD
  from cltk.core import Sentence
label_desc: Use image node_id 3 for calling a global function with example usage: remove_pc(x, npc) and returns: xx