public int ResumeImport(string path, ResumeUpload resumeUpload) { ResumeProcessor resumeProcessor = new ResumeProcessor(); var model = resumeProcessor.ProcessModel(path); TblApplicants tblApplicants = new TblApplicants(); tblApplicants.Name = model.Name; tblApplicants.EmailAddress = model.EmailAddress; // tblApplicants. if (resumeUpload.SourceId == 1) { tblApplicants.Source = "Direct"; } else if (resumeUpload.SourceId == 2) { tblApplicants.Source = "Vendor"; } else if (resumeUpload.SourceId == 3) { tblApplicants.Source = "Portal"; } else if (resumeUpload.SourceId == 4) { tblApplicants.Source = "Internal"; } tblApplicants.VendorId = resumeUpload.VendorId; tblApplicants.PortalId = resumeUpload.PortalId; tblApplicants.EmailAddress = resumeUpload.EmployeeEmailId; return(ApplicantDAL.CreateApplicants(tblApplicants)); }
static void Main(string[] args) { //string path = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName, "CV-2.pdf"); //string[] lines = File.ReadAllLines(path); ResumeProcessor resumeProcessor = new ResumeProcessor(); Resume resume = new Resume(); FileStream to_strem = new FileStream(Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName, "sample_resume.doc"), FileMode.Open); //byte[] bytes = System.IO.File.ReadAllBytes(Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName, "CV-4.pdf")); //string[] lines = CVReader.GetContentFromPdf(resume, new MemoryStream(bytes)); //resume = resumeProcessor.Parse(lines); var c = CVReader.GetContentFromPdf(resume, Helpers.Convert.ToPdfStream(to_strem)); var index = Array.FindIndex(c, x => x.Contains("Pty Ltd", StringComparison.InvariantCultureIgnoreCase)); List <string> list = c.ToList(); list.RemoveRange(0, index + 1); c = list.ToArray(); //var q = CVReader.GetContentFromPdf(resume, new MemoryStream(bytes)); resume = resumeProcessor.Parse(c); Console.ReadKey(); }
protected void Resume_Click(object sender, EventArgs e) { String resumeText = resume.Text; var processor = new ResumeProcessor(new JsonOutputFormatter()); String output = processor.Process(resumeText); message.Text = output; }
public List <TblApplicants> GetAllApplicantFromRequisition(int RequisitionId) { var response = ApplicantDAL.GetAllApplicant(); ResumeProcessor resumeProcessor = new ResumeProcessor(); var skills = ApplicantDAL.GetAllSkills(RequisitionId); foreach (var applicant in response) { // string parsedResume = resumeProcessor.GetRawString(applicant.ResumeLocation); } return(response); }
// In order this test to run, you need to create a Resumes folder in test execution directory and put some test resumés. // Only technical skill matching is set up, to test with technical profiles. public void TestAhoCorasickDoubleArrayTrieForManyResumes() { var processor = new ResumeProcessor(new JsonOutputFormatter()); var filePaths = Directory.GetFiles("Resumes").Select(Path.GetFullPath); var acdat = new AhoCorasickDoubleArrayTrie <string>(); var pairs = SkillSetMapper.SkillSet.Select((k, i) => new KeyValuePair <string, string>(k, i.ToString())); acdat.Build(pairs, true); foreach (var filePath in filePaths) { var fileName = Path.GetFileName(filePath); var rawInput = processor._inputReaders.ReadIntoList(filePath); var collectedValues = new List <string>(); foreach (var line in rawInput) { acdat.ParseText(line, hit => { collectedValues.Add(hit.Value); return(true); }); } Assert.IsNotEmpty(collectedValues, $"No match found in file: {filePath}"); } }
public IHttpActionResult GetResumes() { var pdfInput = new PdfInputReader(); var processor = new ResumeProcessor(new JsonOutputFormatter()); var files = Directory.GetFiles(@"C:\Tekathon 2019\Resumes").Select(Path.GetFullPath); var candidates = resumeProcessor.GetCandidates(0); var resumeList = new List <JObject>(); string output = ""; var maxyeo = 0.0; var maxskillcounts = 0; var maxcertificationcount = 0; foreach (var file in files) { Resume resume = null; IList <string> list = null; if (candidates.Count > 0) { var candidateResume = candidates.Find(x => x.Path == file); if (candidateResume != null) { resume = new Resume() { Firstname = candidateResume.FirstName, Lastname = candidateResume.LastName, Gender = candidateResume.Gender, Certifications = candidateResume.Certifications == null ? null : candidateResume.Certifications.Split(',').ToList(), Designation = candidateResume.Designation, Path = candidateResume.Path, Skills = candidateResume.Skills == null ? null : candidateResume.Skills.Split(',').ToList(), yoe = candidateResume.YearsOfExperience, Emailaddress = candidateResume.EmailId }; output = processor.Process(list, file, resume); resumeList.Add(JObject.Parse(output)); if (maxyeo < Convert.ToDouble(candidateResume.YearsOfExperience)) { maxyeo = Convert.ToDouble(candidateResume.YearsOfExperience); } if (maxskillcounts < candidateResume.Skills.Count()) { maxskillcounts = candidateResume.Skills.Count(); } if (maxcertificationcount < candidateResume.Certifications.Count()) { maxcertificationcount = candidateResume.Certifications.Count(); } } else { list = pdfInput.Handle(file); output = processor.Process(list, file, resume); var candidateData = JObject.Parse(output); resumeList.Add(JObject.Parse(output)); if (!string.IsNullOrEmpty(candidateData["yoe"].ToString()) && maxyeo < Convert.ToDouble(candidateData["yoe"].ToString())) { maxyeo = Convert.ToDouble(candidateData["yoe"].ToString()); } if (candidateData["skills"] != null && maxskillcounts < candidateData["skills"].Count()) { maxskillcounts = candidateData["skills"].Count(); } if (candidateData["certifications"] != null && maxcertificationcount < candidateData["certifications"].Count()) { maxcertificationcount = candidateData["certifications"].Count(); } } } else { list = pdfInput.Handle(file); output = processor.Process(list, file, resume); var candidateData = JObject.Parse(output); resumeList.Add(JObject.Parse(output)); if (!string.IsNullOrEmpty(candidateData["yoe"].ToString()) && maxyeo < Convert.ToDouble(candidateData["yoe"].ToString())) { maxyeo = Convert.ToDouble(candidateData["yoe"].ToString()); } if (candidateData["skills"] != null && maxskillcounts < candidateData["skills"].Count()) { maxskillcounts = candidateData["skills"].Count(); } if (candidateData["certifications"] != null && maxcertificationcount < candidateData["certifications"].Count()) { maxcertificationcount = candidateData["certifications"].Count(); } } } foreach (var resume in resumeList) { var yoe = 0.0; var certificatecount = 0.0; var skillcount = 0.0; if (!string.IsNullOrEmpty(resume["yoe"].ToString()) && maxyeo > 0) { yoe = Convert.ToDouble(resume["yoe"].ToString()) / maxyeo * 60; } if (resume["skills"] != null && maxskillcounts > 0) { skillcount = Convert.ToDouble(resume["skills"].Count()) / Convert.ToDouble(maxskillcounts) * 30; } if (resume["certifications"] != null && maxcertificationcount > 0) { certificatecount = Convert.ToDouble(resume["certifications"].Count()) / Convert.ToDouble(maxcertificationcount) * 10; } resume["rating"] = Math.Ceiling(yoe + skillcount + certificatecount); } return(this.Ok(resumeList)); }
public HomeController() { resumeProcessor = new ResumeProcessor(); }