AlKhalil Morpho Sys is a morphosyntactic analyzer of standard Arabic words. It analyses both non diacritized Arabic words and partially or completely diacritized words. The analysis is done out of context and the results for a given word are:

  • the possible diacritization forms of the word,
  • for each possible diacritization form, the system provides,
  • the segmentation of the word in proclitic + stem + enclitic,
  • its POS tag,
  • its syntactic state (case for nouns and mood for verbs),
  • its lemma and its stem accompanied by their patterns;
  • its root (only if the word is a derivative noun or derivative verb)

For further details, please check the following paper :

  • Boudchiche, M.; Mazroui, A.; Ould Abdallahi Ould Bebah, M.; Lakhouaja, A.; Boudlal, A.;2017. “AlKhalil Morpho Sys 2: A robust Arabic morpho-syntactic analyzer”. Journal of King Saud University – Computer and Information Sciences 29, 141–146. https://doi.org/10.1016/j.jksuci.2016.05.002.

Source

You have the opportunity to download the source code for AlKhalil Morpho Sys.

Download Source

Jar

You have the opportunity to download the jar file for AlKhalil Morpho Sys.

Download Jar

Rest API

You have the opportunity to download the Rest API for AlKhalil Morpho Sys.

Download API

ALKHALIL Demofor AlKhalil Morpho Sys




38/1000




RESTful Web API Code Snippets for AlKhalil Morpho Sys

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 AlKhalil Morpho Sys 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:8081/api/alkhalil";
            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:8081/api/alkhalil"
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!