public function applyTransformation(TransformationInterface $transform)
    {
        $null_filter = function ($token) {
            return $token!==null;
        };

        $this->word = $transform->transform($this->word);
        // array_values for re-indexing
        $this->before = array_values(
            array_filter(
                array_map(
                    array($transform,"transform"),
                    $this->before
                ),
                $null_filter
            )
        );
        $this->after = array_values(
            array_filter(
                array_map(
                    array($transform,"transform"),
                    $this->after
                ),
                $null_filter
            )
        );
    }