Giter Site home page Giter Site logo

hackerhumble / tx-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from textkernel/tx-java

0.0 0.0 0.0 8.5 MB

The official Java SDK for the Sovren v10 API. Includes a resume parser (CV parser), job parser, resume search engine, and resume matching engine.

Home Page: https://sovren.com/resources/

License: Apache License 2.0

Java 100.00%

tx-java's Introduction

sovren-java

GitHub Maven Central build

The official Java SDK for the Sovren v10 API for resume/CV and job parsing, searching, and matching. Supports Java 1.8+.

Installation

Requirements

  • Java 1.8 or later

Gradle Users

Add this dependency to your project's build file:

implementation "com.sovren:sovren-java:1.10.0"

Maven Users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.sovren</groupId>
  <artifactId>sovren-java</artifactId>
  <version>1.10.0</version>
</dependency>

Others

You'll need to manually install the following JARs:

Documentation

For the full API documentation, information about best practices, FAQs, etc. check out our docs site.

You can also refer to the online Javadoc

Examples

For full code examples, see here.

Usage

Creating a SovrenClient

This is the object that you will use to perform API calls. You create it with your account credentials and the SovrenClient makes the raw API calls for you. These credentials can be found in the Sovren Portal. Be sure to select the correct DataCenter for your account.

SovrenClient client = new SovrenClient("12345678", "abcdefghijklmnopqrstuvwxyz", DataCenter.US);

For self-hosted customers, you can create a DataCenter object with your custom URL using the constructor provided on that class.

Handling errors and the SovrenException

Every call to any of the methods in the SovrenClient should be wrapped in a try/catch block. Any 4xx/5xx level errors will cause a SovrenException to be thrown. Sometimes these are a normal and expected part of the Sovren API. For example, if you have a website where users upload resumes, sometimes a user will upload a scanned image as their resume. Sovren does not process these, and will return a 422 Unprocessable Entity response which will throw a SovrenException. You should handle any SovrenException in a way that makes sense in your application.

Additionally, there are SovrenUsableResumeException and SovrenUsableJobException which are thrown when some error/issue occurs in the API, but the response still contains a usable resume/job. For example, if you are geocoding while parsing and there is a geocoding error (which happens after parsing is done), the ParsedResume might still be usable in your application.

How to create a Matching UI session

You may be wondering, "where are the Matching UI endpoints/methods?". We have made the difference between a normal API call (such as Search) and its equivalent Matching UI call extremely trivial. See the following example:

SovrenClient client = new SovrenClient("12345678", "abcdefghijklmnopqrstuvwxyz", DataCenter.US);
List<String> indexesToSearch = ...;
FilterCriteria searchQuery = ...;

SearchResponse searchResponse = client.search(indexesToSearch, searchQuery, null, null);

To generate a Matching UI session with the above Search query, you simply need to call the ui(...) method on the SovrenClient object, pass in any UI settings, and then make the same call as above:

MatchUISettings uiSettings = ...;
GenerateUIResponse uiResponse = client.ui(uiSettings).search(indexesToSearch, searchQuery, null, null);

For every relevant method in the SovrenClient, you can create a Matching UI session for that query by doing the same as above.

tx-java's People

Contributors

sovren-jwesson avatar sovren-ci avatar sovren-zebner avatar prestonfox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.