src/Taggers/StanfordAbstract.php
/**
     * Calls the stanford jar file
     * @throws RuntimeException
     */
Calls the stanford jar file
@throws RuntimeException
Calls the stanford jar file @throws RuntimeException
protected function exec()
    {
        $descriptors = [
           0 => ["pipe", "r"],  
           1 => ["pipe", "w"],  
           2 => ["pipe", "w"] 
        ];
        $process = proc_open($this->getCommand(), $descriptors, $pipes, dirname($this->getJarPath()), []);
        if (is_resource($process)) {
            fclose($pipes[0]); 
            $this->output = stream_get_contents($pipes[1]);
            $this->errors = stream_get_contents($pipes[2]);
            fclose($pipes[2]);
            fclose($pipes[1]);                       
            if(proc_close($process) === -1) {
                throw new RuntimeException($this->errors);
            }
        }            
    }
protected function exec ( ) { $ descriptors = [ 0 => [ " pipe " , " r " ] , 1 => [ " pipe " , " w " ] , 2 => [ " pipe " , " w " ] ] ; $ process = proc_open ( $ this -> getCommand ( ) , $ descriptors , $ pipes , dirname ( $ this -> getJarPath ( ) ) , [ ] ) ; if ( is_resource ( $ process ) ) { fclose ( $ pipes [ 0 ] ) ; $ this -> output = stream_get_contents ( $ pipes [ 1 ] ) ; $ this -> errors = stream_get_contents ( $ pipes [ 2 ] ) ; fclose ( $ pipes [ 2 ] ) ; fclose ( $ pipes [ 1 ] ) ; if ( proc_close ( $ process ) === - 1 ) { throw new RuntimeException ( $ this -> errors ) ; } } }
Calls the stanford jar file
 @throws RuntimeException
Calls the stanford jar file @throws RuntimeException
// stdin is a pipe that the child will read from // stdout is a pipe that the child will write to // stderr is a file to write to // close stdin pipe