示例#1
0
        /// <summary>
        /// Create a Matching UI session to score one or more target documents against a source resume
        /// </summary>
        /// <param name="sovClient">The SovrenClient</param>
        /// <param name="sourceResume">The source resume</param>
        /// <param name="targetDocuments">The target resumes/jobs</param>
        /// <param name="preferredWeights">
        /// The preferred category weights for scoring the results. If none are provided,
        /// Sovren will determine the best values based on the source resume
        /// </param>
        /// <param name="settings">Settings to be used for this scoring request</param>
        /// <typeparam name="TTarget">Either <see cref="ParsedResumeWithId"/> or <see cref="ParsedJobWithId"/></typeparam>
        /// <exception cref="SovrenException">Thrown when an API error occurs</exception>
        public static async Task <GenerateUIResponse> BimetricScore <TTarget>(
            this SovrenClientWithUI sovClient,
            ParsedResumeWithId sourceResume,
            List <TTarget> targetDocuments,
            CategoryWeights preferredWeights = null,
            SearchMatchSettings settings     = null) where TTarget : IParsedDocWithId
        {
            BimetricScoreResumeRequest   request   = sovClient.InternalClient.CreateRequest(sourceResume, targetDocuments, preferredWeights, settings);
            UIBimetricScoreResumeRequest uiRequest = new UIBimetricScoreResumeRequest(request, sovClient.UISessionOptions);

            return(await sovClient.InternalClient.UIBimetricScore(uiRequest));
        }
示例#2
0
        /// <summary>
        /// Create a Matching UI session to view a single resume from a Bimetric Score API response
        /// </summary>
        /// <param name="sovClient">The SovrenClient</param>
        /// <param name="bimetricResponse">The Bimetric Score API response containing the result you want to view</param>
        /// <param name="resume">The specific resume/id in the result set that you want to view</param>
        /// <param name="sourceDocType">The type of document this result was scored against</param>
        /// <param name="htmlResume">Optionally, the HTML resume to display in the details view</param>
        /// <exception cref="SovrenException">Thrown when an API error occurs</exception>
        public static async Task <GenerateUIResponse> ViewDetails(
            this SovrenClientWithUI sovClient,
            BimetricScoreResponseValue bimetricResponse,
            ParsedResumeWithId resume,
            Models.Matching.IndexType sourceDocType,
            string htmlResume = null)
        {
            BimetricScoreResumeDetails details = new BimetricScoreResumeDetails
            {
                Result = bimetricResponse.Matches.Single(m => m.Id == resume.Id),
                AppliedCategoryWeights = bimetricResponse.AppliedCategoryWeights,
                ResumeData             = resume.ResumeData,
                SourceDocumentType     = sourceDocType,
                HtmlDocument           = htmlResume
            };

            UIBimetricScoreResumeDetailsRequest uiRequest = new UIBimetricScoreResumeDetailsRequest(details, sovClient.UISessionOptions?.UIOptions);

            return(await sovClient.InternalClient.UIViewDetails(uiRequest));
        }
示例#3
0
        static TestBase()
        {
            Credentials data = JsonSerializer.Deserialize <Credentials>(File.ReadAllText("credentials.json"));

            GeocodeCredentials = new GeocodeCredentials()
            {
                Provider    = GeocodeProvider.Google,
                ProviderKey = data.GeocodeProviderKey
            };

            Client = new SovrenClient(data.AccountId, data.ServiceKey, new DataCenter("https://staging-rest.resumeparsing.com", "v10", true));

            ParseResumeResponseValue parseResumeResponseValue = Client.ParseResume(new ParseRequest(TestData.Resume)).Result.Value;

            TestParsedResume = parseResumeResponseValue.ResumeData;

            parseResumeResponseValue    = Client.ParseResume(new ParseRequest(TestData.ResumeWithAddress)).Result.Value;
            TestParsedResumeWithAddress = parseResumeResponseValue.ResumeData;

            ParseJobResponseValue parseJobResponseValue = Client.ParseJob(new ParseRequest(TestData.JobOrder)).Result.Value;

            TestParsedJob = parseJobResponseValue.JobData;

            parseJobResponseValue    = Client.ParseJob(new ParseRequest(TestData.JobOrderWithAddress)).Result.Value;
            TestParsedJobWithAddress = parseJobResponseValue.JobData;

            parseJobResponseValue = Client.ParseJob(new ParseRequest(TestData.JobOrderTech)).Result.Value;
            TestParsedJobTech     = parseJobResponseValue.JobData;

            TestParsedJobWithId = new ParsedJobWithId()
            {
                Id      = "1",
                JobData = TestParsedJob
            };

            TestParsedResumeWithId = new ParsedResumeWithId()
            {
                Id         = "1",
                ResumeData = TestParsedResume
            };
        }