/*
    Copyright (C) 2012 Bartosz Broda, Jacek Bochenek, Łukasz Biłeńkij, 
    Damian Jaworski, Wojciech Mazur, Dominik Piasecki, Maciej Piasecki, 
    Radosław Ramocki
    
    This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 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 LICENSE and COPYING files for more details.
*/

#ifndef LEXICALUNITS_WORD_H
#define LEXICALUNITS_WORD_H
#include "lex_headers.h"

namespace LexicalUnits
{
	/**
	 * Class representing word template for matching in matrix creation. E.g. one can search for 
	 * a word of base form "dom", but only in singular.
	 *
	 * \author Bartosz Broda, bartosz.broda@pwr.wroc.pl	
	 */ 
	class Word
	{
		public:
			/**
			 Creates Word out of full tag and base index
			 \param tag binary mask for this word
			 \param base_index Index (as in Corpus::CWordDictionary) of base form of this word.
			 */ 
			Word(const Corpus::CTag &tag, int base_index);
			/**
			 Creates Word that will match any word with given base_index.
			 \param base_index Index (as in Corpus::CWordDictionary) of base form of this word.
			 */ 
			Word(int base_index);
			/**
			 * Standard copy constructor.
			 */ 
			Word(const Word &w);
			/**
			 * Standar assigment operator
			 */ 
			Word& operator =(const Word& w);
			/**
			 * Create word out of text.
			 */ 
			Word(const std::string &text);
			/**
			 * Crete word directly from Corpus::CLexem
			 */
			Word(const Corpus::CLexem &lexem);
			/**
			 * Check if 2 words are equal.
			 */
			virtual bool operator ==(const Word& w) const;

			/**
			 * Check if 2 words are not equal.
			 */
			virtual bool operator !=(const Word& w) const;
				
			/**
			 * Check if 2 words are equal.
			 */
			virtual bool operator ==(const Corpus::CLexem& lexem) const;

			/**
			 * Check if 2 words are not equal.
			 */
			virtual bool operator !=(const Corpus::CLexem& lexem) const;

			int GetBaseIndex() const;
			Corpus::CTag GetTag() const;

			virtual ~Word();


		protected:
			/**
			 * FlexClass + Attributes.
			 */
			Corpus::CTag m_cTag;
			/**
			 * Index of base form in Corpus::CWordDictionary.
			 */ 
			int m_iBaseIndex;
	};

}//namespace LexicalUnits



#endif

