docstr: setup lee test corpora
docstr_tok: ["setup","lee","test","corpora"]
code: def setUp(self):
      """setup lee test corpora"""
      global bg_corpus, corpus, human_sim_vector, bg_corpus2, corpus2
  
      bg_corpus_file = datapath("lee_background.cor")
      corpus_file = datapath("lee.cor")
      sim_file = datapath("similarities0-1.txt")
  
      # read in the corpora
      latin1 = partial(utils.to_unicode, encoding="latin1")
      with utils.open(bg_corpus_file, "rb") as f:
          bg_corpus = preprocess_documents(latin1(line) for line in f)
      with utils.open(corpus_file, "rb") as f:
          corpus = preprocess_documents(latin1(line) for line in f)
      with utils.open(bg_corpus_file, "rb") as f:
          bg_corpus2 = [
              preprocess_string(latin1(s), filters=DEFAULT_FILTERS[:-1])
              for s in f
          ]
      with utils.open(corpus_file, "rb") as f:
          corpus2 = [
              preprocess_string(latin1(s), filters=DEFAULT_FILTERS[:-1])
              for s in f
          ]
  
      # read the human similarity data
      sim_matrix = np.loadtxt(sim_file)
      sim_m_size = np.shape(sim_matrix)[0]
      human_sim_vector = sim_matrix[np.triu_indices(sim_m_size, 1)]
  
file_path: gensim/gensim/test/test_lee.py
imports: from __future__ import with_statement
  import logging
  import unittest
  from functools import partial
  import numpy
  from gensim import corpora, models, utils, matutils
  from gensim.parsing.preprocessing import preprocess_documents, preprocess_string, DEFAULT_FILTERS
  from gensim.test.utils import datapath
label_desc: Use image node_id 1 for calling the TestLeeTest obj's underlying member method code with example usage: obj.setUp() without return types