Exemple #1
0
 def getImpWords(self, query, noWords):
   query = query.lower()
   inds = list(self.parseSearch(query, [dict([(self.bizExp[i],[i]) for i in range(len(self.bizExp))]), self.job, self.company]))
   blob = self.getBlob(inds)
   vec = cv_comparer.getVector(blob, self.cvDfs, len(self.cvList), tp=None)
   #print sorted(vec.items(), key=lambda x: x[1], reverse=True)
   return map(lambda x:x[0], sorted(vec.items(), key=lambda x: x[1], reverse=True)[:noWords])
Exemple #2
0
    def getImpWords(self, cv, inds):
      blob = self.getBlob(inds)
      vec = cv_comparer.getVector(blob, self.df_dictionary, len(self.job_description_list), tp=None)
#      print sorted(vec.items(), key=lambda x: x[1], reverse=True)
      scv = set(cv)
      return [r[0] for r in sorted(vec.items(), key=lambda x: x[1], reverse=True) if r[0] not in scv]