Home  >  Article  >  Backend Development  >  10 recommended articles on Chinese and English sentence segmentation

10 recommended articles on Chinese and English sentence segmentation

黄舟
黄舟Original
2017-06-14 14:01:071680browse

Ideas: 1. Encode the string with urlencode. 2. Use regular expressions to search for sentences ending with transcoded punctuation. 3.urldecode decoded data ​                                                                                         echo urlencode(',-.-?-!-;-,-.-?-!-;-...').PHP_EOL;$str = "Code snippet,code snippet.code snippet?code snippet !Code snippet; code snippet, code snippet. Code snippet! Code snippet; code snippet..."; echo $str; $str = urlencode($str); preg_match_all ('/(.*? )(\\.{3,6}|%2C|\\.|%3F|%21|%3B|%EF%BC%8C|%E3%80%82|%EF%BC%9F|%EF %B

1. Chinese and English sentences without garbled characters - PHP

Introduction: Chinese and English sentences without garbled characters - PHP

2. Chinese and English sentences without garbled characters_PHP tutorial

##Introduction: Chinese and English sentences without garbled characters Ideas: 1. Split the characters. The string is encoded with urlencode. 2. Use regular expressions to search for statements ending with transcoded punctuation. 3. urldecode decoded data [Code] [PHP] Code 1 echo urlencode(,-.-?-!-;-,-.

3. Chinese and English sentences without garbled characters

##Introduction: Ideas: 1. Encode the string with urlencode 2. .Use regular expressions to search for sentences ending with transcoded punctuation. 3. No source code and demonstration for urldecode decoding data: Source code source demonstration source echo urlencode(',-.-?-!-;-,-.-?-!- ;-...').PHP_EOL;$str = "Code snippet,code snippet.code snippet?code snippet!code snippet;code

##4.

PHP Chinese and English sentence segmentation without garbled characters

10 recommended articles on Chinese and English sentence segmentation Introduction: Ideas: 1. Encode the string with urlencode 2. .Use regular expressions to search for sentences ending with transcoded punctuation. 3.urldecode decoded data http://blog.ddian.cn/?post=833

The above is the detailed content of 10 recommended articles on Chinese and English sentence segmentation. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn