/* This is -*- C -*- */
/* vim: set sw=2: */
/* $Id$ */

/*
 * rhyme.h
 *
 * Copyright (C) 2003 The Free Software Foundation, Inc.
 *
 */

/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA.
 */

#ifndef __RHYME_H__
#define __RHYME_H__

#include <Python.h>
#include "phoneme.h"
#include "dictionary.h"

typedef enum {
  RHYME_NONE  = 0,
  RHYME_SLANT = 1,
  RHYME_FALSE = 2,
  RHYME_TRUE  = 3,
} RhymeType;

typedef void (*RhymeFn) (Phoneme        *decomp,
			 DictionaryWord *word,
			 RhymeType       type,
			 gpointer        user_data);

RhymeType rhyme_get_type (Phoneme *decomp1, Phoneme *decomp2);

void      rhyme_foreach (Phoneme  *decomp,
			 RhymeType minimum,
			 RhymeFn   fn,
			 gpointer  user_data);

gboolean   rhyme_exists (Phoneme *decomp, RhymeType minimum);


/* Python Extenions */

PyObject *py_rhyme_get_type (PyObject *self, PyObject *args);
PyObject *py_rhyme_get_all  (PyObject *self, PyObject *args);


#endif /* __RHYME_H__ */

