1   package eu.fbk.dkm.pikes.tintop.util;
2   
3   import org.apache.log4j.Logger;
4   
5   import edu.stanford.nlp.stats.Counter;
6   
7   /**
8    * Created with IntelliJ IDEA.
9    * User: alessio
10   * Date: 18/07/14
11   * Time: 16:04
12   * To change this template use File | Settings | File Templates.
13   */
14  
15  public class NerEntity {
16  
17  	static Logger logger = Logger.getLogger(NerEntity.class.getName());
18  
19  	private String label;
20      private Counter<String> scoredLabels = null;
21  	private int startToken;
22  	private int endToken;
23  	private String normalizedValue = null;
24  
25  	public NerEntity(String label, int startToken) {
26  		this.label = label;
27  		this.startToken = startToken;
28  		this.endToken = startToken;
29  	}
30  
31  	public NerEntity(String label, int startToken, String normalizedValue) {
32  		this.label = label;
33  		this.startToken = startToken;
34  		this.endToken = startToken;
35  		this.normalizedValue = normalizedValue;
36  	}
37  
38  	public String getLabel() {
39  		return label;
40  	}
41  
42  	public void setLabel(String label) {
43  		this.label = label;
44  	}
45  	
46      public Counter<String> getScoredLabels() {
47          return scoredLabels;
48      }
49      
50      public void setScoredLabels(Counter<String> scoredLabels) {
51          this.scoredLabels = scoredLabels;
52      }
53      
54  	public int getStartToken() {
55  		return startToken;
56  	}
57  
58  	public void setStartToken(int startToken) {
59  		this.startToken = startToken;
60  	}
61  
62  	public int getEndToken() {
63  		return endToken;
64  	}
65  
66  	public void setEndToken(int endToken) {
67  		this.endToken = endToken;
68  	}
69  
70  	public String getNormalizedValue() {
71  		return normalizedValue;
72  	}
73  
74  	public void setNormalizedValue(String normalizedValue) {
75  		this.normalizedValue = normalizedValue;
76  	}
77  
78  	@Override
79  	public String toString() {
80  		return "NerEntity{" +
81  				"label='" + label + '\'' +
82  				", startToken=" + startToken +
83  				", endToken=" + endToken +
84  				", normalizedValue='" + normalizedValue + '\'' +
85  				'}';
86  	}
87  }