Package com.yahoo.language.process
Record Class LinguisticsParameters
java.lang.Object
java.lang.Record
com.yahoo.language.process.LinguisticsParameters
- Record Components:
language- the language of the input string.stemMode- the stem mode applied on the returned tokensremoveAccents- whether to normalize accents and similarlowercase- whether to lowercase
public record LinguisticsParameters(Language language, StemMode stemMode, boolean removeAccents, boolean lowercase)
extends Record
Parameters to a linguistics operation.
- Author:
- bratseth
-
Constructor Summary
ConstructorsConstructorDescriptionLinguisticsParameters(Language language, StemMode stemMode, boolean removeAccents, boolean lowercase) Creates an instance of aLinguisticsParametersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.booleanReturns the value of thelowercaserecord component.booleanReturns the value of theremoveAccentsrecord component.stemMode()Returns the value of thestemModerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LinguisticsParameters
public LinguisticsParameters(Language language, StemMode stemMode, boolean removeAccents, boolean lowercase) Creates an instance of aLinguisticsParametersrecord class.- Parameters:
language- the value for thelanguagerecord componentstemMode- the value for thestemModerecord componentremoveAccents- the value for theremoveAccentsrecord componentlowercase- the value for thelowercaserecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
stemMode
Returns the value of thestemModerecord component.- Returns:
- the value of the
stemModerecord component
-
removeAccents
public boolean removeAccents()Returns the value of theremoveAccentsrecord component.- Returns:
- the value of the
removeAccentsrecord component
-
lowercase
public boolean lowercase()Returns the value of thelowercaserecord component.- Returns:
- the value of the
lowercaserecord component
-