Alkhalil Lemmatizer assigns to each word of an Arabic sentence, a single lemma taking into account the word context. The proposed system comprises two modules. The first one consists of an analysis out of context, based on the morphosyntactic analyzer Alkhalil Morpho Sys 2. In the second module, we use the context to identify the correct lemma from the potential lemmas of the word obtained by the first module. For this purpose, we use a statistical technique based on the hidden Markov models, where the observations are the words of the sentence, and the lemmas represent the hidden states. We validate this approach using a labelled corpus consisting of about 500,000 words. The lemmatizer gives the correct lemma in more than 99.24% in the training set and about 94.45% of the words in the test set.

For further details, please check the following paper :

  • M. Boudchiche and A. Mazroui, . “Spline functions for Arabic morphological disambiguation, Applied Computing and Informatics, https://doi.org/10.1016/j.aci.2020.02.002.
  • M. Boudchiche, A. Mazroui, . “A hybrid approach for Arabic lemmatization”, Int. J. Speech Technol., 2018, DOI 10.1007/s10772-018-9528-3.

Source

You have the opportunity to download the source code for lemmatization from Alkhalil official website.

Download Source

Jar

You have the opportunity to download the jar file for lemmatization from Alkhalil official website.

Download Jar

Rest API

You have the opportunity to download the Rest API for the Lemmetizer.

Download API

ALKHALIL Demofor Lemmatization Module




38/1000




RESTful Web API Code Snippets for Lemmatization 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 Lemmatization module.


import requests

# Get result in text format
url = "http://oujda-nlp-team.net:8080/api/lemma"
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.")

# Get result in JSON format
# text = "##############################"
# url = "http://oujda-nlp-team.net:8080/api/Apilmm/" + text
# response = requests.get(url)
# if response.status_code == 200:
#     result = response.text
#     print(f"Result in JSON format: {result}")
# else:
#     print("Error during API request.")
								
Copied!