设计加权关键字匹配字符串 - 比较以按相关性对简历文档进行排序

时间:2014-09-24 10:28:54

标签: c++ algorithm templates csv doc

我需要制作一些设计文档 - 我无法决定数据类型和流程问题...我知道有更多经验丰富的设计师可以帮我找到 KISS-simple ADT 或我无法找到的模板所以让我们从需求开始:

  1. 主要功能检索简历并根据以下内容将它们从MOST排列到最少:
  2. **用户定义的关键字** ,分配了一个int值
  3. //最佳类型似乎配对

    template <class udKeyword, class IntValue>
    class Pair{
      Public: udKeyword one; IntValue two;
    }
    

    // note ...还需要一个PairList类

    1. ranking_doc_list 需要可大规模扩展,因此我不确定当用户请求 ranking_doc_list res_docs 应该自己插入(和push_back排名较低的res_docs)。这种方法看起来最好,但在计算和内存方面看起来也很浪费。
    2. 我从一个非常简单的例子开始。 客户端将输入 udKeywod / Value pair My_client_company将发布 “经验丰富的调酒师需要 - 请将简历发送至client@xxxxx.yyy”

      假设“经验丰富”= 7,“Bartend”= 5,“调酒”= 5,“客户服务”= 4,“文凭”= 3 ......等。 (列举)

      我希望简历以.doc文件的形式出现,我可以通过 ** resume_filename ** 进行细分,并为每个文档构建一个模板,而不是使其正常运行:

      /*FORGIVE MY C++ STL (untested - I'm on a laptop running Win7 that 
        makes me miss my HP-UX and SParc-Solaris Labs greatly*/
      
      //extract the  file name and parse/allocate the text into a CSV array
      
      template <class filename, class CSV_unordered_list>
      class doc_data_pull{ 
        public: 
          string name() = new resdoc.filename; 
          int wordQty = CSv_unordered_list.get_size();
          string csv[];
          void getCSVarray{ 
              for(int i=0; i < wordQty; CSV_unordered_list.next(); i++){
                  csv[i] = CSV_unordered_list.get_string();
          }
      }
      

      //使用 strcompare 与udKeywords比较csv数组并为分数指定分数

      template <class PairList; class doc_data_pull;>
      class ranksResume{
      
          getCSV_matches_and scores(csv[]; name();{
          int PLsize = Pairlist.size();
          int i=0;
          int score[] = 0;
          int PLindex = 0;
          while (PLindex < Pairlist.size();{
              if (csv[i] == Pairlist.udKeyword()** //string-compare is the centerpiece of the logic
                  score  = Pairlist.score //the user-defined keyword matched 
                  i++; Pairlist.next();
                  PLindex++;}
               else{i++; PLindex++;}}//end else and while
          //report the score and name() for QC sanshot
          cout<< name() /*should be initial filename uploaded to /root */ << scored a << score \n;
      
      由于懒惰,

      // ** rankResume 的列表类型也被跳过**

      #include "udKeyword.h"  //for user to define keywords per job posting
      #include "intKey.h"     //an integer value with a unique identifier to prevent "ties"
      #include "pair.h"       //keyword, value from user
      #include "pairlist.h"   //user-defined and created listype Keyword and Relevance metric
      #include "filename.h"   //extracts the text "filename" or 1st txt line for txt-only resumes
      #include "CSVunorderdList.h" //creates a CSV array for str-compare to udKeyword
      #include "doc_data_pull.h"//provides CSV for each doc AND the resume-filename
      #include <iostream>
      #include <string>
      #include "ranksResume.h" //WIP
      using namespace std;
      
      int main(){//I have almost no recollection of switches in the .cpp so bear w/ me
          char input;
          cout << "What would you like this bogus document-SEO-based idea of yours to do? <<endl;
          cin >> input;
      
          switch(a, b, c, d, e, f, g, h) {
          case a : Add a new Keywored
          case b : change the value of a Keyword
          case c : you have << filename.size() << new resumes. Display all? << ranksResumeList.print()' 
          Case d : display just the top 10. << ranksResumeList.printTopTen();
          case e : delete a resume
          case f : favorite a resume
          case g : mark this job search complete
          case h : exit.}
      
          return 0;
          //take benzodiazepenes
      }//end main
      

      无论如何,这可能是我十年来第一堆目标代码。它是部分的,可能装有错误和类型不匹配...但你可以看到我的伪代码解决方案的目标我在一周前搜索了这个,在配对的数据列表中发现了很少的帖子或评论,定义了文档(或字符串,对象......)的排名基于机器人选择的关键字和主观权重来发展“相关性”它是bs但客户真的想以这种方式对客户文档进行排序......它是制度化的SEO腐败,但无论如何。 ..我会花几块钱买任何东西。虽然设计师......我真的想知道你会用哪些算法和ADT来解决这个问题.DONT感觉有义务用C / C ++ / Java给出答案。 .plus我从来没有谈过一个(php?)函数我将如何实现收据以及可能的.doc文件的排序/索引。

0 个答案:

没有答案