001 /*
002 NGramJ - n-gram based text classification
003 Copyright (C) 2001 Frank S. Nestel (frank at spieleck.de)
004
005 This program is free software; you can redistribute it and/or modify
006 it under the terms of the GNU Lesser General Public License as published
007 by the Free Software Foundation; either version 2.1 of the License, or
008 (at your option) any later version.
009
010 This program is distributed in the hope that it will be useful,
011 but WITHOUT ANY WARRANTY; without even the implied warranty of
012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013 GNU General Public License for more details.
014
015 You should have received a copy of the GNU Lesser General Public License
016 along with this program (lesser.txt); if not, write to the Free Software
017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
018 */
019
020 package de.spieleck.app.ngramj.phoner;
021
022 public class ScoredRes
023 {
024 protected byte[] res;
025 protected double val;
026
027 public ScoredRes(byte[] res, double val)
028 {
029 this.res = new byte[res.length];
030 for(int i = 0; i < res.length; i++ )
031 this.res[i] = res[i];
032 this.val = val;
033 }
034
035 public byte[] getRes()
036 {
037 return res;
038 }
039
040 public double getVal()
041 {
042 return val;
043 }
044
045 protected String string = null;
046
047 public String toString()
048 {
049 if ( string == null )
050 string = new String(res);
051 return string;
052 }
053 }
054