<refentry id="libtracker-common-Parser">
<refmeta>
<refentrytitle role="top_of_page" id="libtracker-common-Parser.top_of_page">Parser</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBTRACKER-COMMON Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Parser</refname>
<refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv id="libtracker-common-Parser.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;libtracker-common/tracker-parser.h&gt;

typedef             <link linkend="TrackerParser">TrackerParser</link>;
<link linkend="TrackerParser">TrackerParser</link> *     <link linkend="tracker-parser-new">tracker_parser_new</link>                  (<link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length);
<link linkend="void">void</link>                <link linkend="tracker-parser-free">tracker_parser_free</link>                 (<link linkend="TrackerParser">TrackerParser</link> *parser);
<link linkend="gboolean">gboolean</link>            <link linkend="tracker-parser-is-stop-word">tracker_parser_is_stop_word</link>         (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         const <link linkend="gchar">gchar</link> *word);
const <link linkend="gchar">gchar</link> *       <link linkend="tracker-parser-next">tracker_parser_next</link>                 (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         <link linkend="gint">gint</link> *position,
                                                         <link linkend="gint">gint</link> *byte_offset_start,
                                                         <link linkend="gint">gint</link> *byte_offset_end,
                                                         <link linkend="gboolean">gboolean</link> *new_paragraph,
                                                         <link linkend="gboolean">gboolean</link> *stop_word,
                                                         <link linkend="gint">gint</link> *word_length);
<link linkend="gchar">gchar</link> *             <link linkend="tracker-parser-process-word">tracker_parser_process_word</link>         (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         const <link linkend="char">char</link> *word,
                                                         <link linkend="gint">gint</link> length,
                                                         <link linkend="gboolean">gboolean</link> do_strip);
<link linkend="void">void</link>                <link linkend="tracker-parser-reset">tracker_parser_reset</link>                (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         const <link linkend="gchar">gchar</link> *txt,
                                                         <link linkend="gint">gint</link> txt_size,
                                                         <link linkend="gboolean">gboolean</link> delimit_words,
                                                         <link linkend="gboolean">gboolean</link> enable_stemmer,
                                                         <link linkend="gboolean">gboolean</link> enable_stop_words,
                                                         <link linkend="gboolean">gboolean</link> parse_reserved_words);
<link linkend="GHashTable">GHashTable</link> *        <link linkend="tracker-parser-text">tracker_parser_text</link>                 (<link linkend="GHashTable">GHashTable</link> *word_table,
                                                         const <link linkend="gchar">gchar</link> *txt,
                                                         <link linkend="gint">gint</link> weight,
                                                         <link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_words_to_index,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length,
                                                         <link linkend="gboolean">gboolean</link> filter_words,
                                                         <link linkend="gboolean">gboolean</link> delimit_words);
<link linkend="GHashTable">GHashTable</link> *        <link linkend="tracker-parser-text-fast">tracker_parser_text_fast</link>            (<link linkend="GHashTable">GHashTable</link> *word_table,
                                                         const <link linkend="char">char</link> *txt,
                                                         <link linkend="gint">gint</link> weight);
<link linkend="gchar">gchar</link> **            <link linkend="tracker-parser-text-into-array">tracker_parser_text_into_array</link>      (const <link linkend="gchar">gchar</link> *text,
                                                         <link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length);
<link linkend="gchar">gchar</link> *             <link linkend="tracker-parser-text-to-string">tracker_parser_text_to_string</link>       (const <link linkend="gchar">gchar</link> *txt,
                                                         <link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length,
                                                         <link linkend="gboolean">gboolean</link> filter_words,
                                                         <link linkend="gboolean">gboolean</link> filter_numbers,
                                                         <link linkend="gboolean">gboolean</link> delimit);
</synopsis>
</refsynopsisdiv>









<refsect1 id="libtracker-common-Parser.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>

