class_docstr: Beta Posterior Scoring. Code adapted from
  https://github.com/serinachang5/gender-associations/blob/master/score_words.py (Chang 2019).
  
  Serina Chang and Kathleen McKeown. Automatically Inferring Gender Associations from Language. To appear
  in Empirical Methods in Natural Language Processing (EMNLP) 2019 (Short Paper).
  
  Method was originally introduced in
  David Bamman, Jacob Eisenstein, and Tyler Schnoebelen.  GENDER IDENTITY AND LEXICAL VARIATION IN SOCIAL MEDIA. 2014.
  
  Direct quote from Bamman (2014)
  
  Identifying gender markers. Our goal is to identify words that are used with
  unusual frequency by authors of a single gender. Assume that each term has an
  unknown likelihood fi, indicating the proportion of authors who use term i. For
  gender j, there are Nj authors, of whom kji use term i; the total count of the term i
  is ki. We ask whether the count kji is significantly larger than expected. Assuming
  a non-informative prior distribution on fi, the posterior distribution (conditioned on
  the observations ki and N) is Beta(ki, N-ki). The distribution of the gender-specific
  counts can be described by an integral over all possible fi. This integral defines the
  Beta-Binomial distribution (Gelman, Carlin, Stern, and Rubin 2004), and has a
  closed form solution. We mark a term as having a significant gender association if
  the cumulative distribution at the count kji is p < .05.
  
  ```
  >>> term_scorer = BetaPosterior(corpus).set_categories('Positive', ['Negative'], ['Plot']).get_score_df()
  
  ```
class_docstr_tok: ["Beta","Posterior","Scoring",".","Code","adapted","from","https",":","\/\/github.com\/serinachang5\/gender-associations\/blob\/master\/score_words.py","(","Chang","2019",")",".","Serina","Chang","and","Kathleen","McKeown",".","Automatically","Inferring","Gender","Associations","from","Language",".","To","appear","in","Empirical","Methods","in","Natural","Language","Processing","(","EMNLP",")","2019","(","Short","Paper",")",".","Method","was","originally","introduced","in","David","Bamman",",","Jacob","Eisenstein",",","and","Tyler","Schnoebelen",".","GENDER","IDENTITY","AND","LEXICAL","VARIATION","IN","SOCIAL","MEDIA",".","2014",".","Direct","quote","from","Bamman","(","2014",")","Identifying","gender","markers",".","Our","goal","is","to","identify","words","that","are","used","with","unusual","frequency","by","authors","of","a","single","gender",".","Assume","that","each","term","has","an","unknown","likelihood","fi",",","indicating","the","proportion","of","authors","who","use","term","i",".","For","gender","j",",","there","are","Nj","authors",",","of","whom","kji","use","term","i",";","the","total","count","of","the","term","i","is","ki",".","We","ask","whether","the","count","kji","is","significantly","larger","than","expected",".","Assuming","a","non-informative","prior","distribution","on","fi",",","the","posterior","distribution","(","conditioned","on","the","observations","ki","and","N",")","is","Beta","(","ki",",","N-ki",")",".","The","distribution","of","the","gender-specific","counts","can","be","described","by","an","integral","over","all","possible","fi",".","This","integral","defines","the","Beta-Binomial","distribution","(","Gelman",",","Carlin",",","Stern",",","and","Rubin","2004",")",",","and","has","a","closed","form","solution",".","We","mark","a","term","as","having","a","significant","gender","association","if","the","cumulative","distribution","at","the","count","kji","is","p","<",".05",".","``","`",">",">",">","term_scorer","=","BetaPosterior","(","corpus",")",".set_categories","(","'Positive","'",",","[","'Negative","'","]",",","[","'Plot","'","]",")",".get_score_df","(",")","``","`"]
code: def get_scores(self, *args):
      return self.get_score_df()["score"]
  
file_path: scattertext/scattertext/termscoring/BetaPosterior.py
imports: import pandas
  from scipy.stats import beta, norm
  from scattertext.termranking.OncePerDocFrequencyRanker import OncePerDocFrequencyRanker
  from scattertext.termscoring.CorpusBasedTermScorer import CorpusBasedTermScorer
label_desc: Use image node_id 3 for calling the BetaPosterior obj's underlying member method code with example usage: obj.get_scores() and returns: self