001    /**
002     * PhraseInfo.java
003     * jCOLIBRI2 framework. 
004     * @author Juan A. Recio-García.
005     * GAIA - Group for Artificial Intelligence Applications
006     * http://gaia.fdi.ucm.es
007     * 15/06/2007
008     */
009    package jcolibri.extensions.textual.IE.representation.info;
010    
011    /**
012     * This class represents a feature. It's composed by:
013     * <ul>
014     * <li> phrase: Feature name
015     * <li> value: Feature value
016     * <li> begin: begin position in the text
017     * <li> end: end position in the text
018     * </ul>
019     * <p>
020     * First version developed at: Robert Gordon University - Aberdeen & Facultad Informática,
021     * Universidad Complutense de Madrid (GAIA)
022     * </p>
023     * 
024     * @author Juan Antonio Recio García
025     * @version 2.0
026     */
027    public class PhraseInfo {
028            private String phrase;
029            private int begin;
030            private int end;
031    
032            /**
033             * Creates a phrase info object
034             */
035            public PhraseInfo(String phrase, int begin, int end)
036            {
037                super();
038                this.phrase = phrase;
039                this.begin = begin;
040                this.end = end;
041            }
042    
043            /**
044             * @return Returns the begin.
045             */
046            public int getBegin()
047            {
048                return begin;
049            }
050    
051            /**
052             * @param begin The begin to set.
053             */
054            public void setBegin(int begin)
055            {
056                this.begin = begin;
057            }
058    
059            /**
060             * @return Returns the end.
061             */
062            public int getEnd()
063            {
064                return end;
065            }
066    
067            /**
068             * @param end The end to set.
069             */
070            public void setEnd(int end)
071            {
072                this.end = end;
073            }
074    
075            /**
076             * @return Returns the phrase.
077             */
078            public String getPhrase()
079            {
080                return phrase;
081            }
082    
083            /**
084             * @param phrase The phrase to set.
085             */
086            public void setPhrase(String phrase)
087            {
088                this.phrase = phrase;
089            }
090    
091            public String toString()
092            {
093                return "\n"+phrase+" ("+begin+","+end+")";
094            }
095    }