Install CAMeL Tools On Ubuntu Linux

Posted on Sun 03 September 2023 in Linux

بِسْمِ ٱللَّٰهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ

This guide will explain how to install the Arabic NLP software called CAMeL Tools on Ubuntu Linux.

CAMeL Tools is a suite of Arabic natural language processing tools developed by the CAMeL Lab at New York University Abu Dhabi.

These instructions are based on the assumption that you have used my LXC base container tutorial.

(Please note that at the time of writing this article CAMeL Tools only supports Python versions 3.7-3.10. The installation of data packages outside of these versions will not work)

Creating & accessing the CAMeL Tools container.

Run this command on your host machine using any terminal software (like Yakuake, Konsole, Xterm or GNOME Terminal)::

sudo lxc-copy -n base -N camel

Now start the container:

sudo lxc-start -n camel

Now attach the container to gain access to it:

sudo lxc-attach -n camel

The container should now be attached as:

root@camel

Installing Ubuntu Packages

Update the container:

apt update && apt upgrade

Install the following required system packages for CAMeL Tools:

apt install rustc cmake libboost-all-dev

Installing CAMeL Tools and data packages:

Install CAMeL Tools:

pip install camel-tools

Depending on the speed of the internet, the installation may take a while due to the volume of large Python packages being installed.

Once completed, now install the data packages. In this example, the morphology data packages are being installed:

camel_data -i light

Use-cases

A guided tour of CAMeL Tools is available online showing many examples, found here.

For my personal usage, the detailed morphological analysis of CAMeL Tools will be used for Arabic study using the Quran and Hadith.

For any errors, send me an email or contact me via Mastodon.


If you don't know how to use RSS and want email updates on my new content, consider Joining my Newsletter

The original content of this blog is a Waqf solely for the Pleasure of Allah. You are hereby granted full permission to copy, download, distribute, publish and share this content without modification under condition that full attribution is given to this author by creating a link either above or below the content that links back to the original source of the content. For any questions or ambiguity, you are requested to contact me via email for clarification.