## Parser Parser |

## Synopsis

    #include <libtracker-common/tracker-parser.h>

    typedef             TrackerParser;
    TrackerParser *     tracker_parser_new                  (TrackerLanguage *language,
                                                             gint max_word_length,
                                                             gint min_word_length);
    void                tracker_parser_free                 (TrackerParser *parser);
    gboolean            tracker_parser_is_stop_word         (TrackerParser *parser,
                                                             const gchar *word);
    const gchar *       tracker_parser_next                 (TrackerParser *parser,
                                                             gint *position,
                                                             gint *byte_offset_start,
                                                             gint *byte_offset_end,
                                                             gboolean *new_paragraph,
                                                             gboolean *stop_word,
                                                             gint *word_length);
    gchar *             tracker_parser_process_word         (TrackerParser *parser,
                                                             const char *word,
                                                             gint length,
                                                             gboolean do_strip);
    void                tracker_parser_reset                (TrackerParser *parser,
                                                             const gchar *txt,
                                                             gint txt_size,
                                                             gboolean delimit_words,
                                                             gboolean enable_stemmer,
                                                             gboolean enable_stop_words,
                                                             gboolean parse_reserved_words);
    GHashTable *        tracker_parser_text                 (GHashTable *word_table,
                                                             const gchar *txt,
                                                             gint weight,
                                                             TrackerLanguage *language,
                                                             gint max_words_to_index,
                                                             gint max_word_length,
                                                             gint min_word_length,
                                                             gboolean filter_words,
                                                             gboolean delimit_words);
    GHashTable *        tracker_parser_text_fast            (GHashTable *word_table,
                                                             const char *txt,
                                                             gint weight);
    gchar **            tracker_parser_text_into_array      (const gchar *text,
                                                             TrackerLanguage *language,
                                                             gint max_word_length,
                                                             gint min_word_length);
    gchar *             tracker_parser_text_to_string       (const gchar *txt,
                                                             TrackerLanguage *language,
                                                             gint max_word_length,
                                                             gint min_word_length,
                                                             gboolean filter_words,
                                                             gboolean filter_numbers,
                                                             gboolean delimit);

## Description

## Details

### TrackerParser

    typedef struct TrackerParser TrackerParser;

### tracker_parser_new ()

    TrackerParser *     tracker_parser_new                  (TrackerLanguage *language,
                                                             gint max_word_length,
                                                             gint min_word_length);

`language` : |
`max_word_length` : |
`min_word_length` : |
Returns : |

### tracker_parser_free ()

    void                tracker_parser_free                 (TrackerParser *parser);

`parser` : |

### tracker_parser_is_stop_word ()

    gboolean            tracker_parser_is_stop_word         (TrackerParser *parser,
                                                             const gchar *word);

`parser` : |
`word` : |
Returns : |

### tracker_parser_next ()

    const gchar *       tracker_parser_next                 (TrackerParser *parser,
                                                             gint *position,
                                                             gint *byte_offset_start,
                                                             gint *byte_offset_end,
                                                             gboolean *new_paragraph,
                                                             gboolean *stop_word,
                                                             gint *word_length);

`parser` : |
`position` : |
`byte_offset_start` : |
`byte_offset_end` : |
`new_paragraph` : |
`stop_word` : |
`word_length` : |
Returns : |

### tracker_parser_process_word ()

    gchar *             tracker_parser_process_word         (TrackerParser *parser,
                                                             const char *word,
                                                             gint length,
                                                             gboolean do_strip);

`parser` : |
`word` : |
`length` : |
`do_strip` : |
Returns : |

### tracker_parser_reset ()

    void                tracker_parser_reset                (TrackerParser *parser,
                                                             const gchar *txt,
                                                             gint txt_size,
                                                             gboolean delimit_words,
                                                             gboolean enable_stemmer,
                                                             gboolean enable_stop_words,
                                                             gboolean parse_reserved_words);

`parser` : |
`txt` : |
`txt_size` : |
`delimit_words` : |
`enable_stemmer` : |
`enable_stop_words` : |
`parse_reserved_words` : |

### tracker_parser_text ()

    GHashTable *        tracker_parser_text                 (GHashTable *word_table,
                                                             const gchar *txt,
                                                             gint weight,
                                                             TrackerLanguage *language,
                                                             gint max_words_to_index,
                                                             gint max_word_length,
                                                             gint min_word_length,
                                                             gboolean filter_words,
                                                             gboolean delimit_words);

`word_table` : |
`txt` : |
`weight` : |
`language` : |
`max_words_to_index` : |
`max_word_length` : |
`min_word_length` : |
`filter_words` : |
`delimit_words` : |
Returns : |

### tracker_parser_text_fast ()

    GHashTable *        tracker_parser_text_fast            (GHashTable *word_table,
                                                             const char *txt,
                                                             gint weight);

`word_table` : |
`txt` : |
`weight` : |
Returns : |

### tracker_parser_text_into_array ()

    gchar **            tracker_parser_text_into_array      (const gchar *text,
                                                             TrackerLanguage *language,
                                                             gint max_word_length,
                                                             gint min_word_length);

`text` : |
`language` : |
`max_word_length` : |
`min_word_length` : |
Returns : |

### tracker_parser_text_to_string ()

    gchar *             tracker_parser_text_to_string       (const gchar *txt,
                                                             TrackerLanguage *language,
                                                             gint max_word_length,
                                                             gint min_word_length,
                                                             gboolean filter_words,
                                                             gboolean filter_numbers,
                                                             gboolean delimit);

`txt` : |
`language` : |
`max_word_length` : |
`min_word_length` : |
`filter_words` : |
`filter_numbers` : |
`delimit` : |
Returns : |