com.basistech.rosette.apimodel.SemanticVectorsOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rosette-api-all Show documentation
Show all versions of rosette-api-all Show documentation
Babel Street Analytics API all modules combined
The newest version!
// Generated by delombok at Fri Nov 15 11:56:46 CST 2024
/*
* Copyright 2023 Basis Technology Corp.
*
* 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 com.basistech.rosette.apimodel;
import com.basistech.rosette.annotations.JacksonMixin;
/**
* Semantic Vectors options
*/
@JacksonMixin
public final class SemanticVectorsOptions extends Options {
/**
*/
private final Boolean perToken;
/**
*/
private final EmbeddingsMode embeddingsMode;
@SuppressWarnings("all")
SemanticVectorsOptions(final Boolean perToken, final EmbeddingsMode embeddingsMode) {
this.perToken = perToken;
this.embeddingsMode = embeddingsMode;
}
@SuppressWarnings("all")
public static class SemanticVectorsOptionsBuilder {
@SuppressWarnings("all")
private Boolean perToken;
@SuppressWarnings("all")
private EmbeddingsMode embeddingsMode;
@SuppressWarnings("all")
SemanticVectorsOptionsBuilder() {
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SemanticVectorsOptions.SemanticVectorsOptionsBuilder perToken(final Boolean perToken) {
this.perToken = perToken;
return this;
}
/**
* @return {@code this}.
*/
@SuppressWarnings("all")
public SemanticVectorsOptions.SemanticVectorsOptionsBuilder embeddingsMode(final EmbeddingsMode embeddingsMode) {
this.embeddingsMode = embeddingsMode;
return this;
}
@SuppressWarnings("all")
public SemanticVectorsOptions build() {
return new SemanticVectorsOptions(this.perToken, this.embeddingsMode);
}
@Override
@SuppressWarnings("all")
public String toString() {
return "SemanticVectorsOptions.SemanticVectorsOptionsBuilder(perToken=" + this.perToken + ", embeddingsMode=" + this.embeddingsMode + ")";
}
}
@SuppressWarnings("all")
public static SemanticVectorsOptions.SemanticVectorsOptionsBuilder builder() {
return new SemanticVectorsOptions.SemanticVectorsOptionsBuilder();
}
/**
* @return whether embeddings should be returned for each token in addition to the whole document
*/
@SuppressWarnings("all")
public Boolean getPerToken() {
return this.perToken;
}
/**
* @return the generation of embeddings to use for all languages, defaulting to second generation embeddings unless
* the language supports first generation embeddings
*/
@SuppressWarnings("all")
public EmbeddingsMode getEmbeddingsMode() {
return this.embeddingsMode;
}
@Override
@SuppressWarnings("all")
public boolean equals(final Object o) {
if (o == this) return true;
if (!(o instanceof SemanticVectorsOptions)) return false;
final SemanticVectorsOptions other = (SemanticVectorsOptions) o;
if (!other.canEqual((Object) this)) return false;
if (!super.equals(o)) return false;
final Object this$perToken = this.getPerToken();
final Object other$perToken = other.getPerToken();
if (this$perToken == null ? other$perToken != null : !this$perToken.equals(other$perToken)) return false;
final Object this$embeddingsMode = this.getEmbeddingsMode();
final Object other$embeddingsMode = other.getEmbeddingsMode();
if (this$embeddingsMode == null ? other$embeddingsMode != null : !this$embeddingsMode.equals(other$embeddingsMode)) return false;
return true;
}
@SuppressWarnings("all")
protected boolean canEqual(final Object other) {
return other instanceof SemanticVectorsOptions;
}
@Override
@SuppressWarnings("all")
public int hashCode() {
final int PRIME = 59;
int result = super.hashCode();
final Object $perToken = this.getPerToken();
result = result * PRIME + ($perToken == null ? 43 : $perToken.hashCode());
final Object $embeddingsMode = this.getEmbeddingsMode();
result = result * PRIME + ($embeddingsMode == null ? 43 : $embeddingsMode.hashCode());
return result;
}
@Override
@SuppressWarnings("all")
public String toString() {
return "SemanticVectorsOptions(perToken=" + this.getPerToken() + ", embeddingsMode=" + this.getEmbeddingsMode() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy