Natural Language Processing
Make the space visible
What kind of reconstruction does the marker support?
Botie should retain word-separation information while building text pieces. The supplied normalised input uses a visible marker to keep spaces in the piece stream.
BOTIE
The inputs we are comparing
Normalised text
Example 1
red cat
Example 2
blue dog
Marker-aware vocabulary
Example 1
{
"▁red": 1,
"▁cat": 2
}Example 2
{
"▁blue": 3,
"▁dog": 4
}Result for example 1
- 0▁red
- 1▁cat
A word repeats after a space
This check uses the pieces from “Let the vocabulary see space markers”.
BOTIE
- Normalised text
cat cat
- Marker-aware vocabulary
{ "▁cat": 12 }
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
Why is the beginning marker needed even though there was no leading space in the supplied text?
A tokenizer's normalisation and boundary conventions jointly determine the representation it can reconstruct.
This demonstrates explicit space markers on already-normalised input. Full SentencePiece training and normalisation contain additional behaviour.
Work through the Python challenges →