X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fccl.h;h=e6c5af2bd5b275a7a0404834731bf2b608ee4264;hp=65d2ffd48121177dad67ba353e0e1c03a9312ab6;hb=73f6b7a6b12a1e0e54c9cc360f552a56726d75fd;hpb=78b138b80fadc817d621f0a692fca857ee31399b diff --git a/include/yaz/ccl.h b/include/yaz/ccl.h index 65d2ffd..e6c5af2 100644 --- a/include/yaz/ccl.h +++ b/include/yaz/ccl.h @@ -49,7 +49,7 @@ /* * CCL - header file * - * $Id: ccl.h,v 1.27 2007-04-30 11:33:49 adam Exp $ + * $Id: ccl.h,v 1.29 2007-05-01 12:22:10 adam Exp $ * * Old Europagate Log: * @@ -150,6 +150,7 @@ struct ccl_rpn_node { /** \brief Attributes + Term */ struct { char *term; + char *qual; struct ccl_rpn_attr *attr_list; } t; /** Result set */ @@ -185,22 +186,6 @@ struct ccl_rpn_node *ccl_find_str(CCL_bibset bibset, YAZ_EXPORT struct ccl_rpn_node *ccl_parser_find_str(CCL_parser cclp, const char *str); -/** Set names for AND operator in parser */ -YAZ_EXPORT -void ccl_parser_set_op_and(CCL_parser p, const char *op); - -/** Set names for OR operator in parser */ -YAZ_EXPORT -void ccl_parser_set_op_or(CCL_parser p, const char *op); - -/** Set names for ANDNOT operator in parser */ -YAZ_EXPORT -void ccl_parser_set_op_not(CCL_parser p, const char *op); - -/** Set names for ResultSet in parser */ -YAZ_EXPORT -void ccl_parser_set_op_set(CCL_parser p, const char *op); - /** Set case sensitivity for parser */ YAZ_EXPORT void ccl_parser_set_case(CCL_parser p, int case_sensitivity_flag); @@ -228,11 +213,11 @@ void ccl_qual_add_set(CCL_bibset b, const char *name, int no, /** Add special qualifier */ YAZ_EXPORT -void ccl_qual_add_special(CCL_bibset bibset, const char *n, const char *v); +void ccl_qual_add_special(CCL_bibset bibset, const char *n, const char *cp); /** Add combo qualifier */ YAZ_EXPORT -void ccl_qual_add_combi(CCL_bibset b, const char *n, const char *names); +void ccl_qual_add_combi(CCL_bibset b, const char *n, const char **names); /** Read CCL qualifier list spec from file inf */ YAZ_EXPORT @@ -284,7 +269,7 @@ void ccl_parser_destroy(CCL_parser p); /** Search for special qualifier */ YAZ_EXPORT -const char *ccl_qual_search_special(CCL_bibset b, const char *name); +const char **ccl_qual_search_special(CCL_bibset b, const char *name); /** Pretty-print CCL RPN node tree to WRBUF */ YAZ_EXPORT void ccl_pquery(WRBUF w, struct ccl_rpn_node *p); @@ -303,6 +288,31 @@ YAZ_EXPORT void ccl_add_attr_string(struct ccl_rpn_node *p, const char *set, int type, char *value); +YAZ_EXPORT +int ccl_search_stop(CCL_bibset bibset, const char *qname, + const char *src_str, size_t src_len); + + +/** \brief stop words handle (pimpl) */ +typedef struct ccl_stop_words *ccl_stop_words_t; + +/** \brief creates stop words handle */ +YAZ_EXPORT +ccl_stop_words_t ccl_stop_words_create(void); + +/** \brief destroys stop words handle */ +YAZ_EXPORT +void ccl_stop_words_destroy(ccl_stop_words_t csw); + +/** \brief removes stop words from RPN tree */ +YAZ_EXPORT +int ccl_stop_words_tree(ccl_stop_words_t csw, + CCL_bibset bibset, struct ccl_rpn_node **t); + +/** \brief returns information about removed "stop" words */ +YAZ_EXPORT +int ccl_stop_words_info(ccl_stop_words_t csw, int idx, + const char **qualname, const char **term); #ifndef ccl_assert #define ccl_assert(x) ;