Remove (read|write)PhraseSuggestionSmoothingModel
This commit is contained in:
parent
cd75c3da2e
commit
4169b00441
|
@ -759,15 +759,6 @@ public abstract class StreamInput extends InputStream {
|
|||
return readNamedWriteable(ScoreFunctionBuilder.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a {@link SmoothingModel} from the current stream
|
||||
* @deprecated prefer {@link #readNamedWriteable(Class)} passing {@link SmoothingModel}.
|
||||
*/
|
||||
@Deprecated
|
||||
public SmoothingModel readPhraseSuggestionSmoothingModel() throws IOException {
|
||||
return readNamedWriteable(SmoothingModel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a list of objects
|
||||
*/
|
||||
|
|
|
@ -714,15 +714,6 @@ public abstract class StreamOutput extends OutputStream {
|
|||
writeNamedWriteable(scoreFunctionBuilder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the given {@link SmoothingModel} to the stream
|
||||
* @deprecated prefer {@link #writeNamedWriteable(NamedWriteable)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void writePhraseSuggestionSmoothingModel(SmoothingModel smoothinModel) throws IOException {
|
||||
writeNamedWriteable(smoothinModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the given {@link GeoPoint} to the stream
|
||||
*/
|
||||
|
|
|
@ -128,9 +128,7 @@ public class PhraseSuggestionBuilder extends SuggestionBuilder<PhraseSuggestionB
|
|||
realWordErrorLikelihood = in.readFloat();
|
||||
confidence = in.readFloat();
|
||||
gramSize = in.readOptionalVInt();
|
||||
if (in.readBoolean()) {
|
||||
model = in.readPhraseSuggestionSmoothingModel();
|
||||
}
|
||||
model = in.readOptionalNamedWriteable(SmoothingModel.class);
|
||||
forceUnigrams = in.readBoolean();
|
||||
tokenLimit = in.readVInt();
|
||||
preTag = in.readOptionalString();
|
||||
|
@ -160,11 +158,7 @@ public class PhraseSuggestionBuilder extends SuggestionBuilder<PhraseSuggestionB
|
|||
out.writeFloat(realWordErrorLikelihood);
|
||||
out.writeFloat(confidence);
|
||||
out.writeOptionalVInt(gramSize);
|
||||
boolean hasModel = model != null;
|
||||
out.writeBoolean(hasModel);
|
||||
if (hasModel) {
|
||||
out.writePhraseSuggestionSmoothingModel(model);
|
||||
}
|
||||
out.writeOptionalNamedWriteable(model);
|
||||
out.writeBoolean(forceUnigrams);
|
||||
out.writeVInt(tokenLimit);
|
||||
out.writeOptionalString(preTag);
|
||||
|
|
Loading…
Reference in New Issue