Experiment space

Arabic NLP Playground

Build a processing Pipeline of several operations on the same text, order them, run them, and export every stage.

What is this module?

Real language processing systems are chains of steps: cleaning, then normalization, then tokenization, then stemming, then representation, then a model. The order of the steps affects the result; removing stop words before normalization may leave «إن» and «ان» unremoved. This space lets you assemble the chain yourself and see the effect of each step.

Tool: Experiment space

Runs in your browser (JavaScript) — your text is not sent anywhere
Settings

How does the tool work?

  • Choose operations and add them to the chain.
  • Change the order with the arrows or delete a step.
  • Run the chain: each step takes the output of the one before it.
  • The analysis steps (tokenization, frequency, keywords, stemming, sentiment) run on the text after the cleaning steps.

How to read the results?

The diagram above the results represents the chain, and below it there is a card for each stage. You can copy the results or download them as TXT or JSON.

Limitations and accuracy limits

All steps run in the browser with the original engine, so their limits are those of the original modules.

This tool's results are educational: they show how the algorithm works step by step, and they are not presented as confirmed scientific results.

Frequently asked questions

What is the Playground?

A place to build your own processing pipeline: you choose the operations and order them by dragging or with buttons, run them on a text, see the result of each stage, then export the pipeline as JSON or as teaching Python code.

Can the processing pipeline be saved?

It is saved in your browser only (localStorage) and is not sent to the server. You can export it as a JSON file and import it later.

What is the Python code the lab exports?

Teaching code that repeats the same steps with the re library and simple functions, with comments suggesting real libraries such as PyArabic or CAMeL Tools for the advanced steps. Check any library's licence before using it.

Why does the result change when the order of operations changes?

Because each operation works on the output of the previous one. For example, stemming before removing stopwords turns some stopwords into forms that are not in the list, so they are not removed.

Which operations are available in the playground?

All thirteen preprocessing operations, plus tokenization, stopword removal, light stemming and ISRI.

Can two pipelines be compared?

Yes, from the "Compare" page you can run two different configurations on the same text and see the difference in the number of words and unique words.

Exercises and challenges

Beginner Hands-on in the lab

Building a pipeline

Build a pipeline of: cleaning, removing diacritics, unifying alef, removing stopwords, light stemming. Run it on any paragraph and export it as JSON.

Hint

The export button below the pipeline.

Show solution

A JSON file is downloaded with the list of operations in order and their options.

Intermediate Hands-on in the lab

A pipeline for sentiment

Load "A processing pipeline for sentiment analysis" and explain why it does not include stopword removal.

Hint

Negation.

Show solution

Because removing them removes negation particles and changes the polarity.

Advanced Hands-on in the lab

Python code

Export your pipeline as Python code and run it on your computer. Does the result match the lab's result?

Hint

The stopword list may differ.

Show solution

The simple operations should match. Stemming may differ if you use a different library, so the code says so in its comments.

Related sections of the site