<?php



namespace ln\services;


use Lizhichao\Word\VicWord;

class VicWordService
{

    public function getWord($str)
    {
        ini_set('memory_limit', '-1');
        $vicWord = new VicWord();
        $word = $vicWord->getAutoWord($str);
        $data = [];
        foreach ($word as $item) {
            if ($item[2] === '0' || is_numeric($item[0])) {
                continue;
            }
            $data[] = $item[0];
        }
        $data[] = $str;
        return $data;
    }
}