<commit_before>#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

extern "C" {
#include "php.h"
}
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_mmseg.h"
#include <sys/stat.h>

#if PHP_MAJOR_VERSION >= 7
typedef zend_resource zend_rsrc_list_entry;
#endif
static void php_mmseg_globals_ctor(zend_mmseg_globals *mmseg_globals TSRMLS_DC);
static void php_mmseg_globals_dtor(zend_mmseg_globals *mmseg_globals TSRMLS_DC);
static void php_mmseg_globals_ctor(zend_mmseg_globals *mmseg_globals TSRMLS_DC);
static void php_mmseg_descriptor_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);

using namespace std;

// SegmenterManager
ZEND_DECLARE_MODULE_GLOBALS(mmseg)

	/* True global resources - no need for thread safety here */
	static int le_mmseg;
	// mmseg segmenter manager句柄
	static int le_mmseg_descriptor;

	/* {{{ PHP_INI
	 */
PHP_INI_BEGIN()
	PHP_INI_ENTRY("mmseg.dict_dir", "/opt/etc", PHP_INI_ALL, NULL)<commit_msg>change static pos<commit_after>#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

extern "C" {
#include "php.h"
}
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_mmseg.h"
#include <sys/stat.h>

static void php_mmseg_globals_ctor(zend_mmseg_globals *mmseg_globals TSRMLS_DC);
static void php_mmseg_globals_dtor(zend_mmseg_globals *mmseg_globals TSRMLS_DC);
static void php_mmseg_globals_ctor(zend_mmseg_globals *mmseg_globals TSRMLS_DC);
static void php_mmseg_descriptor_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);

using namespace std;

// SegmenterManager
ZEND_DECLARE_MODULE_GLOBALS(mmseg)

	/* True global resources - no need for thread safety here */
	static int le_mmseg;
	// mmseg segmenter manager句柄
	static int le_mmseg_descriptor;

	/* {{{ PHP_INI
	 */
PHP_INI_BEGIN()
	PHP_INI_ENTRY("mmseg.dict_dir", "/opt/etc", PHP_INI_ALL, NULL)
{'fraction_non_alphanumeric': 0.10011185682326622, 'fraction_numerical': 0.0005592841163310962, 'mean_word_length': 6.744588744588745, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '6562984', 'n_tokens_mistral': 745, 'n_tokens_neox': 720, 'n_words': 140}