This POS tagger was developed for Arabic texts taking into account the agglutination structure very present in the Arabic language. It uses a very rich tagset containing compound tags that provide syntactic information on the clitics attached to words. This system uses a probabilistic model and the Alkhalil_Morpho_Sys analyzer to identify the correct tags in the context. To build the model, we used 90% of the Nemlar labeled corpus, consisting of approximately 500,000 words, during the training phase, and the remaining 10% was devoted to the testing phase. The precision obtained is around 94%.

For further details, please check the following paper :

  • Ababou, N.; Mazroui. A.; “A hybrid Arabic POS tagging for simple and compound morphosyntactic tags”. International Journal of Speech Technology 2016, vol. 19, no 2, p. 289-302.

Source

You have the opportunity to download the source code for POS-TAGGER from Alkhalil official website.

Download Source

Jar

You have the opportunity to download the jar file for POS-TAGGER from Alkhalil official website.

Download Jar

Rest API

You have the opportunity to download the Rest API for POS-TAGGER.

Download API

ALKHALIL Demofor POS-TAGGER Module




38/1000




RESTful Web API Code Snippets for POS-TAGGER Module

API code examples in popular programming languages such as Java, Python, and JavaScript. These code snippets allow you to effectively utilize the API and integrate it into your projects for the POS-TAGGER module.

						
				
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;

public class Exemple {

    public static void main(String[] args) {
        try {
            String baseUrl = "http://oujda-nlp-team.net:8082/api/pos/";
            String text = "##################################";
            // Encodes the text parameter to be included as a query parameter
            String encodedText = URLEncoder.encode(text, StandardCharsets.UTF_8.toString());
            String apiUrl = baseUrl + "?textinput=" + encodedText;

            URL apiURL = new URL(apiUrl);
            HttpURLConnection connection = (HttpURLConnection) apiURL.openConnection();
            connection.setRequestMethod("POST");
            connection.setRequestProperty("Content-Type", "application/json");

            try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
                StringBuilder response = new StringBuilder();
                String line;
                while ((line = reader.readLine()) != null) {
                    response.append(line);
                }
                System.out.println(response.toString());
            } finally {
                connection.disconnect();
            }
        } catch (UnsupportedEncodingException | MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
						
						
                            
								
import requests

# Get result in XML format
url = "http://oujda-nlp-team.net:8082/api/pos"
text_input = "##############################"

data = {"textinput": text_input}
response = requests.post(url, data=data)

if response.status_code == 200:
    result = response.text
    print(f"Result in text format: {result}")
else:
    print("Error during API request.")
										
								
Copied!