| Conditions | 3 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 64 | public function tokenize( $string ) { |
||
| 65 | |||
| 66 | if ( $this->tokenizer !== null ) { |
||
| 67 | $string = implode( " ", $this->tokenizer->tokenize( $string ) ); |
||
| 68 | } |
||
| 69 | |||
| 70 | $pattern = str_replace( |
||
| 71 | $this->patternExemption, |
||
| 72 | '', |
||
| 73 | '_-・,、;:!?.。…◆★◇□■()【】《》〈〉;:“”"〃'`[]{}「」@*\/&#%`^+<=>|~≪≫─$"_\-・,、;:!?.。()[\]{}「」@*\/&#%`^+<=>|~«»$"\s' |
||
| 74 | ); |
||
| 75 | |||
| 76 | $result = preg_split( '/[' . $pattern . ']+/u', $string, null, PREG_SPLIT_NO_EMPTY ); |
||
| 77 | |||
| 78 | if ( $result === false ) { |
||
| 79 | $result = array(); |
||
| 80 | } |
||
| 81 | |||
| 82 | return $result; |
||
| 83 | } |
||
| 84 | |||
| 86 |