djveremix / httpcws Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/httpcws
Automatically exported from code.google.com/p/httpcws
README.txt中有下载地址说明的。
另外,也可以用最新的2012版,我编译2012版的指令如下:
g++ -o httpcws httpcws.cpp -levent -L./ICTCLAS -lICTCLAS2011 -Wall -Wunused -O3
-DOS_LINUX
libICTCLAS2011.so文件直接复制丢进/usr/lib64中即可。
Original issue reported on code.google.com by [email protected]
on 14 Jul 2011 at 10:45
你好。从你的源码可以看出httpcws在效率方面下了很大功夫,�
��括使用libevent。不
过我不太清楚这样做跟apache+php或者nginx+php,甚至是Erlang的moch
iweb,在效率
方面上能有多大优势?
Original issue reported on code.google.com by blueflycn
on 12 Aug 2009 at 5:57
英译中的名字含符号"·"不能切分,如“哈利·波特“
”十一·五“亦不能切分
What is the expected output? What do you see instead?
哈利 波特
哈利·波特
What version of the product are you using? On what operating system?
httpcws-1.0.0-x86_64-bin
Ubuntu
Please provide any additional information below.
建议至少提供一个可切分该类文字的选项
Original issue reported on code.google.com by [email protected]
on 11 Nov 2010 at 8:45
是直接根据httpcws_dict.txt的格式添加进去就行了么?
Original issue reported on code.google.com by [email protected]
on 11 Aug 2009 at 3:01
我在FreeBSD上试着编译源码,报以下错误
test# g++ httpcws httpcws.cpp
httpcws.cpp:38:18: wait.h: No such file or directory
httpcws.cpp:41:19: event.h: No such file or directory
httpcws.cpp:42:20: evhttp.h: No such file or directory
In file included from httpcws.cpp:46:
ICTCLAS/ICTCLAS30.h:317: error: expected initializer before "CICTCLAS30"
httpcws.cpp: In function `void httpcws_handler(evhttp_request*, void*)':
httpcws.cpp:129: error: `evbuffer_new' was not declared in this scope
httpcws.cpp:132: error: aggregate `evkeyvalq httpcws_http_query' has
incomplete type and cannot be defined
httpcws.cpp:133: error: `evhttp_request_uri' was not declared in this scope
httpcws.cpp:133: error: `evhttp_parse_query' was not declared in this scope
httpcws.cpp:136: error: invalid use of undefined type `struct evhttp_request'
httpcws.cpp:126: error: forward declaration of `struct evhttp_request'
httpcws.cpp:136: error: `EVBUFFER_DATA' was not declared in this scope
httpcws.cpp:139: error: `evhttp_find_header' was not declared in this scope
httpcws.cpp:144: error: invalid use of undefined type `struct evhttp_request'
httpcws.cpp:126: error: forward declaration of `struct evhttp_request'
httpcws.cpp:144: error: `EVBUFFER_LENGTH' was not declared in this scope
httpcws.cpp:145: error: invalid use of undefined type `struct evhttp_request'
httpcws.cpp:126: error: forward declaration of `struct evhttp_request'
httpcws.cpp:146: error: invalid use of undefined type `struct evhttp_request'
httpcws.cpp:126: error: forward declaration of `struct evhttp_request'
httpcws.cpp:166: error: invalid use of undefined type `struct evhttp_request'
httpcws.cpp:126: error: forward declaration of `struct evhttp_request'
httpcws.cpp:166: error: `evhttp_add_header' was not declared in this scope
httpcws.cpp:167: error: invalid use of undefined type `struct evhttp_request'
httpcws.cpp:126: error: forward declaration of `struct evhttp_request'
httpcws.cpp:168: error: invalid use of undefined type `struct evhttp_request'
httpcws.cpp:126: error: forward declaration of `struct evhttp_request'
httpcws.cpp:169: error: `evbuffer_add_printf' was not declared in this scope
httpcws.cpp:170: error: `HTTP_OK' was not declared in this scope
httpcws.cpp:170: error: `evhttp_send_reply' was not declared in this scope
httpcws.cpp:173: error: `evhttp_clear_headers' was not declared in this scope
httpcws.cpp:174: error: `evbuffer_free' was not declared in this scope
httpcws.cpp: In function `int main(int, char**)':
httpcws.cpp:257: error: `event_init' was not declared in this scope
httpcws.cpp:258: error: `evhttp_start' was not declared in this scope
httpcws.cpp:259: error: `evhttp_set_timeout' was not declared in this scope
httpcws.cpp:262: error: `evhttp_set_gencb' was not declared in this scope
httpcws.cpp:264: error: `event_dispatch' was not declared in this scope
httpcws.cpp:267: error: `evhttp_free' was not declared in this scope
test#
Original issue reported on code.google.com by [email protected]
on 16 Mar 2010 at 3:54
// 贴一段我自己补充的,增加词性标注的代码。
用户词典中指定词性暂时只想到用KV数据库反查的方案。
// 请求时加上在?w后面加上&t=1,或者是POST下带上?t=1即可
/* 接收GET表单参数 */
const char *httpcws_input_words = evhttp_find_header (&httpcws_http_query, "w");
/* 是否做词性标注 */
const char *httpcws_tagged = evhttp_find_header (&httpcws_http_query, "t");
int tag_words = 0;
if (httpcws_tagged != NULL) {
tag_words = httpcws_tagged[0] == '1' ? 1 : 0;
}
const char *httpcws_output_tmp = NULL;
char *httpcws_output_words = "\0";
if (tcsql_input_postbuffer != NULL) {
char *tcsql_input_postbuffer_tmp = (char *) malloc(EVBUFFER_LENGTH(req->input_buffer)+1);
memset (tcsql_input_postbuffer_tmp, '\0', EVBUFFER_LENGTH(req->input_buffer)+1);
strncpy(tcsql_input_postbuffer_tmp, tcsql_input_postbuffer, EVBUFFER_LENGTH(req->input_buffer));
char *decode_uri = urldecode(tcsql_input_postbuffer_tmp);
free(tcsql_input_postbuffer_tmp);
httpcws_output_tmp = ICTCLAS_ParagraphProcess(decode_uri, tag_words);
free(decode_uri);
httpcws_output_words = strdup(httpcws_output_tmp);
trim (httpcws_output_words);
} else if (httpcws_input_words != NULL) {
char *httpcws_input_words_tmp = strdup(httpcws_input_words);
char *decode_uri = urldecode(httpcws_input_words_tmp);
free(httpcws_input_words_tmp);
httpcws_output_tmp = ICTCLAS_ParagraphProcess(decode_uri, tag_words);
free(decode_uri);
httpcws_output_words = strdup(httpcws_output_tmp);
trim (httpcws_output_words);
} else {
httpcws_output_words = strdup("");
}
Original issue reported on code.google.com by [email protected]
on 20 Mar 2012 at 10:02
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.