edu.isi.nlp.converters.StringToSymbolSet Maven / Gradle / Ivy
The newest version!
package edu.isi.nlp.converters;
import static com.google.common.base.Preconditions.checkNotNull;
import edu.isi.nlp.symbols.Symbol;
import edu.isi.nlp.symbols.SymbolUtils;
import java.util.Set;
public class StringToSymbolSet implements StringConverter> {
public StringToSymbolSet(String delimiter) {
this.subConverter = new StringToStringSet(checkNotNull(delimiter));
}
@Override
public Set decode(String s) {
checkNotNull(s);
return SymbolUtils.setFrom(subConverter.decode(s));
}
private final StringConverter> subConverter;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy