mirror of
https://gitee.com/lionsoul/friso.git
synced 2024-12-01 18:57:50 +08:00
update test demo
This commit is contained in:
parent
409c16d318
commit
dd63922a9f
34
vendors/binding/php5/demo/gbk.demo.php
vendored
34
vendors/binding/php5/demo/gbk.demo.php
vendored
@ -38,7 +38,7 @@ function timer() {
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
|
||||
<head>
|
||||
<title>GBK - robbe分词测试程序 </title>
|
||||
<title>GBK - robbe?ִʲ??Գ??? </title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=GBK" />
|
||||
<style type="text/css">
|
||||
#box {width: 1000px}
|
||||
@ -67,61 +67,61 @@ function timer() {
|
||||
<body>
|
||||
<div id="box">
|
||||
<form name="robbe" method="post" action="gbk.demo.php">
|
||||
<div class="title-item">分词配置:</div>
|
||||
<div class="title-item">?ִ????ã?</div>
|
||||
<div id="cfg-box">
|
||||
<div>
|
||||
<label>最大词长: </label>
|
||||
<label>?????ʳ?: </label>
|
||||
<input type="text" name="config[max_len]" value="<?=isset($_cfg['max_len'])?$_cfg['max_len']:5?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>混合词中文词长: </label>
|
||||
<label>???ϴ????Ĵʳ?: </label>
|
||||
<input type="text" name="config[mix_len]" value="<?=isset($_cfg['mix_len'])?$_cfg['mix_len']:2?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>英文二次切分: </label>
|
||||
<label>Ӣ?Ķ????з?: </label>
|
||||
<input type="checkbox" name="config[en_sseg]" <?=isset($_cfg['en_sseg'])&&$_cfg['en_sseg']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>二次切分子Token最小长度: </label>
|
||||
<label>?????з???Token??С????: </label>
|
||||
<input type="text" name="config[st_minl]" value="<?=isset($_cfg['st_minl'])?$_cfg['st_minl']:2?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>英文Token中保留的标点: </label>
|
||||
<label>Ӣ??Token?б????ı???: </label>
|
||||
<input type="text" name="config[kpuncs]" value="<?=isset($_cfg['kpuncs'])?$_cfg['kpuncs']:'@%.#&+'?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>同义词追加: </label>
|
||||
<label>ͬ??????: </label>
|
||||
<input type="checkbox" name="config[add_syn]" <?=isset($_cfg['add_syn'])&&$_cfg['add_syn']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>过滤停止词: </label>
|
||||
<label>????ֹͣ??: </label>
|
||||
<input type="checkbox" name="config[clr_stw]" <?=isset($_cfg['clr_stw'])&&$_cfg['clr_stw']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>保留未识别词: </label>
|
||||
<label>????δʶ????: </label>
|
||||
<input type="checkbox" name="config[keep_urec]" <?=isset($_cfg['keep_urec'])&&$_cfg['keep_urec']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>sphinx定制输出: </label>
|
||||
<label>sphinx????????: </label>
|
||||
<input type="checkbox" name="config[spx_out]" <?=isset($_cfg['spx_out'])&&$_cfg['spx_out']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>分词模式: </label>
|
||||
<input type="radio" name="config[mode]" value="<?=RB_SMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />简易模式
|
||||
<input type="radio" name="config[mode]" value="<?=RB_CMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />复杂模式
|
||||
<label>?ִ?ģʽ: </label>
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_SIMPLE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />????ģʽ
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_COMPLEX?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />????ģʽ
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title-item">分词内容:</div>
|
||||
<div class="title-item">?ִ????ݣ?</div>
|
||||
<div class="r-item"><textarea name="text" class="input-text" id="text"><?=$text?></textarea></div>
|
||||
<input type="hidden" name="_act" value="split"/>
|
||||
<a href="javascript:;" onclick="do_submit();return false;" id="submit-link">robbe分词</a>
|
||||
<a href="javascript:;" onclick="do_submit();return false;" id="submit-link">robbe?ִ?</a>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if ( $_act == 'split' ) {
|
||||
?>
|
||||
<div class="title-item">分词结果:</div>
|
||||
<div class="title-item">?ִʽ?????</div>
|
||||
<div><textarea class="input-text"><?php foreach ( $_ret as $_val ) echo $_val['word'].' ';?>
|
||||
</textarea></div>
|
||||
<div class="link-box"><a id="info-link">
|
||||
|
4
vendors/binding/php5/demo/utf8.demo.php
vendored
4
vendors/binding/php5/demo/utf8.demo.php
vendored
@ -107,8 +107,8 @@ function timer() {
|
||||
</div>
|
||||
<div>
|
||||
<label>分词模式: </label>
|
||||
<input type="radio" name="config[mode]" value="<?=RB_SMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />简易模式
|
||||
<input type="radio" name="config[mode]" value="<?=RB_CMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />复杂模式
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_SIMPLE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />简易模式
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_COMPLEX?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />复杂模式
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
34
vendors/binding/php7/demo/gbk.demo.php
vendored
34
vendors/binding/php7/demo/gbk.demo.php
vendored
@ -38,7 +38,7 @@ function timer() {
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
|
||||
<head>
|
||||
<title>GBK - robbe分词测试程序 </title>
|
||||
<title>GBK - robbe?ִʲ??Գ??? </title>
|
||||
<meta http-equiv="content-type" content="text/html;charset=GBK" />
|
||||
<style type="text/css">
|
||||
#box {width: 1000px}
|
||||
@ -67,61 +67,61 @@ function timer() {
|
||||
<body>
|
||||
<div id="box">
|
||||
<form name="robbe" method="post" action="gbk.demo.php">
|
||||
<div class="title-item">分词配置:</div>
|
||||
<div class="title-item">?ִ????ã?</div>
|
||||
<div id="cfg-box">
|
||||
<div>
|
||||
<label>最大词长: </label>
|
||||
<label>?????ʳ?: </label>
|
||||
<input type="text" name="config[max_len]" value="<?=isset($_cfg['max_len'])?$_cfg['max_len']:5?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>混合词中文词长: </label>
|
||||
<label>???ϴ????Ĵʳ?: </label>
|
||||
<input type="text" name="config[mix_len]" value="<?=isset($_cfg['mix_len'])?$_cfg['mix_len']:2?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>英文二次切分: </label>
|
||||
<label>Ӣ?Ķ????з?: </label>
|
||||
<input type="checkbox" name="config[en_sseg]" <?=isset($_cfg['en_sseg'])&&$_cfg['en_sseg']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>二次切分子Token最小长度: </label>
|
||||
<label>?????з???Token??С????: </label>
|
||||
<input type="text" name="config[st_minl]" value="<?=isset($_cfg['st_minl'])?$_cfg['st_minl']:2?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>英文Token中保留的标点: </label>
|
||||
<label>Ӣ??Token?б????ı???: </label>
|
||||
<input type="text" name="config[kpuncs]" value="<?=isset($_cfg['kpuncs'])?$_cfg['kpuncs']:'@%.#&+'?>" class="input" />
|
||||
</div>
|
||||
<div>
|
||||
<label>同义词追加: </label>
|
||||
<label>ͬ??????: </label>
|
||||
<input type="checkbox" name="config[add_syn]" <?=isset($_cfg['add_syn'])&&$_cfg['add_syn']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>过滤停止词: </label>
|
||||
<label>????ֹͣ??: </label>
|
||||
<input type="checkbox" name="config[clr_stw]" <?=isset($_cfg['clr_stw'])&&$_cfg['clr_stw']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>保留未识别词: </label>
|
||||
<label>????δʶ????: </label>
|
||||
<input type="checkbox" name="config[keep_urec]" <?=isset($_cfg['keep_urec'])&&$_cfg['keep_urec']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>sphinx定制输出: </label>
|
||||
<label>sphinx????????: </label>
|
||||
<input type="checkbox" name="config[spx_out]" <?=isset($_cfg['spx_out'])&&$_cfg['spx_out']==1?'checked="checked"':''?> value="1" />
|
||||
</div>
|
||||
<div>
|
||||
<label>分词模式: </label>
|
||||
<input type="radio" name="config[mode]" value="<?=RB_SMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />简易模式
|
||||
<input type="radio" name="config[mode]" value="<?=RB_CMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />复杂模式
|
||||
<label>?ִ?ģʽ: </label>
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_SIMPLE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />????ģʽ
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_COMPLEX?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />????ģʽ
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title-item">分词内容:</div>
|
||||
<div class="title-item">?ִ????ݣ?</div>
|
||||
<div class="r-item"><textarea name="text" class="input-text" id="text"><?=$text?></textarea></div>
|
||||
<input type="hidden" name="_act" value="split"/>
|
||||
<a href="javascript:;" onclick="do_submit();return false;" id="submit-link">robbe分词</a>
|
||||
<a href="javascript:;" onclick="do_submit();return false;" id="submit-link">robbe?ִ?</a>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if ( $_act == 'split' ) {
|
||||
?>
|
||||
<div class="title-item">分词结果:</div>
|
||||
<div class="title-item">?ִʽ?????</div>
|
||||
<div><textarea class="input-text"><?php foreach ( $_ret as $_val ) echo $_val['word'].' ';?>
|
||||
</textarea></div>
|
||||
<div class="link-box"><a id="info-link">
|
||||
|
4
vendors/binding/php7/demo/utf8.demo.php
vendored
4
vendors/binding/php7/demo/utf8.demo.php
vendored
@ -107,8 +107,8 @@ function timer() {
|
||||
</div>
|
||||
<div>
|
||||
<label>分词模式: </label>
|
||||
<input type="radio" name="config[mode]" value="<?=RB_SMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />简易模式
|
||||
<input type="radio" name="config[mode]" value="<?=RB_CMODE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />复杂模式
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_SIMPLE?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==1?'checked="checked"':''?> />简易模式
|
||||
<input type="radio" name="config[mode]" value="<?=FRISO_COMPLEX?>" <?=isset($_cfg['mode'])&&$_cfg['mode']==2?'checked="checked"':''?> />复杂模式
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user