Package com.basistech.rosette.dm
Class Keyphrase.Builder
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<Keyphrase,Keyphrase.Builder>
com.basistech.rosette.dm.Keyphrase.Builder
- Enclosing class:
- Keyphrase
A builder for keyphrases
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns an immutable Keyphrase out of the builder contentsSpecify the list of offsets of each mention of the keyphraseprotected Keyphrase.Builder
getThis()
Specify the name of the keyphraseSpecify the salience value for the keyphraseMethods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Constructor Details
-
Builder
Constructs a builder from the required properties- Parameters:
phrase
- the name of the keyphraseextents
- the list of extents marking offsets for each mention of the keyphrase in the text
-
Builder
Constructs a builder out of an existing Keyphrase- Parameters:
toCopy
- the keyphrase to copy
-
-
Method Details
-
phrase
Specify the name of the keyphrase- Parameters:
phrase
- the name of the keyphrase- Returns:
- this
-
salience
Specify the salience value for the keyphrase- Parameters:
salience
- the salience value- Returns:
- this
-
extents
Specify the list of offsets of each mention of the keyphrase- Parameters:
extents
- the list of extents- Returns:
- this
-
build
Returns an immutable Keyphrase out of the builder contents- Returns:
- the new Keyphrase
-
getThis
- Specified by:
getThis
in classBaseAttribute.Builder<Keyphrase,
Keyphrase.Builder>
-