Tagging API

Tag any text with only few lines of code.

The Text Tagging API is a service that addresses a wide range of business-critical needs. Our most advanced AI-powered taggers give you the ability to assign relevant tags to all documents of your databases automatically. Tagging API quickly brings out new functionalities for any search engine, from predicting missing skills in resumes to delivering crucial insights on your data.

This article will look at how to interact with the endpoint 🧠 Tag a Text with a few queries sent through our public HrFlow.ai Postman collection. The final goal is to leverage the tags provided by our API to get better search results.

πŸ“˜

Prerequisites

  1. ✨ Create a Workspace
  2. πŸ”‘ Get your API Key
  3. 🧠 Activate Text Tagging API
  4. Download HrFlow.ai's Postman

πŸ“˜

API Endpoint

Get more information about the endpoint 🧠 Tag a Text.

Step 1: Configure your Postman Environment

Following the steps from the HrFlow.ai Postman publication will make you land on this page:

First, click on the "Environments" tab on the left side of your Postman window. Then, fill in the Empty - Environment template with the correct values. The compulsory variables for Tagging are:

Finally, save the environment and ensure that you selected Empty - Environment as your current environment.

2880

Postman Environment Configuration

Step 2: Get your First Tagging Results

Now that the environment is selected, we can test our first request to Tag a Text. To do so, fill in your body parameters in a raw format:

  • [MANDATORY] text: the text for which you want to assign some tags.
  • [MANDATORY] algorithm_key: the tagger's name can be one of the following
Algorithm KeyTagging SetIdentifiers Set
tagger-rome-familyGrand domaines of job the French ROMEROME Grand domaines codes
tagger-rome-subfamilyDomaines of job the French ROMEROME Domaines codes
tagger-rome-categoryMetiers of job the French ROMEROME Metiers codes
tagger-rome-jobtitleAppellations of job the French ROMEOGR codes
tagger-hrflow-skillsPredicts missing hard skills and soft skillsIdentifiers defined by HrFlow.ai
tagger-hrflow-labelsPredict any output given a list of texts and labelsIdentifiers defined by HrFlow.ai
  • [OPTIONNAL] top_n: number of tags returned through the API. Defaults to 1.
  • [OPTIONNAL] output_lang: the returned tags will be either in fr (French) or en (English). Defaults to fr.

πŸ“˜

Current status on taggers development

We are actively working on releasing more taggers to the public. So keep an eye on our blog (https://blog.hrflow.ai/) and our product notes (https://updates.hrflow.ai/) to stay in touch with our latest taggers.

Let's break down the Tagging request's response. The field data of the response object contains three lists with the same length:

  • predictions: AI prediction scores sorted in descending order
  • tags: tags associated with the prediction scores.
  • ids: unique identifiers associated to each tag

πŸ“˜

How to read the values in predictions ?

Both predictions, tags and ids lists are synchronized. The n-th prediction is associated with the n-th tag.

In our example above:

  • Installation and maintenance scores at 0.53517
  • Transport and logistics scores at 0.20379
  • Industry scores at 0.08764

Advanced Topics

1. Try Tagging in your Favorite Programming Language

Once you have tried the request in Postman, you can directly convert it to work with your favorite programming language. Here is an example with Python and the module Requests.

import requests
import json

url = "https://api.hrflow.ai/v1/text/tagging"

payload = json.dumps({
  "algorithm_key": "tagger-rome-family",
  "text": "Our client, specialized in the sale and mechanics of heavy goods vehicles with a national network, is looking for heavy goods vehicle mechanics for its sites based in Arras, Lens and Douai.",
  "texts": [],
  "top_n": 3,
  "output_lang": "en",
  "labels":[]
})
headers = {
  'X-USER-EMAIL': 'FILL THIS',
  'X-API-KEY': 'FILL THIS',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)