Pscws4 is used for pscws4 word segmentation. why do we print only the numbers in the text and print them without word segmentation? the webpage code is utf8function get_tags_arr ($ title) {require pscws4pscws4. class. php; $ pscws new PSCWS4 (); $ pscws-& gt; se about pscws4 word segmentation
Pscws4 is used for word segmentation. Why does one print only the numbers in the text and print them without word segmentation? the webpage code is utf8.
Function get_tags_arr ($ title ){
Require 'pscws4/pscws4.class. php ';
$ Pscws = new PSCWS4 ();
$ Pscws-> set_dict ('scws/dict. utf8.xdb ');
$ Pscws-> set_rule ('scws/rules. utf8.ini ');
$ Pscws-> set_ignore (true );
$ Pscws-> send_text ($ title );
$ Words = $ pscws-> get_tops (10 );
$ Tags = array ();
Foreach ($ words as $ val ){
$ Tags [] = $ val ['word'];
}
$ Pscws-> close ();
Return $ tags;
}
------------------------------------
$ Title = and abide by the relevant laws and regulations of the People's Republic of China, 21343 respecting online ethics;
$ Tags = get_tags_arr ($ title );
Echo print_r ($ tags );
Why do I print only the numbers in it?
------ Solution --------------------
$ Pscws-> set_dict ('scws/dict. utf8.xdb ');
$ Pscws-> set_rule ('scws/rules. utf8.ini ');
Are these two file names and paths correct?
For php 5.3 and later, there will be a Redefining already defined constructor error. enabling the error prompt does not affect normal operation.