Recognizing entities in XLIFF content

Introduction

In this tutorial you can learn how to spot entities in a XLIFF file. It could be useful in a localization scenario where you may want to enrich the text going beyond the mere translation.

Pre-requisites

A XLIFF 1.2 file with a source language supported by FREME-NER service.
Supported languages are:

Perform Named Entity Recognition

Insert the XLIFF 1.2 file content in the text area. Then specify the language and press the Try it out! button. The named entity recognition will be performed by submitting the text to the FREME-NER service against the dbpedia dataset.

XLIFF file content for processing
Paste here the XLIFF file content that should be processed. This is sent as body of the request.


Query string parameter language
Enter the source language used in the XLIFF file


Query string parameter informat
Specifies the format of the input data. In this example we submit a XLIFF 1.2 file so we set this parameter to "application/x-xliff+xml"


Query string parameter outformat
Specifies the format of the data returned by FREME. Since we want the get the results in a simple CSV format, we will choose csv.


Response

		
	

Simplified Output

This is the same example as above, only, in this example the results will be returned in a simplified format, in CSV.

Insert the XLIFF 1.2 file content in the text area. Then specify the language and press the Try it out! button. The named entity recognition will be performed by submitting the text to the FREME-NER service against the dbpedia dataset.

XLIFF file content for processing
Paste here the XLIFF file content that should be processed. This is sent as body of the request.


Query string parameter language
Enter the source language used in the XLIFF file


Query string parameter informat
Specifies the format of the input data. In this example we submit a XLIFF 1.2 file so we set this parameter to "application/x-xliff+xml"


Query string parameter outformat
Specifies the format of the data returned by FREME. You can choose between "turtle" and "json-ld" formats.


Filter name
Specify the name of the filter which will be used to simplify the results. E.g. "filter=extract-entities-only" - it returns the results in CSV.


Response

		
	

cURL Examples

Below you can find an example of a cURL command. Replace Entity.xlf with the path of your XLIFF file.

curl -X POST --header "Content-Type: application/x-xliff+xml" -d@Entity.xlf "https://api.freme-project.eu/current/e-entity/freme-ner/documents?outformat=turtle&language=en&dataset=dbpedia&mode=all" -v