Data Source Management
In the normal course of translation and localization, there will be times where you need to verify the existence of a specific sentence/word/phrase in your Data Source. Whether that is because the target language has changed how it uses the word in the course of a languages evolution or if you simply want to verify that the Term your organization uses to describe a specific product is correct, this guide will show you how to look things up in a LILT Data Source without having to pull down the whole file.
In this guide you will learn how to:
Things you will need:
- API Key - All requests throught the LILT API use the API Key to authenticate.
Query a Data Source
Querying a Data Source in LILT uses a string lookup to pull specific segments that fit the source provided. In this example the string we will use is "LILT Create". Please note that the n in the query is a limit on the number of segments to pull. See the API docs for more info
curl -X GET https://api.lilt.com/v2/memories/query?key=API_KEY&id=MEMORY_ID&query="LILT Create is a Generative AI tool."&n=100
With that we would expect to see a response containing no more than 100 segments that fit the query criteria.
[
{
"source": "LILT Create is a Generative AI tool.",
"target": "LILT Create ist ein generatives KI-Tool.",
"score": 100,
"metadata": "object"
}
]
In this case, there was a single segment that fit the criteria with a score of 100. The score determines how close the system believes the query provided is close to what you are looking for. Anything less than 75 is automatically discarded.
Note
The query is a useful tool for verifying small things and ensuring certain phrases are in the right place. Feel free to explore the other Data Source End points in the API Specification.