<commit_before><?php
namespace wcf\system\message\censorship;
use wcf\system\SingletonFactory;
use wcf\util\StringUtil;

/**
 * Finds censored words.
 * 
 * @author	<NAME>
 * @copyright	2001-2015 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	com.woltlab.wcf
 * @subpackage	system.message.censorship
 * @category	Community Framework
 */
class Censorship extends SingletonFactory {
	/**
	 * censored words
	 * @var	array<string>
	 */
	protected $censoredWords = array();
	
	/**
	 * word delimiters
	 * @var	string
	 */
	protected $delimiters = '[\s\x21-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]';
	
	/**
	 * list of words
	 * @var	array<string>
	 */
	protected $words = array();
	
	/**
	 * list of matches
	 * @var	array
	 */
	protected $matches = array();<commit_msg>Fixed censorship treating '@' as delimiter<commit_after><?php
namespace wcf\system\message\censorship;
use wcf\system\SingletonFactory;
use wcf\util\StringUtil;

/**
 * Finds censored words.
 * 
 * @author	<NAME>
 * @copyright	2001-2015 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	com.woltlab.wcf
 * @subpackage	system.message.censorship
 * @category	Community Framework
 */
class Censorship extends SingletonFactory {
	/**
	 * censored words
	 * @var	array<string>
	 */
	protected $censoredWords = array();
	
	/**
	 * word delimiters
	 * @var	string
	 */
	protected $delimiters = '[\s\x21-\x2F\x3A-\x3F\x5B-\x60\x7B-\x7E]';
	
	/**
	 * list of words
	 * @var	array<string>
	 */
	protected $words = array();
	
	/**
	 * list of matches
	 * @var	array
	 */
	protected $matches = array();
{'fraction_non_alphanumeric': 0.14825753101004135, 'fraction_numerical': 0.021854695806261076, 'mean_word_length': 3.4814814814814814, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4156043', 'n_tokens_mistral': 655, 'n_tokens_neox': 580, 'n_words': 131}