// Path: src/main/java/it/uniroma2/sag/kelp/data/examplegenerator/SequenceExampleGenerator.java
// @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.PROPERTY, property = "sequenceExamplesGeneratorType")
// @JsonTypeIdResolver(SequenceExampleGeneratorTypeResolver.class)
// public interface SequenceExampleGenerator extends Serializable{
// 
// 	/**
// 	 * At labeling time, this method allows to enrich a specific
// 	 * <code>Example</code> with the labels assigned by the classifier to the
// 	 * previous <code>Example</code>s
// 	 * 
// 	 * @param sequenceExample
// 	 *            The targeted sequence
// 	 * @param sequencePath
// 	 *            the sequence of <code>Label</code> assigned from a classifier
// 	 *            to the <code>SequenceExamlpe</code>
// 	 * @param offset
// 	 *            the offset of the targeted word in the sequence
// 	 * @return
// 	 */
// 	public Example generateExampleWithHistory(SequenceExample sequenceExample, SequencePath sequencePath, int offset);
// 
// 	/**
// 	 * This method allows to enrich each <code>Example</code> from an input
// 	 * <code>SequenceExample</code> with the labels assigned by the classifier
// 	 * to the previous <code>Example</code>s
// 	 * 
// 	 * @param sequenceExample
// 	 *            The input sequence
// 	 * 
// 	 * @return
// 	 */
// 	public SequenceExample generateSequenceExampleEnrichedWithHistory(SequenceExample sequenceExample);
// 
// 	/**
// 	 * @return the number <code>n</code> of elements (in the sequence) whose
// 	 *         labels are to be considered to enrich a targeted element
// 	 */
// 	public int getTransitionsOrder();
// }


import it.uniroma2.sag.kelp.data.examplegenerator.SequenceExampleGenerator;
import it.uniroma2.sag.kelp.predictionfunction.PredictionFunction;
/*
 * Copyright 2016 Simone Filice and Giuseppe Castellucci and Danilo Croce and Roberto Basili
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package it.uniroma2.sag.kelp.predictionfunction.model;


/**
 * This class implements a model produced by a
 * <code>SequenceClassificationLearningAlgorithm</code>
 * 
 * @author Danilo Croce
 *
 */
public class SequenceModel implements Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2749198158786953940L;

	/**
	 * The prediction function producing the emission scores to be considered in
	 * the Viterbi Decoding
	 */
	private PredictionFunction basePredictionFunction;

	private SequenceExampleGenerator sequenceExampleGenerator;

	public SequenceModel() {
		super();
	}

	public SequenceModel(PredictionFunction basePredictionFunction, SequenceExampleGenerator sequenceExampleGenerator) {
// Path: src/main/java/it/uniroma2/sag/kelp/data/examplegenerator/SequenceExampleGenerator.java
// @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.PROPERTY, property = "sequenceExamplesGeneratorType")
// @JsonTypeIdResolver(SequenceExampleGeneratorTypeResolver.class)
// public interface SequenceExampleGenerator extends Serializable{
// 
// 	/**
// 	 * At labeling time, this method allows to enrich a specific
// 	 * <code>Example</code> with the labels assigned by the classifier to the
// 	 * previous <code>Example</code>s
// 	 * 
// 	 * @param sequenceExample
// 	 *            The targeted sequence
// 	 * @param sequencePath
// 	 *            the sequence of <code>Label</code> assigned from a classifier
// 	 *            to the <code>SequenceExamlpe</code>
// 	 * @param offset
// 	 *            the offset of the targeted word in the sequence
// 	 * @return
// 	 */
// 	public Example generateExampleWithHistory(SequenceExample sequenceExample, SequencePath sequencePath, int offset);
// 
// 	/**
// 	 * This method allows to enrich each <code>Example</code> from an input
// 	 * <code>SequenceExample</code> with the labels assigned by the classifier
// 	 * to the previous <code>Example</code>s
// 	 * 
// 	 * @param sequenceExample
// 	 *            The input sequence
// 	 * 
// 	 * @return
// 	 */
// 	public SequenceExample generateSequenceExampleEnrichedWithHistory(SequenceExample sequenceExample);
// 
// 	/**
// 	 * @return the number <code>n</code> of elements (in the sequence) whose
// 	 *         labels are to be considered to enrich a targeted element
// 	 */
// 	public int getTransitionsOrder();
// }


// Path: src/main/java/it/uniroma2/sag/kelp/predictionfunction/model/SequenceModel.java
import it.uniroma2.sag.kelp.data.examplegenerator.SequenceExampleGenerator;
import it.uniroma2.sag.kelp.predictionfunction.PredictionFunction;

/*
 * Copyright 2016 Simone Filice and Giuseppe Castellucci and Danilo Croce and Roberto Basili
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package it.uniroma2.sag.kelp.predictionfunction.model;


/**
 * This class implements a model produced by a
 * <code>SequenceClassificationLearningAlgorithm</code>
 * 
 * @author Danilo Croce
 *
 */
public class SequenceModel implements Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2749198158786953940L;

	/**
	 * The prediction function producing the emission scores to be considered in
	 * the Viterbi Decoding
	 */
	private PredictionFunction basePredictionFunction;

	private SequenceExampleGenerator sequenceExampleGenerator;

	public SequenceModel() {
		super();
	}

	public SequenceModel(PredictionFunction basePredictionFunction, SequenceExampleGenerator sequenceExampleGenerator) {
		super();