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.")
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.

