Git Product home page Git Product logo

httpcws's People

Watchers

 avatar

httpcws's Issues

libICTCLAS30.a失效

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

能提供一份在FreeBSD上的编译安装记录吗?

我在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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.