src/Cortex/Input.php
protected function cleanOriginalSource()
    {
        $patterns     = synapse()->memory->substitute()->keys()->all();
        $replacements = synapse()->memory->substitute()->values()->all();

        $this->source = mb_strtolower($this->original);
        $this->source = preg_replace($patterns, $replacements, $this->source);
        $this->source = preg_replace('/[^\pL\d\s]+/u', '', $this->source);
        $this->source = remove_whitespace($this->source);
    }
protected function cleanOriginalSource()
    {
        $patterns     = synapse()->memory->substitute()->keys()->all();
        $replacements = synapse()->memory->substitute()->values()->all();

        $this->source = mb_strtolower($this->original);
        $this->source = preg_replace($patterns, $replacements, $this->source);
        $this->source = preg_replace('/[^\pL\d\s]+/u', '', $this->source);
        $this->source = remove_whitespace($this->source);
    }
protected function cleanOriginalSource ( ) { $ patterns = synapse ( ) -> memory -> substitute ( ) -> keys ( ) -> all ( ) ; $ replacements = synapse ( ) -> memory -> substitute ( ) -> values ( ) -> all ( ) ; $ this -> source = mb_strtolower ( $ this -> original ) ; $ this -> source = preg_replace ( $ patterns , $ replacements , $ this -> source ) ; $ this -> source = preg_replace ( '/[^\pL\d\s]+/u' , '' , $ this -> source ) ; $ this -> source = remove_whitespace ( $ this -> source ) ; }
Clean the source input, so its in a state easily readable
by the interpreter.

@return void
Clean the source input so its in a state easily readable by the interpreter .