https://github.com/textkernel/tx-java
The official Java SDK for the Textkernel Tx v10 API. Includes a resume parser (CV parser), job parser, resume search engine, and resume matching engine.
https://github.com/textkernel/tx-java
cv cv-parser cv-parsing java job job-parser job-parsing matching parse-resume parser parsing resume resume-parser resume-parsing sdk searching textkernel tx
Last synced: 8 months ago
JSON representation
The official Java SDK for the Textkernel Tx v10 API. Includes a resume parser (CV parser), job parser, resume search engine, and resume matching engine.
- Host: GitHub
- URL: https://github.com/textkernel/tx-java
- Owner: textkernel
- License: apache-2.0
- Created: 2020-11-29T20:38:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-02T16:12:33.000Z (12 months ago)
- Last Synced: 2025-04-17T14:37:13.048Z (8 months ago)
- Topics: cv, cv-parser, cv-parsing, java, job, job-parser, job-parsing, matching, parse-resume, parser, parsing, resume, resume-parser, resume-parsing, sdk, searching, textkernel, tx
- Language: Java
- Homepage: https://developer.textkernel.com/tx-platform
- Size: 11.9 MB
- Stars: 12
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tx-java


[](https://github.com/textkernel/tx-java/actions/workflows/build.yml)
The official Java SDK for the Textkernel Tx 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.textkernel:tx-java:2.3.3"
```
### Maven Users
Add this dependency to your project's POM:
```xml
com.textkernel
tx-java
2.3.3
```
### Others
You'll need to manually install the following JARs:
- The Textkernel Tx JAR from https://repo1.maven.org/maven2/com/textkernel/tx-java/2.3.3/tx-java-2.3.3.jar
- [Google Gson][gson_url] from https://repo1.maven.org/maven2/com/google/code/gson/gson/2.9.0/gson-2.9.0.jar
- [Square OkHttp][okhttp_url] from https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/4.12.0/okhttp-4.12.0.jar
## Documentation
For the full API documentation, information about best practices, FAQs, etc. check out our [docs site][api-docs].
You can also refer to the [online Javadoc][javadoc_url]
## Examples
For full code examples, see [here][examples].
## Usage
### Creating a `TxClient`
This is the object that you will use to perform API calls. You create it with your account credentials and the `TxClient` makes the raw API calls for you. These credentials can be found in the [Tx Console][portal]. Be sure to select the correct `DataCenter` for your account.
```java
TxClient client = new TxClient("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 `TxException`
Every call to any of the methods in the `TxClient` should be wrapped in a `try/catch` block. Any 4xx/5xx level errors will cause a `TxException` to be thrown. Sometimes these are a normal and expected part of the Tx API. For example, if you have a website where users upload resumes, sometimes a user will upload a scanned image as their resume. Textkernel does not process these, and will return a `422 Unprocessable Entity` response which will throw a `TxException`. You should handle any `TxException` in a way that makes sense in your application.
Additionally, there are `TxUsableResumeException` and `TxUsableJobException` 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:
```java
TxClient client = new TxClient("12345678", "abcdefghijklmnopqrstuvwxyz", DataCenter.US);
List 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 `TxClient` object, pass in any UI settings, and then make the same call as above:
```java
MatchUISettings uiSettings = ...;
GenerateUIResponse uiResponse = client.ui(uiSettings).search(indexesToSearch, searchQuery, null, null);
```
For every relevant method in the `TxClient`, you can create a Matching UI session for that query by doing the same as above.
[javadoc_url]: https://textkernel.github.io/tx-java/
[gson_url]: https://github.com/google/gson
[okhttp_url]: https://github.com/square/okhttp
[examples]: https://github.com/textkernel/tx-java/tree/master/examples
[portal]: https://cloud.textkernel.com/tx/console
[api-docs]: https://developer.textkernel.com/tx-platform/v10/overview/