list/src/main/java/data/Sentence.java

57 lines
1.0 KiB
Java
Raw Normal View History

2018-06-19 07:15:37 +00:00
package data;
import java.util.List;
import java.util.Map;
public class Sentence {
private List<Word> words;
2018-08-09 07:21:06 +00:00
private List<String> taxonomy;
2018-06-19 07:15:37 +00:00
// GOS
private String type;
private Map<String, String> properties;
2018-08-09 07:21:06 +00:00
public Sentence(List<Word> words, List<String> taxonomy) {
2018-06-19 07:15:37 +00:00
this.words = words;
2018-08-09 07:21:06 +00:00
this.taxonomy = taxonomy;
2018-06-19 07:15:37 +00:00
}
2018-08-09 07:21:06 +00:00
// public Sentence(List<Word> words) {
// this.words = words;
// }
2018-06-19 07:15:37 +00:00
2018-08-09 07:21:06 +00:00
public Sentence(List<Word> words, List<String> taxonomy, Map<String, String> properties) {
2018-06-19 07:15:37 +00:00
this.words = words;
2018-08-09 07:21:06 +00:00
this.taxonomy = taxonomy;
2018-06-19 07:15:37 +00:00
this.properties = properties;
}
2018-08-09 07:21:06 +00:00
public Sentence(List<Word> words, List<String> taxonomy, String type) {
2018-06-19 07:15:37 +00:00
this.words = words;
2018-08-09 07:21:06 +00:00
this.taxonomy = taxonomy;
2018-06-19 07:15:37 +00:00
this.type = type;
}
public List<Word> getWords() {
return words;
}
2018-08-09 07:21:06 +00:00
public List<String> getTaxonomy() {
return taxonomy;
2018-06-19 07:15:37 +00:00
}
public List<Word> getSublist(int indexFrom, int indexTo) {
return this.words.subList(indexFrom, indexTo);
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}