YAZ  5.23.1
Data Structures | Functions
ccl_stop_words.c File Reference

Removes stop words from terms in RPN tree. More...

#include <stdio.h>
#include <string.h>
#include <yaz/ccl.h>
#include <yaz/nmem.h>

Go to the source code of this file.

Data Structures

struct  ccl_stop_info
 
struct  ccl_stop_words
 

Functions

static void append_removed_item (ccl_stop_words_t csw, const char *qname, const char *t, size_t len)
 
ccl_stop_words_t ccl_stop_words_create (void)
 creates stop words handle More...
 
void ccl_stop_words_destroy (ccl_stop_words_t csw)
 destroys stop words handle More...
 
struct ccl_rpn_nodeccl_remove_stop_r (ccl_stop_words_t csw, CCL_bibset bibset, struct ccl_rpn_node *p)
 
int ccl_stop_words_tree (ccl_stop_words_t csw, CCL_bibset bibset, struct ccl_rpn_node **t)
 removes stop words from RPN tree More...
 
int ccl_stop_words_info (ccl_stop_words_t csw, int idx, const char **qualname, const char **term)
 returns information about removed "stop" words More...
 

Detailed Description

Removes stop words from terms in RPN tree.

Definition in file ccl_stop_words.c.

Function Documentation

static void append_removed_item ( ccl_stop_words_t  csw,
const char *  qname,
const char *  t,
size_t  len 
)
static
struct ccl_rpn_node* ccl_remove_stop_r ( ccl_stop_words_t  csw,
CCL_bibset  bibset,
struct ccl_rpn_node p 
)
ccl_stop_words_t ccl_stop_words_create ( void  )

creates stop words handle

Definition at line 53 of file ccl_stop_words.c.

References ccl_stop_words::blank_chars, ccl_stop_words::nmem, nmem_create(), ccl_stop_words::removed_items, xmalloc, and xstrdup.

void ccl_stop_words_destroy ( ccl_stop_words_t  csw)

destroys stop words handle

Definition at line 63 of file ccl_stop_words.c.

References ccl_stop_words::blank_chars, ccl_stop_words::nmem, nmem_destroy(), and xfree.

int ccl_stop_words_info ( ccl_stop_words_t  csw,
int  idx,
const char **  qualname,
const char **  term 
)

returns information about removed "stop" words

Definition at line 178 of file ccl_stop_words.c.

References ccl_stop_info::next, ccl_stop_info::qualname, ccl_stop_words::removed_items, and ccl_stop_info::term.

int ccl_stop_words_tree ( ccl_stop_words_t  csw,
CCL_bibset  bibset,
struct ccl_rpn_node **  t 
)

removes stop words from RPN tree

Definition at line 162 of file ccl_stop_words.c.

References ccl_remove_stop_r(), ccl_stop_words::nmem, nmem_reset(), and ccl_stop_words::removed_items.