Define input and output
Code needs a concrete input shape and an expected output. “Process Arabic” is not enough; “count surface tokens in one UTF-8 string” is testable.
APPLIED NLP
Learn how inputs, processing steps, outputs, and test cases form a small NLP program before asking Code Builder for starter implementation.
What you will learn
Ask about the concept, worked example, or exercise you are working on now. The tutor supports understanding without replacing the lesson or doing the task for you.
Concept
Code needs a concrete input shape and an expected output. “Process Arabic” is not enough; “count surface tokens in one UTF-8 string” is testable.
Interactive mini-lab
Reveal the same small requirement at four representation levels.
A small pipeline may validate input, normalize only approved forms, tokenize, compute a result, and return it. Each step should have one responsibility.
Interactive mini-lab
What value does this expression return under whitespace splitting?
len('لغة عربية'.split())Make a prediction first.
Interactive mini-lab
Select a line to connect its code operation with the corresponding data concept.
Select a line to inspect it.
A known input and expected output reveal whether the implementation follows the intended rule, especially around punctuation and Arabic clitics.
Interactive mini-lab
Choose the operation that makes each tiny pipeline explicit.
This lesson explains the structure. Code Builder owns starter implementation; NLP Builder owns linguistic-to-computational design when the linguistic rule is not yet defined.
Interactive mini-lab
Never assume a plausible function name is already implemented.
Worked example
Input: «لغة عربية» → split on whitespace → [«لغة», «عربية»] → token count: 2
Guided practice
Design—not execute—a pipeline that counts sentences separated by full stops.
Understanding check
Choose one answer before checking.
Application step
Take a defined computational task to the production implementation tool.
Complete the understanding check to open the optional production-tool application.