- Notifications
You must be signed in to change notification settings - Fork78
A suite of Arabic natural language processing tools developed by the CAMeL Lab at New York University Abu Dhabi.
License
CAMeL-Lab/camel_tools
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation

CAMeL Tools is suite of Arabic natural language processing tools developed bytheCAMeL LabatNew York University Abu Dhabi.
Please useGitHub Issuesto report a bug or if you need help using CAMeL Tools.
You will need Python 3.8 - 3.12 (64-bit) as well asthe Rust compiler installed.
You will need to install some additional dependencies on Linux and macOS.Primarily CMake, and Boost.
On Ubuntu/Debian you can install these dependencies by running:
sudo apt-get install cmake libboost-all-dev
On macOS you can install them using Homewbrew by running:
brew install cmake boost
pip install camel-tools# or run the following if you already have camel_tools installedpip install camel-tools --upgradeOn Apple silicon Macs you may have to run the following instead:
CMAKE_OSX_ARCHITECTURES=arm64 pip install camel-tools# or run the following if you already have camel_tools installedCMAKE_OSX_ARCHITECTURES=arm64 pip install camel-tools --upgrade# Clone the repogit clone https://github.com/CAMeL-Lab/camel_tools.gitcd camel_tools# Install from sourcepip install.# or run the following if you already have camel_tools installedpip install --upgrade.
To install the datasets required by CAMeL Tools components run one of thefollowing:
# To install all datasetscamel_data -i all# or just the datasets for morphology and MLE disambiguation onlycamel_data -i light# or just the default datasets for each componentcamel_data -i defaults
SeeAvailable Packagesfor a list of all available datasets.
By default, data is stored in~/.camel_tools.Alternatively, if you would like to install the data in a different location,you need to set theCAMELTOOLS_DATA environment variable to the desiredpath.
Add the following to your.bashrc,.zshrc,.profile,etc:
export CAMELTOOLS_DATA=/path/to/camel_tools_dataNote: CAMeL Tools has been tested on Windows 10. The Dialect Identificationcomponent is not available on Windows at this time.
pip install camel-tools -f https://download.pytorch.org/whl/torch_stable.html# or run the following if you already have camel_tools installedpip install --upgrade -f https://download.pytorch.org/whl/torch_stable.html camel-tools# Clone the repogit clone https://github.com/CAMeL-Lab/camel_tools.gitcd camel_tools# Install from sourcepip install -f https://download.pytorch.org/whl/torch_stable.html.pip install --upgrade -f https://download.pytorch.org/whl/torch_stable.html.
To install the data packages required by CAMeL Tools components, run one of thefollowing commands:
# To install all datasetscamel_data -i all# or just the datasets for morphology and MLE disambiguation onlycamel_data -i light# or just the default datasets for each componentcamel_data -i defaults
SeeAvailable Packagesfor a list of all available datasets.
By default, data is stored inC:\Users\your_user_name\AppData\Roaming\camel_tools.Alternatively, if you would like to install the data in a different location,you need to set theCAMELTOOLS_DATA environment variable to the desiredpath. Below are the instructions to do so (on Windows 10):
- Press theWindows button and type
env. - Click onEdit the system environment variables (Control panel).
- Click on theEnvironment Variables... button.
- Click on theNew... button under theUser variables panel.
- Type
CAMELTOOLS_DATAin theVariable name input box and thedesired data path inVariable value. Alternatively, you can browse for thedata directory by clicking on theBrowse Directory... button. - ClickOK on all the opened windows.
To get started, you can follow alongthe Guided Tourfor a quick overview of the components provided by CAMeL Tools.
You can find thefull online documentation here for boththe command-line tools and the Python API.
Alternatively, you can build your own local copy of the documentation asfollows:
# Install dependenciespip install sphinx myst-parser sphinx-rtd-theme# Go to docs subdirectorycd docs# Build HTML docsmake html
This should compile all the HTML documentation in todocs/build/html.
If you find CAMeL Tools useful in your research, please citeour paper:
@inproceedings{obeid-etal-2020-camel,title ="{CAM}e{L} Tools: An Open Source Python Toolkit for {A}rabic Natural Language Processing",author ="Obeid, Ossama and Zalmout, Nasser and Khalifa, Salam and Taji, Dima and Oudah, Mai and Alhafni, Bashar and Inoue, Go and Eryani, Fadhl and Erdmann, Alexander and Habash, Nizar",booktitle ="Proceedings of the 12th Language Resources and Evaluation Conference",month = may,year ="2020",address ="Marseille, France",publisher ="European Language Resources Association",url ="https://www.aclweb.org/anthology/2020.lrec-1.868",pages ="7022--7032",abstract ="We present CAMeL Tools, a collection of open-source tools for Arabic natural language processing in Python. CAMeL Tools currently provides utilities for pre-processing, morphological modeling, Dialect Identification, Named Entity Recognition and Sentiment Analysis. In this paper, we describe the design of CAMeL Tools and the functionalities it provides.",language ="English",ISBN ="979-10-95546-34-4",}
CAMeL Tools is available under the MIT license.See theLICENSE filefor more info.
If you would like to contribute to CAMeL Tools, please read theCONTRIBUTE.rstfile.
About
A suite of Arabic natural language processing tools developed by the CAMeL Lab at New York University Abu Dhabi.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.