code: def lrc_score_df(
      f1: np.array,
      f2: np.array,
      n1: Union[int, np.array],
      n2: Union[int, np.array],
      conf_level: float = 0.95,
      correct: bool = True,
      alternative: str = "two sided",
  ) -> pd.DataFrame:
      return binom_confint(
          k=f1,
          n=f1 + f2,
          conf_level=conf_level,
          correct=correct,
          alternative=alternative,
      ).assign(
          P1=f1 / n1,
          P2=f2 / n2,
          Score=lambda df: np.where(
              df.P1 > df.P2,
              np.maximum(
                  np.log2((n2 / n1) * df.lower / (1 - df.lower)),
                  np.zeros(len(df)),
              ),
              np.minimum(
                  np.log2((n2 / n1) * df.upper / (1 - df.upper)),
                  np.zeros(len(df)),
              ),
          ),
      )
  
file_path: scattertext/scattertext/termscoring/lrc.py
imports: from typing import Union
  import numpy
  import pandas
  from scipy.stats import beta
  from scattertext import CorpusBasedTermScorer
label_desc: Use image node_id 2 for calling a global function with example usage: lrc_score_df(f1, f2, n1, n2, conf_level, correct, alternative) and returns: binom_confint