-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
293 lines (275 loc) · 8.19 KB
/
index.php
File metadata and controls
293 lines (275 loc) · 8.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?php
require("robot/read_all_file.php");
require("robot/file_list_in_folder.php");
require("robot/cut_word.php");
require("robot/cut_symbol_head_end.php");
require("robot/ql.php");
require("robot/Frame.php");
require("robot/longtailword.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>文字加工机</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
function loadXMLDoc(data,id,page)
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById(id).innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("POST",page,true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(data);
document.getElementById(id).innerHTML="<img src='wait.gif'/><br/>请稍等....";
}
</script>
<style type="text/css">
html,body{
margin:0;padding:0
}
body{
font: 76% arial,sans-serif
}
p{margin:2}
div#header h1{
height:80px;
line-height:80px;
margin:0;
padding-left:10px;
background: #EEE;
color: #79B30B}
div#content p{
line-height:1.4
}
div#navigation{
}
div#extra{
}
div#footer{
color: #FFF
}
div#footer p{
padding:5px 10px
}
div#wrapper{
float:left;
width:100%
}
div#content{
margin: 0 25%
}
div#navigation{
float:left;
width:25%;
margin-left:-100%
}
div#extra{
float:left;
width:25%;
margin-left:-25%
}
div#footer{
clear:left;
width:100%
}
</style>
<script language="javascript">var study;</script>
</head>
<body>
<div id="container">
<div id="header">
<div>
<h1>引擎信息:目前有 记忆节点:<?php
$Var = new _oopf_Frame;
$Var->_construct('');
$Var->Nodemessage();
?>
个
</h1>
</div>
</div>
<div id="wrapper">
<div id="content">
<p style="text-align:center;">结果</p>
<div id="Result" style="width:100%;height:500px;text-align:center;"></div>
</div>
</div>
<div id="navigation">
<div style="padding:4px;background:#B9CAFF;">
<b>词汇类设置面板(单词可以用逗号分隔):</b><br/>
当你点击后,请稍微等待,后台在分析处理需要少许时间.<br/>
<table>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Noun&oldString='+study,'Result','robot.php');">学习名词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Adjective&oldString='+study,'Result','robot.php');">学习形容词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Verb&oldString='+study,'Result','robot.php');">学习动词</button>
</td>
</tr>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Quantifier&oldString='+study,'Result','robot.php');">学习量词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Pronouns&oldString='+study,'Result','robot.php');">学习代词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Adverb&oldString='+study,'Result','robot.php');">学习副词</button>
</td>
</tr>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Preposition&oldString='+study,'Result','robot.php');">学习介词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Conjunction&oldString='+study,'Result','robot.php');">学习连词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Particle&oldString='+study,'Result','robot.php');">学习助词</button>
</td>
</tr>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Interjection&oldString='+study,'Result','robot.php');">学习叹词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Onomatopoeia&oldString='+study,'Result','robot.php');">学习拟声词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=indexS&oldString='+study,'Result','robot.php');">学习例句</button>
</td>
</tr>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=GroupOfWords&oldString='+study,'Result','robot.php');">组词</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Word_Property&oldString='+study,'Result','robot.php');">获取词汇属性</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=indexI&oldString='+study,'Result','robot.php');">删除词</button>
</td>
</tr>
</table>
</div>
<br/>
<br/>
<div style="padding:4px;background:#B9CAFF;">
<form action="robot.php?file=wordhaveatt" method="post" enctype="multipart/form-data">
<label for="file"><h2>批量学习标记属性的词汇</h2>:</label>
<br/>
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Submit" />
</form>
<p>
文件上传说明:第一行必须为一个"词"字,并且以<b>utf-8</b>的文件格式。<br/><br/>格式示例:<br/><img src="123exp.jpg">
</p>
</div>
<br/>
<br/>
<div style="padding:4px;background:#B9CAFF;">
<form action="robot.php?file=Sentence" method="post" enctype="multipart/form-data">
<label for="file"><h2>批量学习文章</h2>:</label>
<br/>
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Submit" />
</form>
<p>
文件上传说明:第一行必须为一个"句"字,并且以<b>utf-8</b>的文件格式。<br/><br/>格式示例:<br/><img src="456exp.jpg">
</p>
</div>
<br/>
<br/>
<div style="padding:4px;background:#B9CAFF;">
<form action="robot.php?file=attwordtodo" method="post" enctype="multipart/form-data">
<label for="file"><h2>批量词性处理</h2>:</label>
<br/>
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Submit" />
</form>
<p>
文件上传说明:对已经标注词性的文件进行处理。
</p>
</div>
<hr/>
<br/>
<br/>
<div style="padding:4px;background:#B9CAFF;">
<p>
上传错误的符号,或者格式错误的词汇表,会导致节点出现断裂或者连接异常,可以点击<a href="robot.php?Mode=Repairallword" target="_blank">修复词库节点</a>修复异常。
</p>
</div>
<div style="padding:4px;background:#B9CAFF;">
<form action="robot.php?file=config" method="post" enctype="multipart/form-data">
<label for="file"><h2>修改配置文件</h2>:</label>
<br/>
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Submit" />
</form>
</div>
</div>
<div id="extra">
<p>输入:</p>
<textarea rows="20" cols="45" onkeyup="study = this.value" onmousedown="study = this.value"></textarea>
<div style="padding:4px;background:#B9CAFF;">
<hr/>
<br/><b>应用面板:</b><br/>
可以输入句子或者文章.<br/>
<table>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Analysisword&oldString='+study,'Result','robot.php');">文章分析</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=rewrite_array&oldString='+study,'Result','robot.php');">改写句子</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=SimilaritySentencen&oldString='+study,'Result','robot.php');">语法相似度(用 | 隔开)</button>
</td>
</tr>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Abb_S_array&oldString='+study,'Result','robot.php');">缩写文章</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Summary&oldString='+study,'Result','robot.php');">摘要</button>
</td>
<td>
<button type="button" onclick="loadXMLDoc('Mode=Expan_S_array&oldString='+study,'Result','robot.php');">扩写文章</button>
</td>
</tr>
</table>
</div>
<div style="padding:4px;background:#B9CAFF;">
<hr/>长尾关键词处理面板<br/>
<table>
<tr>
<td>
<button type="button" onclick="loadXMLDoc('Mode=longtailwordtodo&oldString='+study,'Result','robot.php');">长尾词切割筛选</button>
</td>
</tr>
</table>
</div>
</div>
<div id="footer"><p>其他</p></div>
</div>
</body>
</html>