class TextInstanceCreator extends BaseFunction {

	@SuppressWarnings({ "unchecked", "rawtypes" })
	protected TextInstance<L> createInstance(TridentTuple tuple) {
		L label = this.withLabel ? (L) tuple.get(0) : null;
		String text = tuple.getString(this.withLabel ? 1 : 0);

		List<String> tokens = this.extractTokens(text);

		TextInstance<L> instance = new TextInstance(label, tokens);
		return instance;
	}

	public  TextInstanceCreator();
	public  TextInstanceCreator(boolean withLabel);
	public  TextInstanceCreator(boolean withLabel, TextTokenizer textAnalyser);

}