<refsect1 id="libtracker-common-Parser.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="TrackerParser" role="typedef">
<title>TrackerParser</title>
<indexterm zone="TrackerParser"><primary sortas="TrackerParser">TrackerParser</primary></indexterm><programlisting>typedef struct TrackerParser TrackerParser;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="tracker-parser-new" role="function">
<title>tracker_parser_new ()</title>
<indexterm zone="tracker-parser-new"><primary sortas="tracker_parser_new">tracker_parser_new</primary></indexterm><programlisting><link linkend="TrackerParser">TrackerParser</link> *     tracker_parser_new                  (<link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>language</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-free" role="function">
<title>tracker_parser_free ()</title>
<indexterm zone="tracker-parser-free"><primary sortas="tracker_parser_free">tracker_parser_free</primary></indexterm><programlisting><link linkend="void">void</link>                tracker_parser_free                 (<link linkend="TrackerParser">TrackerParser</link> *parser);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parser</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-is-stop-word" role="function">
<title>tracker_parser_is_stop_word ()</title>
<indexterm zone="tracker-parser-is-stop-word"><primary sortas="tracker_parser_is_stop_word">tracker_parser_is_stop_word</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            tracker_parser_is_stop_word         (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         const <link linkend="gchar">gchar</link> *word);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parser</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>word</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-next" role="function">
<title>tracker_parser_next ()</title>
<indexterm zone="tracker-parser-next"><primary sortas="tracker_parser_next">tracker_parser_next</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       tracker_parser_next                 (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         <link linkend="gint">gint</link> *position,
                                                         <link linkend="gint">gint</link> *byte_offset_start,
                                                         <link linkend="gint">gint</link> *byte_offset_end,
                                                         <link linkend="gboolean">gboolean</link> *new_paragraph,
                                                         <link linkend="gboolean">gboolean</link> *stop_word,
                                                         <link linkend="gint">gint</link> *word_length);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parser</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>position</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>byte_offset_start</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>byte_offset_end</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>new_paragraph</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>stop_word</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-process-word" role="function">
<title>tracker_parser_process_word ()</title>
<indexterm zone="tracker-parser-process-word"><primary sortas="tracker_parser_process_word">tracker_parser_process_word</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             tracker_parser_process_word         (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         const <link linkend="char">char</link> *word,
                                                         <link linkend="gint">gint</link> length,
                                                         <link linkend="gboolean">gboolean</link> do_strip);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parser</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>word</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>do_strip</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-reset" role="function">
<title>tracker_parser_reset ()</title>
<indexterm zone="tracker-parser-reset"><primary sortas="tracker_parser_reset">tracker_parser_reset</primary></indexterm><programlisting><link linkend="void">void</link>                tracker_parser_reset                (<link linkend="TrackerParser">TrackerParser</link> *parser,
                                                         const <link linkend="gchar">gchar</link> *txt,
                                                         <link linkend="gint">gint</link> txt_size,
                                                         <link linkend="gboolean">gboolean</link> delimit_words,
                                                         <link linkend="gboolean">gboolean</link> enable_stemmer,
                                                         <link linkend="gboolean">gboolean</link> enable_stop_words,
                                                         <link linkend="gboolean">gboolean</link> parse_reserved_words);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parser</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>txt</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>txt_size</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>delimit_words</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>enable_stemmer</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>enable_stop_words</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>parse_reserved_words</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-text" role="function">
<title>tracker_parser_text ()</title>
<indexterm zone="tracker-parser-text"><primary sortas="tracker_parser_text">tracker_parser_text</primary></indexterm><programlisting><link linkend="GHashTable">GHashTable</link> *        tracker_parser_text                 (<link linkend="GHashTable">GHashTable</link> *word_table,
                                                         const <link linkend="gchar">gchar</link> *txt,
                                                         <link linkend="gint">gint</link> weight,
                                                         <link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_words_to_index,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length,
                                                         <link linkend="gboolean">gboolean</link> filter_words,
                                                         <link linkend="gboolean">gboolean</link> delimit_words);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>word_table</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>txt</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>weight</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_words_to_index</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filter_words</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>delimit_words</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-text-fast" role="function">
<title>tracker_parser_text_fast ()</title>
<indexterm zone="tracker-parser-text-fast"><primary sortas="tracker_parser_text_fast">tracker_parser_text_fast</primary></indexterm><programlisting><link linkend="GHashTable">GHashTable</link> *        tracker_parser_text_fast            (<link linkend="GHashTable">GHashTable</link> *word_table,
                                                         const <link linkend="char">char</link> *txt,
                                                         <link linkend="gint">gint</link> weight);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>word_table</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>txt</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>weight</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-text-into-array" role="function">
<title>tracker_parser_text_into_array ()</title>
<indexterm zone="tracker-parser-text-into-array"><primary sortas="tracker_parser_text_into_array">tracker_parser_text_into_array</primary></indexterm><programlisting><link linkend="gchar">gchar</link> **            tracker_parser_text_into_array      (const <link linkend="gchar">gchar</link> *text,
                                                         <link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>text</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="tracker-parser-text-to-string" role="function">
<title>tracker_parser_text_to_string ()</title>
<indexterm zone="tracker-parser-text-to-string"><primary sortas="tracker_parser_text_to_string">tracker_parser_text_to_string</primary></indexterm><programlisting><link linkend="gchar">gchar</link> *             tracker_parser_text_to_string       (const <link linkend="gchar">gchar</link> *txt,
                                                         <link linkend="TrackerLanguage">TrackerLanguage</link> *language,
                                                         <link linkend="gint">gint</link> max_word_length,
                                                         <link linkend="gint">gint</link> min_word_length,
                                                         <link linkend="gboolean">gboolean</link> filter_words,
                                                         <link linkend="gboolean">gboolean</link> filter_numbers,
                                                         <link linkend="gboolean">gboolean</link> delimit);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>txt</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min_word_length</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filter_words</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filter_numbers</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>delimit</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
